Check out Glinski's Hexagonal Chess, our featured variant for May, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Chess programs move making[Subject Thread] [Add Response]
H. G. Muller wrote on Thu, Sep 8, 2022 12:04 PM EDT in reply to Aurelian Florea from 08:31 AM:

Virtually all chess programs generate moves completely from scratch in every new position they reach. So after 1. e4 (and the opponent's reply) they would generate all Knight moves again (and now Ng1-e2 would be amongst those), and would try to generate new Rook moves (again without getting any). What you mention would only be relevant if you wanted to generate moves incrementally, by deriving the new list of moves from one you already had, by adding some new moves, and deleting some old, but keeping most of them. This can be done, but for games with the complexity of orthodox chess is not very much faster than generating the moves from scratch. That is, it could be much faster, but it would be very complicated to achieve that. So no one does it. (I wrote a kind of blog about it on talkchess.com, though, under the title "The Mailbox Trials'.)

For larger variants (larger board, more pieces) the incremental method could become competitive, however. I used it in my Tenjiku Shogi engine ('Inferno'), and could reach a speed of 500k positions/sec, which is similar to what most engines for orthodox chess can do, despite the 4 times larger board and and 5 times as many pieces. One problem is that it would be quite hard to make it general enough to do many variants. The incremental method must figure out which slider moves are blocked and which discovered by the move that is searched. If all sliders move along orthogonals and diagonals (as they tend to do in Shogi variants, and certainly do in orthodox chess) it is still manageable, but if the variant also has bent sliders (like the Griffon) or hook movers (like in Maka Dai Dai Shogi) it becomes far more complex to figure that out. The area move of the Fire Demon and Vice General in Tenjiku Shogi is almost impossible to do incrementally, so Inferno generates that from scratch in every position.

Alpha Zero relies on an enormously large neural network for evaluating a position, and suggesting moves to search. This takes so much time to compute that the time to generate moves is completely negligible to it, no matter how inefficiently you do it.