Strange Stockfish behavior?

Code, algorithms, languages, construction...
UncombedCoconut
Posts: 44
Joined: Thu Jun 10, 2010 1:43 am
Real Name: Justin Blanchard
Location: United States

Re: Strange Stockfish behavior?

Post by UncombedCoconut » Tue Apr 26, 2011 10:06 am

Would you rather have SF (in "accept" mode) report the value as merely < 0.21 (or < 0.22 - 1.0/PawnValueMidgame), and otherwise behave as Bob suggests?
When this pathological FH-FL condition occurs, there is no correct way to resolve the score in the current iteration. The cake is a lie.

User avatar
Uly
Posts: 838
Joined: Thu Jun 10, 2010 5:33 am

Re: Strange Stockfish behavior?

Post by Uly » Wed Apr 27, 2011 11:49 am

UncombedCoconut wrote:Would you rather have SF (in "accept" mode) report the value as merely < 0.21 (or < 0.22 - 1.0/PawnValueMidgame), and otherwise behave as Bob suggests?
I think Stockfish should report the new upperbound, actually, -0.08-- like it shows in Reject fail high would be good, as that way the user can know that the move failed high and then low, and see that Stockfish goes to the next depth to resolve it.

(that -0.08-- may also be fine to show with Restart Iteration, to make the user aware of what is happening in case he went away from the computer and doesn't know why this became new main move).
UncombedCoconut wrote:When this pathological FH-FL condition occurs, there is no correct way to resolve the score in the current iteration.
For analysis, Restart iteration seems correct to me, because, unlike in play mode, the user can wait as long as necessary for the condition to be resolved, as those pathological events only happen in critical positions anyway (they're rare enough but I have yet to see one in a quiet/easy position). At least the user doesn't have to force the move for it it to happen, and why advancing an iteration when the move can be solved in this one? [now I recall that Rybka 3 Persistent Hash has a bug that causes she to advance an iteration in all fail highs, I wonder how would that do...]

If Stockfish sat and solved all such positions in games, it would probably lose on time, or have to play faster in other positions (this is my theory of why the change would perform worse at games), in analysis, the user can analyze all other moves at the same depth, as time permits (the fastest correspondence time controls are in the range of 30 days per game...) and it is very important for the score of the move to be resolved at current iteration if the user analyzes at fixed depth.

This was a triumph

Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Re: Strange Stockfish behavior?

Post by Jeremy Bernstein » Sat Jun 25, 2011 6:24 pm

Here's a new "preserve analysis" version based on Stockfish 2.1.1, with Gaviota tablebase support. It seems to be running well on my system -- please let me know how it runs on yours! 32- and 64-bit builds included.

Jeremy
Attachments
Stockfish_211_PA_GTB_Gran2a.7z
(1.09 MiB) Downloaded 287 times

User avatar
Uly
Posts: 838
Joined: Thu Jun 10, 2010 5:33 am

Re: Strange Stockfish behavior?

Post by Uly » Sun Jun 26, 2011 1:42 am

Oh, Jeremy, I just read your Private Message, so you beat me to it :)

Thanks for your compile, this was the message I was making:

Code: Select all

Confirmed, I checked it at the opening position, and then, stopped and restarted analysis:
Engine: Stockfish 2.1.1 JA 64bit (128 MB)
by Tord Romstad, Marco Costalba and Joona
 15/18	 0:00 	+0.48 	1.e4 Nf6 2.e5 Nd5 3.Nc3 Nxc3 4.dxc3 d6 5.exd6 Qxd6 6.Nf3 Be6 7.Bd3 Nc6 8.O-O O-O-O (1.420.878) 2018
 16/25	 0:01 	+0.44 	1.e4 Nf6 2.e5 Nd5 3.Nc3 Nxc3 4.dxc3 Nc6 5.Nf3 e6 6.Bd3 Be7 7.O-O O-O 8.Bd2 d5 9.c4 f6 10.cxd5 exd5 11.exf6 Bxf6 12.c3 (2.455.565) 2244
 17/25	 0:01 	+0.44 	1.e4 Nf6 2.e5 Nd5 3.Nc3 Nxc3 4.dxc3 Nc6 5.Nf3 e6 6.Bd3 Be7 7.O-O O-O 8.Bd2 d5 9.c4 f6 10.cxd5 exd5 11.exf6 Bxf6 12.c3 (2.860.672) 2259
 18/25	 0:01 	+0.44 	1.e4 Nf6 2.e5 Nd5 3.Nc3 Nxc3 4.dxc3 Nc6 5.Nf3 e6 6.Bd3 Be7 7.O-O O-O 8.Bd2 d5 9.c4 f6 10.cxd5 exd5 11.exf6 Bxf6 12.c3 (3.779.069) 2260
 19/26	 0:04 	+0.36 	1.e4 e5 2.Nf3 Nf6 3.d4 Nxe4 4.Bd3 d5 5.Nxe5 Bd6 6.Nd2 B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Nxd4 10.cxd5 Qb6 (3.216.401) 2479
 20/23	 0:02 	+0.16 	1.e4 e6 2.Nc3 d5 3.Nf3 Nf6 4.e5 Ne4 5.Bd3 Nc5 6.Bb5+ c6 7.Bf1 Ne4 8.Be2 Be7 9.O-O O-O 10.d4 Nxc3 11.bxc3 Na6 12.Bxa6 bxa6 (7.028.045) 2569
 21/27	 0:06 	+0.20 	1.e4 e6 2.d4 d5 3.exd5 exd5 4.Nc3 Nf6 5.Nf3 Nc6 6.Bg5 Bb4 7.Bb5 O-O 8.O-O Bxc3 9.bxc3 Qd6 10.c4 dxc4 11.Bxf6 Qxf6 12.Bxc4 (16.181.507) 2614
 22/27	 0:08 	+0.20 	1.e4 e6 2.d4 d5 3.exd5 exd5 4.Nc3 Nf6 5.Nf3 Nc6 6.Bb5 Bb4 7.O-O O-O 8.Bxc6 bxc6 9.Bg5 Bf5 10.Ne5 Bxc3 11.bxc3 Qd6 (23.197.832) 2623
 23/32	 0:15 	+0.24 	1.e4 e6 2.d4 d5 3.exd5 exd5 4.Nf3 Nf6 5.Bd3 Be7 6.Nc3 O-O 7.Be3 Re8 8.O-O Nc6 9.a3 Bd6 10.Re1 Ne4 11.Nxd5 Bxh2+ (40.071.373) 2651
 24/32	 0:16 	+0.24 	1.e4 e6 2.d4 d5 3.exd5 exd5 4.Nf3 Nf6 5.Bd3 Be7 6.Nc3 O-O 7.Be3 Re8 8.O-O Nc6 9.a3 Bd6 10.Re1 Ne4 11.Nxd5 Bxh2+ (45.165.014) 2669
best move: e2-e4 time: 0:16.922 min  n/s: 2.669.011  nodes: 45.165.014

Code: Select all

Issues:

1. Granularity:

Stockfish jumps in scores in segments of 0.04, while Gran2k would jump in segments of 0.01.

2. Preserving Analysis:

You can see how Stockfish loses 16 seconds on researches, this doesn't hurt on games because Stockfish will not revisit past positions, but slows downs analysis. Gran2k would jump directly to depth 24 e4 0.24 and start searching depth 25, saving those 16 seconds.

Glitch:

The behavior after a fail low on a fail high is suboptimal, I'd wish if you took a look at UncombedCoconut's code to make the behavior optional (Default / Accept Fail High / Restart Iteration.)

User avatar
Uly
Posts: 838
Joined: Thu Jun 10, 2010 5:33 am

Re: Strange Stockfish behavior?

Post by Uly » Sun Jun 26, 2011 1:51 am

And here's the comparison with Stockfish 2.11 PA GTB Gran2a:
Engine: Stockfish 2.1.1 PA GTB Gran2a (128 MB)
by Tord Romstad, Marco Costalba and Joona
 15/20	 0:00 	+0.50 	1.e4 Nf6 2.e5 Nd5 3.Nf3 d6 4.d4 Bf5 5.Nh4 g6 6.Nxf5 gxf5 7.c4 Nb6 8.Nc3 dxe5 9.dxe5 Qxd1+ 10.Kxd1 (1.215.106) 1852
 16/23	 0:01 	+0.56 	1.e4 e5 2.Nf3 Nc6 3.Bc4 Bd6 4.O-O Nf6 5.Nc3 O-O 6.d4 exd4 7.Nxd4 Na5 8.Be2 Re8 9.Bg5 h6 10.Bxf6 Qxf6 11.Nf5 (2.768.065) 2134
 17/23	 0:01 	+0.56 	1.e4 e5 2.Nf3 Nc6 3.Bc4 Bd6 4.O-O Nf6 5.Nc3 O-O 6.d4 exd4 7.Nxd4 Na5 8.Be2 Re8 9.Bg5 h6 10.Bxf6 Qxf6 11.Nf5 (3.180.433) 2165
 18/23	 0:02 	+0.33 	1.e4 e5 2.Nf3 Nf6 3.Nxe5 d6 4.Nf3 Nxe4 5.d3 Nf6 6.d4 Be7 7.Nc3 O-O 8.Bd3 Nc6 9.O-O Be6 10.Be3 (5.969.535) 2247
 19/30	 0:03 	+0.34 	1.e4 e5 2.Nf3 Nf6 3.Nxe5 d6 4.Nf3 Nxe4 5.Nc3 Nxc3 6.dxc3 Be7 7.Bd3 O-O 8.O-O Nd7 9.Re1 Nc5 10.Nd4 Bd7 11.Qh5 Nxd3 12.cxd3 Bf6 13.Nf5 (8.982.628) 2308
 20/30	 0:04 	+0.34 	1.e4 e5 2.Nf3 Nf6 3.Nxe5 d6 4.Nf3 Nxe4 5.Nc3 Nxc3 6.dxc3 Be7 7.Bd3 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Be6 13.Ne5 Nb4 14.Qh5 (16.806.062) 2450
best move: e2-e4 time: 0:06.860 min  n/s: 2.450.220  nodes: 16.806.062
That Mate in 0 fail low at the start of analysis for a3 looks weird, but otherwise the issues are gone. I would have wished that UncombedCoconut's optional changes made it to this trunk, though.

Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Re: Strange Stockfish behavior?

Post by Jeremy Bernstein » Sun Jun 26, 2011 7:17 am

Thanks, I'll check that weird mate output out. I don't remember what Uncombed Coconut proposed, but I'll look into that, as well.

Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Re: Strange Stockfish behavior?

Post by Jeremy Bernstein » Sun Jun 26, 2011 8:43 am

Jeremy Bernstein wrote:Thanks, I'll check that weird mate output out. I don't remember what Uncombed Coconut proposed, but I'll look into that, as well.
OK, I've fixed the mate 0 issue. The code in SF 2.1.1 is quite different than SF 2.0.1, in particular as regards the iteration of the root move list during search. Uncombed Coconut's changes don't snap right in, unfortunately. I hacked around a bit, to no avail (I can compile the code, and it seems like it should do the right thing, but it doesn't make a difference).

