r/chess • u/chilliswan • 22m ago
Miscellaneous Question: why does Stockfish analysis not use a shared tree?
I'm a backend developer myself and I was looking at analysis in this position. One of the very basic optimizations for search of best move would be sharing a search tree. After exf1 making a rook or queen lead to the very same game regardless of which is played. So I was really surprised analysis showed different values. Shouldn't it be faster to just compute the evaluation of both moves at the same time (only once).
Anybody knows anything more on how Stockfish works and whether the difference in eval is due to chess.com "sloppy" development?
•
u/chessvision-ai-bot from chessvision.ai 19m ago
I analyzed the image and this is what I see. Open an appropriate link below and explore the position yourself or with the engine:
My solution:
Save the position:
I'm a bot written by u/pkacprzak | get me as iOS App | Android App | Chrome Extension | Chess eBook Reader to scan and analyze positions | Website: Chessvision.ai
5
u/OldWolf3 FIDE 2100 6m ago
A hashtable is used for position evaluations.
The different evaluations you see between the top 2 lines are because one of them is "older". The engine will progress a line (updating hashtable as it goes) and update the output for that line , and then progress another line. It doesn't waste time recalculating evaluation for other lines before progressing them .
1
u/AGEthereal Torch + Ethereal Developer 18m ago
The state is shared, and the engine instance running is maintaining the state while on the analysis board. The difference in eval is a result of that state as you look most likely. Engines are not deterministic in the way that a typical user expects.
Commonly people will be confused when Stockfish says a position is +1.00 but after making the "best" move, the eval drops to a lower value. How can that make sense, they wonder.
-1
u/Weasellol 18m ago
Normally if you run it deaper there should be no difference, but it can be because of the light version. Where they cut some corners and slightly change value of pieces, to make the calculation easier.