Stockfish 7 – fishy cache business

I was exploring some tactical positions with python running the engine. Let me show two snapshots of Stockfish analyzing the same position:

Gulko, Boris F 2415 -- Olotnik
  0-1 (37) B10n 1973
  USSR: USSR (1)

Screenshot 1:

Gulko--Olotnik - move 35... - backwards walk cache

Now I know there’s a tactic involving the actual game move, 35…Nf4, but Stockfish 7 is missing it? Why?

(The eval score here is -1.36 at 22-ply, which is wrong as the actual move played 35…Nf4 is winning.)

Perhaps it’s because I back-tracked from the end of the game. Therefore the cache is “forward” populated, whereas I suspect the engine developers strongly optimized for “backwards-history” populated.

The idea is that Stockfish 7 is designed to beat other engines in an actual game, and not for analysis. In one case, the moves are made in just forward order, in the other, the user moves backwards, forwards, and sideways. I believe there is some funny business going on with the cache which is beyond my score.

But I can simply issue a “ucinewgame” command to the engine to clear the cache, and resend the position. Here is the result:

Screenshot 2:

Gulko--Olotnik - move 35... - clean cache

With the cache cleared the analysis is quite different, even at 17-ply. Now 35…Nf5 is indeed totally winning, with an eval of -3.80. If the depth were allowed to go to 22-ply the score would increase to -4.30, as expected.

Technical aside – the score is following by ( depth / seldepth ) in the eval() output.

zz

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s