I'm having some trouble reproducing the issue from the CLI using the position "r2k1r2/pp1n1q1p/1npP4/4p1P1/4P3/1PbB2NP/P1P1Q1RK/3R4 b - -" in single-processor + analysis mode (SF sticks to f7f3 through depth 20). In non-analysis mode, a7a5 becomes interesting at depth 18 through depth 20. If I move f7f3 and go back, f7f3 remains interesting. However, it has the same score (0) as a7a5, and I really don't see what the problem is.

This issue is fairly subtle, though, and I don't pretend to fully grasp it.

I'll post a Gran2b with the mate fix in a bit, and if U-C is around, he could take a look at the new 2.1.1 code and propose a solution. Maybe you could try to re-explain the problem to me in a way that I can better understand it, though. UCI output is better for me than Arena output, if you can swing that.

Jeremy

Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Re: Strange Stockfish behavior?

Post by Jeremy Bernstein » Sun Jun 26, 2011 10:51 am

OK, here's PA_GTB_Gran2b. This should be functionally identical to the 2.0.1 version (and slightly more efficient, in fact). I've left my experiments with Uncombed Coconut's stuff out until I have some way of testing and verifying that they're working. Thanks in advance for any testing, bug reports, etc.

An OSX version is in the archive this time, along with 32- and 64-bit Win builds and the source. As ever, the source is also here:

