3

I have a simple question. Does the Stockfish engine use, amongst the steps of its complicated algorithm, a library/database of past matches? For such an algorithm to work, it would to need store many matches that have had a particular scenario. Each scenario has a player who went on to win. Thus, it is provided some kind of rating point to judge each particular scenario with, allowing it to choose the best move. It's either that or the Stockfish engine works just by working through the possible moves to figure out how to win.

In other words, does the Stockfish engine need to be fed data from past matches or can it work without any such data ?

3
  • I think this will help you : quora.com/…
    – Om3ga
    May 25 at 17:27
  • @Algebrology thanks, a lot. So, it seems the answer is NO. Thank you for that link , it really helped a lot. I am surprised though, it feels like i have heard it said a lot that chess engines analyse positions by comparing them with the positions in previous matches played between people. But i guess, i must have misunderstood May 25 at 19:15
  • Such a question has likely been answered hundreds or thousand of times elsewhere and i wouln't see the point of reiterating here. Generally if i wish to learn about a completely unkown subject X, i would google "tutorial X" or "introduction X". If have done that her for you and i think this link is quite useful: chess.com/article/view/computer-chess-engines
    – user27863
    May 25 at 21:18
3

Technically, Stockfish does make use of past matches, just not when it's playing. The way it uses its past matches is during training, when a new neural network (NNUE in Stockfish's case) is being trained. Once the NNUE is trained, though, it is "standalone" and does not change anymore.

The Stockfish you can download and play has an already-trained NNUE, so it does not use past matches.

3
0

does the Stockfish engine need to be fed data from past matches

No.

You are confusing Stockfish with AlphaZero. The two engines work in entirely different ways.

Stockfish works by using brute force calculation plus clever evaluation functions to determine what is the best move in any position. During a game it maintains hash tables of positions and evaluations that have occurred during that game so that when it calculates a transposition of an earlier calculated position it doesn't redo the calculations but just uses the previous one.

If an opening database is available it can use that but it also works perfectly well albeit slower without. Similarly in the endgame it can use tablebases if available which can greatly increase speed and accuracy.

AlphaZero, however, does work off a database of positions and evaluations which are generated during a "training" phase.

2
  • 1
    Stockfish is also a NN engine now (technically NNUE).
    – Allure
    May 26 at 2:39
  • 1
    This understanding of AlphaZero is very incorrect. There is a big difference between a neural network and a database. May 26 at 23:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.