Preserve Analysis G (The G is the alphabetical version).Prima wrote:Just out of curiosity, what does "PA_G" mean in the updated Stockfish 2.0.1 build?
Thanks everyone for your efforts! Stockfish is now showing the wished behavior! Here's cross posts from RF:
I see what he means, for instance, the root (opening position) shows the wished behavior:Banned for Life wrote:Analyzing with the modified Stockfish is now a pleasure, whereas before it was maddening to watch the evaluations jump up and down, and as you mentioned, if you moved along the PV, the engine would need to fill in the holes in the tt, which seemed like a waste of time. It would be interesting to test this configuration and see how it compares in game play against the default, as Dr. Hyatt's claim that using exact entries adds a few Elo points certainly seems reasonable.
The second step that was discussed was putting in what is referred to in Rybka as "Preserve Analysis" where hash replacement is no longer weighted (or more lightly weighted) by generation. This will allow moving to different root locations without deemphasizing current hash entries. Of course this is only suitable for analysis and will require the operator to manually clear the hash when moving to a different position.
21/26 0:06 +0.40 1.e4 e5 2.Nf3 Nf6 3.d4 Nxe4 4.Bd3 d5 5.dxe5 Be7
22/26 0:08 +0.40 1.e4 e5 2.Nf3 Nf6 3.d4 Nxe4 4.Bd3 d5 5.dxe5 Be7
(e4 forced)
21/25 0:00 +0.40 1...e5 2.Nf3 Nf6 3.d4 Nxe4 4.Bd3 d5 5.dxe5 Be7
22/05 0:03 +0.32++ 1...e5 2.Nf3 Nf6 3.d4 Nxe4 (7.694.059) 2499
22/19 0:07 +0.28 1...e5 2.Nf3 Nf6 3.d4 Nxe4 4.Nxe5 d6 5.Nf3 d5 6.Bd3
Back to root
22/20 0:00 +0.28 1.e4 e5 2.Nf3 Nf6 3.d4 Nxe4 4.Nxe5 d6 5.Nf3 d5
23/08 0:01 +0.28 1.e4 e5 2.Nf3 Nf6 3.d4 Nxe4 4.Nxe5 d6 (3.746.798)
However, it's enough for one to analyze some other position
(1. e4 Nc6 2. d4 d5 3. e5 Bf5 4. Ne2 e6 5. Ng3)
18/21 0:02 +0.16 5...Bg6 6.Bb5 Qd7 7.O-O f6 8.Nd2 a6 9.Bxc6 Qxc6
19/21 0:02 +0.16 5...Bg6 6.Bb5 Qd7 7.O-O f6 8.Nd2 a6 9.Bxc6 Qxc6
20/22 0:03 +0.24-- 5...Bg6 6.Bb5 Qd7 7.O-O f6 8.Nd2 a6 9.Bxc6 Qxc6
20/23 0:05 +0.12 5...Bg6 6.Bb5 Qd7 7.O-O a6 8.Bxc6 Qxc6 9.c3 O-O-O
21/20 0:09 +0.16 5...Bg6 6.Bb5 Qd7 7.O-O a6 8.Bd3 f6 9.f4 O-O-O
22/22 0:13 +0.12 5...Bg6 6.Bb5 Qd7 7.O-O a6 8.Bd3 f6 9.f4 O-O-O
23/21 0:17 +0.12 5...Bg6 6.Bb5 Qd7 7.O-O a6 8.Bd3 f6 9.f4 O-O-O
For Stockfish to forget all the other analysis
(opening position)
20/18 0:04 +0.16-- 1.Nf3 Nf6 2.d4 e6 3.e3 d5 4.Bd3 Be7 5.O-O O-O 6.c4
20/23 0:05 +0.24 1.e4 e5 2.Nf3 Nc6 3.Bb5 Nf6 4.Nc3 Bd6 5.O-O O-O
21/23 0:07 +0.24 1.e4 e5 2.Nf3 Nc6 3.Bb5 Nf6 4.O-O Bd6 5.Nc3 O-O
22/19 0:09 +0.32++ 1.e4 e5 2.Nf3 Nc6 3.Bb5 Nf6 4.O-O Bd6 5.d4 Qe7
22/23 0:10 +0.40++ 1.e4 e5 2.Nf3 Nf6 3.Nxe5 d6 4.Nf3 Nxe4 5.Qe2 Qe7
22/24 0:13 +0.48 1.e4 e5 2.Nf3 Nf6 3.Nxe5 d6 4.Nf3 Nxe4 5.d4 Be7
23/22 0:26 +0.24-- 1.e4 e6 2.Nf3 d5 3.exd5 exd5 4.d4 Nf6 5.Bb5+ c6
23/30 0:36 +0.20 1.e4 e6 2.Nf3 d5 3.exd5 exd5 4.d4 Nf6 5.Bb5+ c6
So it seems the changes made improve behavior overall and could even be worth some elo, but going beyond that, one would like for Stockfish to protect stored entries (in the example, one would like Stockfish to remember that e4 is 0.28 at depth 23, regardless of the positions analyzed afterwards, until the hash is manually cleared).
Of course, one possible solution of this could be implementing learning (saving the results to disk, not the entire hash, just the PV, score and depth of the position analized).