https://github.com/jeremybernstein/Stockfish_PA_GTB
Jeremy Bernstein wrote:in single-processor + analysis mode (SF sticks to f7f3 through depth 20). In non-analysis mode, a7a5 becomes interesting at depth 18 through depth 20. If I move f7f3 and go back, f7f3 remains interesting. However, it has the same score (0) as a7a5
By the way, the only thing that UCI_AnalyseMode does is change the king safety weights, so I don't even think that this is terribly relevant. It probably just means that f7f3 is a hair "safer" than a7a5 and/or that the move ordering responds differently to the slightly different king safety evaluations. Anyway, please try to help me see the problem...

Jeremy
Attachments
Stockfish_211_PA_GTB_Gran2b.7z
(1.38 MiB) Downloaded 298 times

User avatar
Uly
Posts: 838
Joined: Thu Jun 10, 2010 5:33 am

Re: Strange Stockfish behavior?

Post by Uly » Mon Jun 27, 2011 12:46 am

Thanks Jeremy! Okay, I apologize for not actually checking the fail high -> fail low behavior of Default Stockfish 2.1.1. This is the behavior of 211 Gran2b on the problematic position:
Engine: Stockfish 2.1.1 PA (128 MB)
by Tord Romstad, Marco Costalba and Joona
  1/01	 0:00 	-0.34 	1...Ke8 (88) 1
  2/02	 0:00 	-0.34 	1...Qf3 2.Rf1 Qxe2 3.Rxf8+ Nxf8 4.Nxe2 (522) 6
  3/03	 0:00 	+0.14 	1...Qf3 2.Nf5 Qxe2 3.Bxe2 (809) 10
  4/04	 0:00 	+0.14 	1...Qf3 2.Nf5 Qxe2 3.Bxe2 (1.141) 14
  5/05	 0:00 	+0.12 	1...Qf3 2.Nf5 Qxe2 3.Bxe2 Nc5 (2.370) 25
  6/06	 0:00 	-0.09 	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7 Nxd6 10.Nf5 Nxf5 11.exf5 (874.824) 727
 16/23	 0:01 	-0.02 	1...Qf3 2.Qxf3 Rxf3 3.Be2 Rf8 4.Bg4 Bb4 5.Bf5 Rf7 6.Be6 Rf3 7.Bg4 Re3 8.Bf5 Nc8 9.Bxh7 Nxd6 10.Nf5 Nxf5 11.exf5 (1.260.989) 747
 17/26	 0:02 	-0.08 	1...Qf3 2.Qxf3 Rxf3 3.Be2 Rf8 4.Bg4 Bb4 5.Bf5 Rf7 6.Be6 Rf3 7.Bg4 Rf4 8.c3 Rxg4 9.hxg4 Bxc3 10.Rf2 (1.990.116) 753
 18/29	 0:06 	 0.00 	1...Qf3 2.Qxf3 Rxf3 3.Be2 Rf8 4.Bg4 Bb4 5.Bf5 Rf7 6.Be6 Rf3 7.Bg4 Re3 8.Bf5 Nf8 9.Rf2 Be1 10.Rg2 Bb4 (4.706.852) 784
 19/29	 0:08 	 0.00 	1...Qf3 2.Qxf3 Rxf3 3.Be2 Rf8 4.Bg4 Bb4 5.Bf5 Rf7 6.Be6 Rf3 7.Bg4 Re3 8.Bf5 Nf8 9.Rf2 Be1 10.Rg2 Bb4 (6.634.040) 790
