3 ms·
Stockfish has two key components: (1) an evaluation function, that quantifies black/white advantage in a chess position. (2) a search algorithm, that iterativ
by oli5679 6y ago
Stockfish has two key components:
(1) an evaluation function, that quantifies black/white advantage in a chess position.
(2) a search algorithm, that iteratively checks move sequences from a starting position using (1) and returns a recommendation of the best move to play.
Historically (1) was handcrafted, but it recently switched to a 'NNUE' neural network architecture (now it using different evaluation functions depending on how balanced the position is).
This is a good video if you want to understand how Stockfish works.
https://www.youtube.com/watch?v=pUyURF1Tqvg https://www.youtube.com/watch?v=pUyURF1Tqvg
"But if it turns out to be that heuristics-based approach has lost to NN, it isn't that clear anymore why these have to be 2 separate projects. At least, in terms of the rest of the engine."
Leela's evaluation function is a deep neural network, inference can only be carried out efficiently using GPU, whilst the Stockfish system has been optimised for a CPU-based computer architecture. The innovation of NNUE is that inference can be performed efficiently on a CPU, partly because the network is much smaller, and partly because the architecture is designed to be efficient at recomputing evaluations of only a single piece has changed.