Programming a computer for playing chess (1950) [pdf]
vision.unipv.it
vision.unipv.it
Also, there's interesting implementation for the ZX-81, created over 20 years later and fitting in just 1024 bytes: https://users.ox.ac.uk/~uzdm0006/scans/1kchess/
Different times...
As well known as he is for information, sometimes I think the breadth of his contributions to the foundations of computing are not fully appreciated.
1: https://www.chessprogramming.org/Alpha-Beta 2: https://www.chessprogramming.org/Main_Page
https://www.amazon.com/Chess-machine-monographs-computer-sci...
It wasn't so much that I was interested in chess, but the book really opened my eyes to how to write computer programs. For example, a 64 bit vector was used for the board, and for each piece type for each location another 64 bit vector was used to specify the legal moves.
I know all this sounds routine today, but I had only the most rudimentary programming skills at the time, and this stuff was fascinating.
I finally gave up on playing chess because instead of thinking about my next move, I'd think about writing a program to calculate the next move. Hence I played pretty badly.
Leela uses PUCT (Predictor + Upper Confidence Bound tree search). We evaluate new nodes by doing a playout: start from the root node (the current position), pick a move to explore, and repeat down the tree until we reach a game position that has not been examined yet (or a position that ends the game, called a terminal node). We expand the tree with that new position (assuming non-terminal node) and use the neural network to create a first estimate of the value for the position as well as the policy for continuing moves. In Leela, a policy for a node is a list of moves and a probability for each move. The probability specifies the odds that an automatic player that executes the policy will make that move. After this node is added to the tree, backup that new value to all nodes visited during this playout. This slowly improves the value estimation of different paths through the game tree.
When a move is actually played on the board, the chosen move is made the new root of the tree. The old root and the other children of that root node are erased.
This is the same search specified by the AGZ paper, PUCT (Predictor + Upper Confidence Bound tree search). Many people call this MCTS (Monte-Carlo Tree Search), because it is very similar to the search algorithm the Go programs started using in 2006. But the PUCT used in AGZ and Lc0 replaces rollouts (sampling playouts to a terminal game state) with a neural network that estimates what a rollout would do.Stockfish implements an advanced alpha–beta search and uses bitboards. Compared to other engines, it is characterized by its great search depth, due in part to more aggressive pruning and late move reductions.[13] As of September 2024, Stockfish 17 (4-threaded) achieved an Elo rating of 3642 +16 −16 on the CCRL 40/15 benchmark.[14]
See also:
Stockfish historically used only a classical hand-crafted function to evaluate board positions, but with the introduction of the efficiently updatable neural network (NNUE) in August 2020, it adopted a hybrid evaluation system that primarily used the neural network and occasionally relied on the hand-crafted evaluation. In July 2023, Stockfish removed the hand-crafted evaluation and transitioned to a fully neural network-based approach.
Programming a Computer for Playing Chess (1949) - https://news.ycombinator.com/item?id=9231010 - March 2015 (1 comment)
Programming a Computer for Playing Chess (1950) [pdf] - https://news.ycombinator.com/item?id=9107788 - Feb 2015 (6 comments)
Like the einstein papers of 1905, or Shannon's paper on entropy or codds paper on relational databases. For me it was way more understandable than any secondary literature I read before.
Now lots of these aren't used anymore but in papers.
The effect of having the checkmate rule instead of capturing the king is allowing the possibility of stalemates. But stalemate is rare in the middle game, where there are usually many legal moves available, so it's simpler to pretend the goal is just to capture the king.
Games would need to also be stopped when a king is taken to make the search approximately correct.