<a5 becomes main move somewhere here>
 20/35	 0:53 	-0.33 	1...a5 2.Nf5 a4 3.Qg4 axb3 4.cxb3 Kc8 5.h4 Kb8 6.h5 Rh8 7.Rc2 Bb4 8.Be2 Qe6 9.Qg1 Ra5 10.Qg3 Rf8 11.Kg2 Nd5 (41.362.295) 773
 21/35	 0:58 	-0.33 	1...a5 2.Nf5 a4 3.Qg4 axb3 4.cxb3 Kc8 5.h4 Kb8 6.h5 Rh8 7.Rc2 Bb4 8.Be2 Qe6 9.Qg1 Ra5 10.Qg3 Rf8 11.Kg2 Nd5 (45.077.052) 773
As can be seen its behavior is totally different from 2.0.1, in where a5 would fail high, then it would fail low, and in all that time Qf3 would remain main move, but if the user forced a5, it would be clearly best.

Here Stockfish never reports a fail high but silently makes a5 the main move, then resolves it and it becomes best move. The end result is good, as a5 was resolved and found best.

However, it took too much time to appear on the screen, 2.0.1 versions would show a5 failing high as soon as 15 seconds, so I'm afraid that it's failing high internally but Stockfish is withholding this information from the user. This is bad in the hypothetical example in where it fails high, fails low, Stockfish doesn't show the move on the screen, and the user doesn't have a way to force it (this is just speculation, but it is weird how a5 is suddenly best move above).

Could you check if Stockfish now hides fail highs from the user in some instances?

Meanwhile, this position is no longer problematic (what I dislike is that a5 is never shown failing high), I guess I'll need to find a position where 2.0.1 with UncombedCoconut's changes finds a move that fails high, then low, and it's best, while 2.1.1 Gran2b just never shows this move.

Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Re: Strange Stockfish behavior?

