1

I ran Stockfish 2 times with the command go depth 1.

First time

info depth 1 seldepth 1 multipv 1 score cp 114 nodes 20 nps 10000 tbhits 0 time 2 pv e2e3

Second time:

info depth 1 seldepth 1 multipv 1 score cp 105 nodes 22 nps 22000 tbhits 0 time 1 pv e2e4

Why does the number of nodes increase from 20 to 22?

1

It's likely due to Stockfish's transposition table (essentially a fast lookup table that Stockfish can use to refer back to positions it evaluated before). During your first run, information about visited positions was stored in the table. Then on the second run, Stockfish may have looked at some of Black's moves after depth 1 (since it's already evaluated all states at depth 1).

SmallChess' answer to this question may be useful if it's still confusing:

How to read score from stockfish - inconsistent response every call?

Edit: to test if it is the transposition table behind this, try to reset it after the first run (close the whole program if you can't figure out how). Then on the second run, the number of nodes should be the same (as well as the centipawn evaluation).

| improve this answer | |
  • "Then on the second run, Stockfish may have looked at some of Black's moves after depth 1". I think that Black's moves belong to depth 2, and there are 20 nodes at depth 1, because White has 20 legal moves from the original position. You are explaining that the node 21st is a Black's move right? If it's a Black's move, how can it belong to depth 1, because it must belong to depth 2. – hdvd2309 May 8 at 1:36
  • @hdvd2309 Yes, it doesn't technically belong to depth 1. When an engine says depth 1, it means searching that far in conjunction with other tools. One of these tools is a transposition table, another is quiescence search (i.e., if a position is too wild, keep searching ahead and evaluate successor nodes). – Inertial Ignorance May 8 at 1:39

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.