Post by Jeremy Bernstein » Mon Jun 27, 2011 3:21 pm

Uly wrote:Could you check if Stockfish now hides fail highs from the user in some instances?
Here's the output with fail highs and fail lows being reported in the iterative deepening loop.
setoption name Threads value 1
position fen r2k1r2/pp1n1q1p/1npP4/4p1P1/4P3/1PbB2NP/P1P1Q1RK/3R4 b - -
go depth 20
info depth 1
info depth 1 seldepth 1 multipv 1 score cp 34 nodes 88 nps 3826 time 23 tbhits 0 pv d8e8 
info depth 2
info depth 2 seldepth 2 multipv 1 score cp 34 nodes 522 nps 20076 time 26 tbhits 0 pv f7f3 d1f1 f3e2 f1f8 d7f8 g3e2 
info depth 3
info depth 3 seldepth 3 multipv 1 score cp -14 nodes 809 nps 28892 time 28 tbhits 0 pv f7f3 g3f5 f3e2 d3e2 
info depth 4
info depth 4 seldepth 4 multipv 1 score cp -14 nodes 1141 nps 38033 time 30 tbhits 0 pv f7f3 g3f5 f3e2 d3e2 
info depth 5
-> fail low ->  5   -0.29   00:00    1677  Qf3 Qxf3 Rxf3 Ne2 
-> fail low ->  5   -0.44   00:00    2028  Qf3 Qxf3 Rxf3 Be2 
info depth 5 seldepth 5 multipv 1 score cp -12 nodes 2373 nps 62447 time 38 tbhits 0 pv f7f3 g3f5 f3e2 d3e2 d7c5 
info depth 6
-> fail high ->  6   -0.01   00:00    2595  Qf3 Nf5 Qxe2 Bxe2 Nc5 
info depth 6 seldepth 6 multipv 1 score cp 9 nodes 3402 nps 72382 time 47 tbhits 0 pv f7f3 g3f5 f3e2 d3e2 d7c5 e2f3 
info depth 7
info depth 7 seldepth 10 multipv 1 score cp 19 nodes 5670 nps 82173 time 69 tbhits 0 pv f7f3 e2f3 f8f3 g3f5 f3f4 h2g3 d8e8 
info depth 8
-> fail high ->  8   +0.34   00:00    8687  Qf3 Qxf3 Rxf3 Nf5 Rf4 Kg3 Nc5 
-> fail high ->  8   +0.51   00:00   10751  Qf3 Qxf3 Rxf3 Nf5 Nc5 Be2 Rf4 
info depth 8 seldepth 12 multipv 1 score cp 26 nodes 13526 nps 107349 time 126 tbhits 0 pv f7f3 e2f3 f8f3 d3e2 f3e3 e2g4 e3e1 g2g1 e1g1 d1g1 
info depth 9
-> fail low ->  9   +0.11   00:00   18400  Qf3 Qxf3 Rxf3 Be2 Re3 Bg4 Re1 Rg1 Rxg1 Kxg1 
info depth 9 seldepth 14 multipv 1 score cp 29 nodes 19635 nps 114156 time 172 tbhits 0 pv f7f3 e2f3 f8f3 d3e2 f3e3 e2g4 e3e1 d1e1 c3e1 g3f5 
info depth 10
info depth 10 seldepth 14 multipv 1 score cp 29 nodes 24959 nps 119995 time 208 tbhits 0 pv f7f3 e2f3 f8f3 d3e2 f3e3 e2g4 e3e1 d1e1 c3e1 g3f5 
info depth 11
-> fail low -> 11   +0.18   00:00   41662  Qf3 Qxf3 Rxf3 Be2 Re3 Bg4 Re1 Rg1 Rxg1 Kxg1 
-> fail low -> 11   +0.07   00:00   53025  Qf3 Qxf3 Rxf3 Be2 Re3 Rf2 Nc5 Bg4 
info depth 11 seldepth 15 multipv 1 score cp 9 nodes 62593 nps 143233 time 437 tbhits 0 pv f7f3 e2f3 f8f3 d3e2 f3f4 e2g4 c3b4 c2c3 f4g4 h3g4 b4c3 g3f5 d8e8 
info depth 12
-> fail low -> 12   -0.06   00:01  159956  Qf3 Qxf3 Rxf3 Be2 Rf4 Bg4 Bb4 c3 Rxg4 hxg4 Bxc3 Nf5 Ke8 Rg3 
info depth 12 seldepth 17 multipv 1 score cp -6 nodes 186702 nps 156629 time 1192 tbhits 0 pv f7f3 e2f3 f8f3 d3e2 f3f8 e2g4 c3b4 g4f5 f8f7 g3h5 b6c8 f5e6 f7f8 e6d7 d8d7 h5f6 d7e6 f6h7 
info depth 13
info depth 13 seldepth 23 multipv 1 score cp -13 nodes 603402 nps 159756 time 3777 tbhits 0 pv f7f3 e2f3 f8f3 d3e2 f3f8 e2g4 c3b4 g4f5 f8f7 g3h5 b6c8 f5e6 f7f8 e6d7 d8d7 h5f6 f8f6 g5f6 c8d6 
info depth 14
-> fail high -> 14   +0.02   00:04  658118  Qf3 Qxf3 Rxf3 Be2 Rf8 Bg4 Bb4 Bf5 Rf7 Nh5 Nc8 Be6 Rf8 Bxd7 Kxd7 Nf6+ Rxf6 gxf6 Nxd6 
info depth 14 seldepth 25 multipv 1 score cp 8 nodes 728115 nps 158320 time 4599 tbhits 0 pv f7f3 e2f3 f8f3 d3e2 f3f8 e2g4 c3b4 g4f5 f8f7 g3h5 b6c8 f5e6 f7f8 e6d7 d8d7 h5f6 f8f6 g5f6 c8d6 g2g7 d7e6 
info depth 15
info depth 15 seldepth 27 multipv 1 score cp 0 nodes 1152767 nps 161497 time 7138 tbhits 0 pv f7f3 e2f3 f8f3 d3e2 f3f8 e2g4 c3b4 g4f5 f8f7 f5e6 f7f3 e6g4 f3e3 g4f5 d7f8 g2f2 b4e1 f2g2 e1b4 
info depth 16
info depth 16 seldepth 27 multipv 1 score cp 0 nodes 1366438 nps 159779 time 8552 tbhits 0 pv f7f3 e2f3 f8f3 d3e2 f3f8 e2g4 c3b4 g4f5 f8f7 f5e6 f7f3 e6g4 f3e3 g4f5 d7f8 g2f2 b4e1 f2g2 e1b4 
info depth 17
-> fail high -> 17   +0.11   00:11   1790K  Qf3 Qxf3 Rxf3 Be2 Rf8 Bg4 Bb4 Bf5 Rf7 Be6 Rf3 Bg4 Rc3 Re2 a5 Bf5 Nf8 Bg4 a4 Rf2 Ng6 
info depth 17 seldepth 27 multipv 1 score cp 8 nodes 2297963 nps 161362 time 14241 tbhits 0 pv f7f3 e2f3 f8f3 d3e2 f3f8 e2g4 c3b4 g4f5 f8f7 f5e6 f7f3 e6g4 f3c3 g2e2 a7a5 g4f5 d7f8 f5g4 f8g6 e2f2 g6f4 
info depth 18
-> fail high -> 18   +0.19   00:32   5109K  a5 Nf5 a4 Qf2 axb3 axb3 Kc8 Qe3 Bb4 Rf1 Kb8 Be2 Qg6 
info depth 18 seldepth 29 multipv 1 score cp 3 nodes 8744596 nps 157197 time 55628 tbhits 0 pv a7a5 a2a4 f7f3 e2f3 f8f3 d3e2 f3f8 e2g4 c3b4 g3f5 d7c5 f5g3 f8f7 g4f5 b6d7 g3e2 b4a3 g2g1 d8e8 
info depth 19
info depth 19 seldepth 29 multipv 1 score cp 0 nodes 13034955 nps 158412 time 82285 tbhits 0 pv a7a5 a2a4 f7f3 e2f3 f8f3 d3e2 f3f8 e2g4 c3b4 g4f5 f8h8 g2f2 h8f8 f2f3 b6c8 f3d3 d7c5 d3e3 c5d7 e3d3 
info depth 20
info depth 20 seldepth 29 multipv 1 score cp 0 nodes 15326418 nps 156114 time 98174 tbhits 0 pv a7a5 a2a4 f7f3 e2f3 f8f3 d3e2 f3f8 e2g4 c3b4 g4f5 f8h8 g2f2 h8f8 f2f3 b6c8 f3d3 d7c5 d3e3 c5d7 e3d3 
bestmove a7a5 ponder a2a4

Post Reply