Stockfish Natural TB loses heavily to Stockfish master

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: Stockfish Natural TB loses heavily to Stockfish master

Post by Michel »

costalba wrote:One last thing. I have further improved the way DTZ is able to steer the engine in finding the winning line. I have done it in a way to preserve all the good properties of Natural TB, but now winning line is found on average in much shorter time.
Of course you conveniently forget to mention that Ronald's implementation already plays these endgames flawlessly without needing hack upon hack upon hack.

And since you mention "analysis". In Ronald's version the user is informed immediately that the initial positions are game theoretic wins. In your version only a heuristic score is shown it seems which can even be quite drawish. Now since these are TB positions you could trivially fix this, if you didn't regard TB scores somehow as "artificacts", i.e. something dirty. This shows how misguided your NTB effort really is.
Last edited by Michel on Wed Sep 06, 2017 9:51 am, edited 1 time in total.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Stockfish Natural TB loses heavily to Stockfish master

Post by syzygy »

mcostalba wrote:SF NTB is always able to convert a win, but because of the way it is designed, finding the winning move is not immediate. We are talking of few seconds, not hours. It is very difficult to give a general rule but you can assume that within 1 minute of search it is able to find anything that there is to find in a position (but in the most cases we are talking of just fractions of a second).
If time were not important, then any plain alpha-beta search (that scores mates according to the distance from the root) will always be able to convert a win.

But time is important. If you need 1 minute, then there is no "always". And if you need to "assume" that 1 minute is enough, then most likely there will be cases where the mate is never found.

In addition, there is a fundamental issue with draw by repetition that your approach cannot deal with. And since I seem to be unable to explain this issue to you, I do not see how you could possibly fix it.

I repeat: converting a TB win can be done 100% reliably in the time needed to perform a small number of DTZ probes. SF master does that now. Breaking this guarantee is breaking the code.
Nevertheless when I read "a reasonable 400ms per move" and then in the same line "expect blunder at TCEC" and "I use it for analysis" I understand to make people change their minds is mission impossible.
400ms is more than plenty. I find it incredible that you should use this argument.

Success on single games does not prove anything. Failure on a single game does.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Stockfish Natural TB loses heavily to Stockfish master

Post by Laskos »

syzygy wrote:
Laskos wrote:Would be fun if it happens at TCEC.
If I have understood correctly, TCEC will use 6-piece TB adjudication (respecting the 50-move rule this time). So SF may win games or hold draws it would not actually be able to win or hold.
That's understandable from spectators' point of view, but a bit of a pity in this case.

I woke up again very early, and unexpectedly quickly built two new suites: 6-men-easy-wins and 6-men-easy-draws. They are from regular games, I have for some years now a huge EPD file, if I am not mistaken, built from Gaviota engine regular self-games (thousands of them) without adjudication. I took 6-men positions out of this EPD, and classified them as Wins and Draws using Syzygy 6-men bases (on SSD). From these regular 6-men positions, I did the same thing as with regular 5-men positions in the earlier post, to see how often Stockfish Final Natural TB fails to convert from 6-men.

Time control is now 0.25s per move, roughly equivalent to 10''+ 0.1'' of the Fishtest. I used Cutechess-Cli, because I was suspicious of SF FNTB behaviour on TB Draws at root with LittleBlitzer (observe time used by SF FNTB with 5-men Draws at root in earlier post).

Wins:
1000 games
Suite: Regular 6-men Wins
TC: 0.25s per move
Score of SF Master vs SF Final NTB: 500 - 471 - 29 [0.514] 1000
ELO difference: 10.08 +/- 21.22
Finished match

SF Final NTB fails to convert 29 out of 500 regular 6-men wins. A rate of about 6%. Correct pentanomial errors (the games were side-and-reversed) are much smaller:
ELO difference: 10.08 +/- 3.54


Draws:
2000 games
Suite: Regular 6-men Draws
TC: 0.25s per move
Score of SF Master vs SF Final NTB: 2 - 0 - 1998 [0.500] 2000
ELO difference: 0.35 +/- 0.48
Finished match

Only two failures of SF Final NTB in 2000 games. It misses very rarely to convert TB Draws. Pentanomial errors here are almost identical to normal, trinomial errors used by Cutechess.

As the Stockfish self-games are pretty drawish, probably more 6-men Draws will be entered in games than 6-men Wins. That is, if Fishtest will not use adjudications in the regression test to pass Natural to the main branch. If they will use adjudications, the regression is 0 ELO points. If not, assuming that some 10% (probably less) of regular games from, say 2moves_v1.epd, are decided by 5-6 men positions, the regression is anyway probably no more than 0.5 ELO point, and Natural has excellent chances to pass the regression test. What is their window? [-4,0] or something like that.

I hope current master Syzygy, easy-mate or not, with its perfect play on root TB positions, will be developed parallelly, and in any case, there is Komodo, and other excellent engines using Syzygy bases as designed. Even for building these endgame suites I needed a perfect player, not an approximation to it. Also, sometimes I am toying with endgame chess as a model for full chess, it is often interesting to see the transition from perfect chess to full chess.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Stockfish Natural TB loses heavily to Stockfish master

Post by Laskos »

mcostalba wrote:
Laskos wrote: At this time control, SF FNTB fails in 11 conversions out of 1000 Draws against SF master.
Thanks Kay for testing NTB!

Could you please post the pgn of some game where SF fails to keep the draw? This should not happen. Never.
It seems SF FNTB was not functioning properly on 5-men regular Draws with LittleBlitzer. But I have failures to convert on 6-men Draws in Cutechess-Cli, and I don't see any misbehavior. Here is one game:

Code: Select all

[Event "?"]
[Site "?"]
[Date "2017.09.06"]
[Round "347"]
[White "SF Master"]
[Black "SF Final NTB"]
[Result "1-0"]
[FEN "8/1q6/2R5/3P4/KN1k4/8/8/8 b - - 0 1"]
[PlyCount "46"]
[SetUp "1"]
[TimeControl "0.25/move"]

1... Qd7 {0.00/68 0.25s} 2. Kb5 {0.00/15 0.25s} Qe8 {0.00/55 0.25s}
3. d6 {0.00/22 0.25s} Ke3 {0.00/20 0.28s} 4. Nd5+ {+132.79/13 0.25s}
Kf2 {-132.72/16 0.25s} 5. Nb6 {+132.79/16 0.25s} Qg8 {-4.54/21 0.25s}
6. d7 {+132.79/17 0.25s} Kg2 {-7.53/15 0.26s} 7. Rc8 {+132.79/17 0.25s}
Qb3+ {-9.58/16 0.31s} 8. Ka6 {+132.79/17 0.25s} Kf1 {-47.34/14 0.26s}
9. d8=Q {+132.79/15 0.25s} Qa2+ {-20.67/11 0.27s} 10. Kb7 {+132.79/21 0.25s}
Qg2+ {-67.30/13 0.26s} 11. Qd5 {+132.79/20 0.25s} Qg7+ {-72.69/13 0.25s}
12. Rc7 {+M29/24 0.25s} Qg4 {-61.13/13 0.26s} 13. Qd3+ {+M27/26 0.25s}
Qe2 {-M52/19 0.25s} 14. Rc1+ {+M25/26 0.25s} Kf2 {-M30/22 0.25s}
15. Rc2 {+M19/29 0.25s} Qxc2 {-M18/25 0.25s} 16. Qxc2+ {+M17/30 0.25s}
Kf3 {-M14/27 0.25s} 17. Kc6 {+M15/28 0.25s} Kf4 {-M14/24 0.25s}
18. Kd5 {+M13/28 0.25s} Ke3 {-M12/28 0.25s} 19. Ke5 {+M11/30 0.25s}
Kf3 {-M10/32 0.25s} 20. Qe4+ {+M9/35 0.25s} Kg3 {-M8/48 0.25s}
21. Qe2 {+M7/55 0.25s} Kh4 {-M6/75 0.25s} 22. Kf4 {+M5/127 0.041s}
Kh3 {-M4/127 0.037s} 23. Qd2 {+M3/127 0.004s} Kh4 {-M2/127 0.002s}
24. Qh2# {+M1/127 0.002s, White mates} 1-0
Instead converting the win is another story. Let me clarify.

SF NTB is always able to convert a win, but because of the way it is designed, finding the winning move is not immediate. We are talking of few seconds, not hours. It is very difficult to give a general rule but you can assume that within 1 minute of search it is able to find anything that there is to find in a position (but in the most cases we are talking of just fractions of a second).

Nevertheless when I read "a reasonable 400ms per move" and then in the same line "expect blunder at TCEC" and "I use it for analysis" I understand to make people change their minds is mission impossible.
I understand, but even for building 6-men suites this morning, I used SF master at 100ms per move as perfect player with 6-men at the root. To me, a thing like "finding the shortest Mate" is intended more for puzzle solving. It is a nice feature, but not when it comes at the price of having an approximate player, not a perfect one. Similar thing with "natural" concept. I am a patzer as a chess player, so my words about that are not important, but as a patzer, when I see +3 score in a won TB position, I am more confused than when I see the TB win. +3 in late endgames is not necessarily a Win, probably significantly more than 1% of late endgames with this heuristic score are in fact theoretical Draws. Also, "natural" is an aesthetic issue, and I often see "unnatural" in many endgames by human super GMs. Do they go that often for the shortest Mate? "Unnatural" is the play of Go super-engines, optimized for outcomes rather than points. And so on.
So I will add an UCI option "Natural TB" by which users can toggle between natural and traditional behavior. This of course is just a placebo knob, but it takes me much less to add it than to convince people otherwise. Of course during real analysis I expect Natural TB to be always enabled because people wants to see good analysis lines, in multi PV, no odd sacrifices and with proper scores to understand the difference between competing PV lines (and of course wants to see a mate if engine finds it): all things that Natural TB does....well...naturally :-)
That's good, I was a bit worried. Could you keep the UCI switch option for analysis too? It would be nice to have both TB implementations fully enabled by a UCI option.
One last thing. I have further improved the way DTZ is able to steer the engine in finding the winning line. I have done it in a way to preserve all the good properties of Natural TB, but now winning line is found on average in much shorter time.

I have tested it on your 2 reported games with 5-men where SF failed to convert the wins. Now it does.

Code: Select all

[Event "?"]
[Site "?"]
[Date "2017.09.06"]
[Round "?"]
[White "stockfish NTB"]
[Black "stockfish_ms"]
[Result "1-0"]
[FEN "8/8/2K5/8/3k1B2/8/8/n2B4 w - - 0 1"]
[PlyCount "81"]
[SetUp "1"]
[TimeControl "60+0.1"]

1. Ba4 {+4.93/27 2.0s} Kc4 {-132.79/1 0.001s} 2. Be5 {+5.03/24 0.46s}
Nb3 {-132.79/1 0s} 3. Bb5+ {+5.09/25 0.54s} Kb4 {-132.79/1 0s}
4. Bd6+ {+5.04/24 0.18s} Kc3 {-132.79/1 0s} 5. Kd5 {+5.09/31 0.67s}
Nd2 {-132.79/31 1.6s} 6. Be5+ {+5.17/29 1.3s} Kc2 {-132.79/1 0s}
7. Bf6 {+5.17/33 0.84s} Kb3 {-132.79/1 0s} 8. Bd3 {+5.20/30 0.70s}
Kb4 {-132.79/1 0s} 9. Be5 {+5.20/32 0.87s} Nb3 {-132.79/1 0s}
10. Bg3 {+5.28/32 0.50s} Na1 {-132.79/1 0s} 11. Be1+ {+5.92/30 1.2s}
Kb3 {-132.79/1 0s} 12. Bd2 {+5.92/32 0.20s} Nc2 {-132.79/37 1.3s}
13. Be2 {+5.92/41 0.95s} Nb4+ {-132.79/38 0.26s} 14. Kc5 {+5.92/40 0.34s}
Na2 {-132.79/48 1.0s} 15. Bd1+ {+132.61/34 2.7s} Kb2 {-132.79/40 1.2s}
16. Kc4 {+132.60/33 0.97s} Nc1 {-132.79/46 1.8s} 17. Bc3+ {+132.62/29 2.7s}
Ka3 {-132.79/51 1.2s} 18. Bb4+ {+131.22/33 2.4s} Kb2 {-132.79/48 0.28s}
19. Bc3+ {+132.40/33 0.67s} Ka3 {-132.79/55 1.1s} 20. Be5 {+132.30/25 0.17s}
Na2 {-132.79/53 7.3s} 21. Bg4 {+132.45/29 0.64s} Nc1 {-M60/37 1.9s}
22. Bf3 {+132.37/38 1.1s} Nb3 {-M54/39 1.0s} 23. Kc3 {+M45/34 0.54s}
Nc1 {-M52/36 0.18s} 24. Kc2 {+M41/35 0.22s} Na2 {-M42/38 1.5s}
25. Kb1 {+M39/40 0.85s} Kb3 {-M40/42 0.92s} 26. Bd5+ {+M37/38 0.21s}
Ka3 {-M38/40 0.22s} 27. Bxa2 {+M33/40 0.89s} Kb4 {-M36/41 1.0s}
28. Bd4 {+M31/37 0.20s} Kb5 {-M26/42 1.1s} 29. Bd5 {+M29/39 0.85s}
Kb4 {-M24/44 1.0s} 30. Kb2 {+M23/40 1.2s} Kb5 {-M22/45 1.2s}
31. Kc3 {+M21/40 1.2s} Ka6 {-M20/41 0.20s} 32. Kc4 {+M19/37 0.19s}
Ka5 {-M18/1 0s} 33. Bb7 {+M17/38 1.1s} Ka4 {-M16/1 0s} 34. Be5 {+M15/35 0.23s}
Ka3 {-M14/41 0.97s} 35. Bc6 {+M13/38 0.83s} Ka2 {-M12/1 0s}
36. Kc3 {+M11/36 0.18s} Ka1 {-M10/52 0.98s} 37. Kb3+ {+M9/48 0.85s}
Kb1 {-132.79/1 0s} 38. Bf3 {+M7/61 0.17s} Kc1 {-M6/1 0s}
39. Bf4+ {+M5/127 0.12s} Kb1 {-M4/1 0s} 40. Be4+ {+M3/127 0.010s} Ka1 {-M2/1 0s}
41. Be5# {+M1/127 0.006s, White mates} 1-0

[Event "?"]
[Site "?"]
[Date "2017.09.06"]
[Round "?"]
[White "stockfish NTB"]
[Black "stockfish_ms"]
[Result "1-0"]
[FEN "5n2/8/8/8/5K2/1B6/2N5/6k1 w - - 0 1"]
[PlyCount "85"]
[SetUp "1"]
[TimeControl "60+0.1"]

1. Nb4 {+0.19/39 1.3s} Nd7 {-132.79/1 0.001s} 2. Nd3 {+0.19/24 0.14s}
Nb6 {-132.79/1 0.001s} 3. Be6 {+0.26/37 0.98s} Kg2 {-132.79/1 0s}
4. Kg4 {+0.30/34 0.16s} Na4 {-132.79/1 0s} 5. Bd5+ {+0.30/35 0.93s}
Kg1 {-132.79/1 0s} 6. Kf3 {+0.30/30 0.19s} Nc3 {-132.79/1 0s}
7. Bc6 {+0.31/38 0.76s} Kf1 {-132.79/1 0s} 8. Bd7 {+0.33/37 0.37s}
Kg1 {-132.79/1 0s} 9. Bc6 {+0.33/44 0.89s} Kf1 {-132.79/1 0s}
10. Bd7 {+0.33/37 0.19s} Kg1 {-132.79/1 0s} 11. Nb4 {+0.34/42 0.81s}
Nb1 {-132.79/23 0.82s} 12. Ke2 {+0.40/43 0.67s} Nc3+ {-132.79/1 0s}
13. Ke3 {+0.40/39 0.33s} Kf1 {-132.79/1 0s} 14. Nc2 {+42.25/35 1.7s}
Nd5+ {-132.79/1 0s} 15. Kf3 {+42.25/31 0.18s} Kg1 {-132.79/1 0s}
16. Bh3 {+41.71/40 2.0s} Kh2 {-132.79/1 0.001s} 17. Be6 {+0.41/42 1.8s}
Nc7 {-132.79/1 0s} 18. Bd7 {+0.38/31 0.38s} Nd5 {-132.79/1 0s}
19. Be6 {+0.37/39 1.3s} Nc7 {-132.79/1 0s} 20. Bd7 {+4.70/42 2.1s}
Nd5 {-132.79/1 0s} 21. Nd4 {+4.70/31 0.20s} Nf6 {-132.79/1 0s}
22. Bf5 {+4.70/37 1.3s} Ne8 {-132.79/30 2.5s} 23. Nb5 {+132.57/28 0.92s}
Ng7 {-132.79/1 0s} 24. Bd7 {+132.53/38 1.7s} Nh5 {-132.79/1 0.004s}
25. Nc3 {+132.61/34 2.7s} Nf6 {-132.79/1 0s} 26. Be6 {+132.50/37 2.1s}
Ne8 {-132.79/1 0s} 27. Ne4 {+132.55/31 0.19s} Nc7 {-132.79/1 0s}
28. Bf5 {+132.58/33 6.0s} Kg1 {-132.79/1 0s} 29. Nd2 {+132.53/35 1.2s}
Nd5 {-132.79/42 2.7s} 30. Kg3 {+132.59/36 3.9s} Nf6 {-132.79/1 0s}
31. Bg6 {+M35/34 0.46s} Nd5 {-132.79/1 0.004s} 32. Bd3 {+M27/43 0.62s}
Nf6 {-132.79/1 0s} 33. Nf3+ {+M25/44 0.16s} Kh1 {-132.79/1 0s}
34. Ng5 {+M23/48 0.72s} Nh5+ {-132.79/1 0.003s} 35. Kf2 {+M17/50 0.15s}
Kh2 {-132.79/1 0.003s} 36. Nf3+ {+M15/71 0.64s} Kh1 {-M14/77 2.8s}
37. Bf1 {+M13/72 0.13s} Nf4 {-M12/78 0.33s} 38. Ne5 {+M11/84 0.67s}
Kh2 {-M10/88 1.5s} 39. Ng4+ {+M9/84 0.18s} Kh1 {-M8/1 0s} 40. Ba6 {+M7/89 0.86s}
Ng2 {-M6/93 1.7s} 41. Bd3 {+M5/127 0.19s} Ne1 {-M4/95 1.7s}
42. Be4+ {+M3/127 0.036s} Nf3 {-M2/127 0.069s}
43. Bxf3# {+M1/127 0.004s, White mates} 1-0
Thanks, later I will check that out with the new Natural.
duncan
Posts: 12038
Joined: Mon Jul 07, 2008 10:50 pm

Re: Stockfish Natural TB loses heavily to Stockfish master

Post by duncan »

mcostalba wrote:
Instead converting the win is another story. Let me clarify.

SF NTB is always able to convert a win, but because of the way it is designed, finding the winning move is not immediate. We are talking of few seconds, not hours. It is very difficult to give a general rule but you can assume that within 1 minute of search it is able to find anything that there is to find in a position (but in the most cases we are talking of just fractions of a second).
do not understand the difference between Sf NTB and "early mate". would you be able to explain. thanks.
whereagles
Posts: 565
Joined: Thu Nov 13, 2014 12:03 pm

Re: Stockfish Natural TB loses heavily to Stockfish master

Post by whereagles »

hmmm.. to alternate natural TB/normal TB, does one need to have two TB sets installed?
Damir
Posts: 2801
Joined: Mon Feb 11, 2008 3:53 pm
Location: Denmark
Full name: Damir Desevac

Re: Stockfish Natural TB loses heavily to Stockfish master

Post by Damir »

I have all my syzygy 6 men stored in 1 file called C:\syzygy
So far I haven't had any kind of problems.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Stockfish Natural TB loses heavily to Stockfish master

Post by Laskos »

Laskos wrote:
Thanks, later I will check that out with the new Natural.
I tested the new SF Final NTB, I will call it here SF Final2 NTB. On regular 6-men Wins, there seem to be no improvement.

Wins:
1000 games
Suite: Regular 6-men Wins
TC: 0.25s per move
Score of SF Master vs SF Final2 NTB: 501 - 468 - 31 [0.516] 1000
ELO difference: 11.47 +/- 21.20
Finished match

There were no time losses, and SF Final2 NTB manages even to lose 1 game and draw 31 games out of 500 regular 6-men TB Wins at the root. That is a bit worse than before (29 draws), but pretty similar.
Correct pentanomial result is:
ELO difference: 11.47 +/- 3.88

Here are two failures from Win to Draw:

Code: Select all

[Event "?"]
[Site "?"]
[Date "2017.09.06"]
[Round "284"]
[White "SF Final2 NTB"]
[Black "SF Master"]
[Result "1/2-1/2"]
[FEN "1K1R4/1PB5/8/8/1q6/8/4k3/8 w - - 0 1"]
[PlyCount "98"]
[SetUp "1"]
[TimeControl "0.25/move"]

1. Rd6 {+2.53/12 0.28s} Qc4 {-132.79/16 0.25s} 2. Rb6 {+2.61/12 0.26s}
Kf2 {-132.79/15 0.25s} 3. Bd6 {+4.54/12 0.26s} Kg2 {-132.79/17 0.25s}
4. Rb2+ {+3.76/13 0.25s} Kf1 {-132.79/20 0.25s} 5. Rb4 {+3.45/15 0.26s}
Qd3 {-132.79/20 0.25s} 6. Rb6 {+6.87/14 0.25s} Qc2 {-132.79/21 0.25s}
7. Ka7 {+3.49/15 0.26s} Qa4+ {-132.79/20 0.25s} 8. Ra6 {+3.03/15 0.25s}
Qd4+ {-132.79/20 0.25s} 9. Rb6 {+3.49/18 0.25s} Qa1+ {-132.79/22 0.25s}
10. Ra6 {+2.75/17 0.25s} Qd4+ {-132.79/23 0.25s} 11. Ka8 {+2.83/17 0.25s}
Qd5 {-132.79/23 0.25s} 12. Bc5 {+2.93/17 0.26s} Kg2 {-132.79/21 0.25s}
13. Rg6+ {+3.02/16 0.26s} Kf1 {-132.79/20 0.25s} 14. Rd6 {+2.81/18 0.26s}
Qa2+ {-132.79/19 0.25s} 15. Ba7 {+2.87/20 0.25s} Qg2 {-132.79/21 0.25s}
16. Bf2 {+2.87/17 0.26s} Qf3 {-132.79/21 0.25s} 17. Bc5 {+2.72/18 0.26s}
Kg2 {-132.79/20 0.25s} 18. Ka7 {+5.27/18 0.26s} Qf7 {-132.79/19 0.25s}
19. Ra6 {+6.16/17 0.26s} Kh1 {-132.79/20 0.25s} 20. Bd6 {+4.29/16 0.25s}
Qf2+ {-132.79/16 0.25s} 21. Ka8 {+4.34/18 0.25s} Qf3 {-132.79/18 0.25s}
22. Ra5 {+3.14/19 0.26s} Qc6 {-132.79/21 0.25s} 23. Ka7 {+3.06/21 0.26s}
Qd7 {-132.79/23 0.25s} 24. Rd5 {+3.06/23 0.25s} Qf7 {-132.79/22 0.25s}
25. Re5 {+3.06/23 0.25s} Qd7 {-132.79/23 0.25s} 26. Rh5+ {+3.06/23 0.25s}
Kg2 {-132.79/23 0.25s} 27. Rd5 {+3.06/26 0.26s} Qf7 {-132.79/23 0.25s}
28. Ra5 {+3.06/24 0.26s} Qd7 {-132.79/24 0.25s} 29. Rd5 {+2.99/22 0.25s}
Qf7 {-132.79/23 0.25s} 30. Ra5 {+2.95/23 0.25s} Qd7 {-132.79/22 0.25s}
31. Ra6 {0.00/127 0.005s} Qf7 {-0.48/23 0.25s} 32. Ra1 {0.00/127 0.010s}
Qc4 {-0.44/22 0.25s} 33. Ra5 {0.00/22 0.25s} Qd4+ {-0.44/22 0.25s}
34. Bc5 {0.00/127 0.002s} Qd2 {-0.43/20 0.25s} 35. Bb6 {0.00/24 0.25s}
Qd7 {-0.41/19 0.25s} 36. Ra3 {0.00/127 0.005s} Qe7 {-0.38/19 0.25s}
37. Rd3 {0.00/47 0.25s} Qf7 {-0.36/21 0.25s} 38. Ra3 {0.00/127 0.007s}
Qe7 {-0.36/19 0.25s} 39. Rd3 {0.00/47 0.25s} Qf7 {-0.34/19 0.25s}
40. Kb8 {0.00/127 0.003s} Qe6 {-0.26/18 0.25s} 41. Ka7 {0.00/127 0.005s}
Qa2+ {-0.24/17 0.25s} 42. Kb8 {0.00/127 0.001s} Qe6 {-0.24/21 0.25s}
43. Ba5 {0.00/127 0.003s} Qf5 {-0.24/21 0.25s} 44. Rd2+ {0.00/127 0.003s}
Kh1 {-0.24/22 0.25s} 45. Bc7 {0.00/54 0.25s} Qf8+ {-0.22/28 0.25s}
46. Ka7 {0.00/127 0.004s} Qa3+ {-0.20/29 0.25s} 47. Kb8 {0.00/52 0.25s}
Qf8+ {-0.20/38 0.25s} 48. Ka7 {0.00/127 0.001s} Qa3+ {-0.18/39 0.25s}
49. Kb8 {0.00/66 0.26s} Qf8+ {-0.18/127 0.002s, Draw by 3-fold repetition}
1/2-1/2



[Event "?"]
[Site "?"]
[Date "2017.09.06"]
[Round "364"]
[White "SF Final2 NTB"]
[Black "SF Master"]
[Result "1/2-1/2"]
[FEN "8/2R4P/6k1/7r/4KP2/8/8/8 w - - 0 1"]
[PlyCount "124"]
[SetUp "1"]
[TimeControl "0.25/move"]

1. Re7 {+0.42/25 0.25s} Kf6 {-132.79/18 0.25s} 2. Ra7 {0.00/25 0.25s}
Kg6 {-132.79/22 0.25s} 3. Rc7 {+1.31/24 0.25s} Rh2 {-132.79/21 0.25s}
4. Re7 {0.00/26 0.25s} Kf6 {-132.79/23 0.25s} 5. Ra7 {0.00/31 0.25s}
Re2+ {0.00/22 0.25s} 6. Kd3 {0.00/127 0.001s} Rh2 {0.00/28 0.25s}
7. Ra6+ {0.00/117 0.25s} Kf5 {0.00/21 0.25s} 8. Ra7 {0.00/108 0.25s}
Kxf4 {0.00/27 0.25s} 9. Kd4 {0.00/127 0.002s} Kf5 {0.00/31 0.25s}
10. Kd5 {0.00/127 0.004s} Kg5 {0.00/32 0.25s} 11. Ke5 {0.00/127 0.003s}
Kg6 {0.00/35 0.25s} 12. Ra6+ {0.00/127 0.14s} Kxh7 {0.00/21 0.25s}
13. Ra7+ {0.00/127 0.040s} Kg6 {0.00/24 0.25s} 14. Ra6+ {0.00/127 0.032s}
Kh7 {0.00/25 0.25s} 15. Ra7+ {0.00/127 0.004s} Kg6 {0.00/27 0.25s}
16. Ra6+ {0.00/127 0.004s} Kg5 {0.00/29 0.25s} 17. Ra7 {0.00/127 0.021s}
Kg4 {0.00/26 0.25s} 18. Rg7+ {0.00/127 0.020s} Kf3 {0.00/31 0.25s}
19. Rf7+ {0.00/127 0.026s} Ke2 {0.00/28 0.25s} 20. Kd4 {0.00/127 0.063s}
Rh6 {0.00/30 0.25s} 21. Re7+ {0.00/127 0.025s} Kf2 {0.00/33 0.25s}
22. Rf7+ {0.00/127 0.033s} Ke2 {0.00/37 0.26s} 23. Re7+ {0.00/127 0.018s}
Kf2 {0.00/38 0.25s} 24. Rf7+ {0.00/127 0.004s} Kg3 {0.00/30 0.25s}
25. Rg7+ {0.00/127 0.024s} Kf3 {0.00/30 0.25s} 26. Rf7+ {0.00/127 0.022s}
Kg4 {0.00/32 0.25s} 27. Rg7+ {0.00/127 0.026s} Kf3 {0.00/33 0.25s}
28. Rf7+ {0.00/127 0.003s} Kg4 {0.00/35 0.25s} 29. Rg7+ {0.00/127 0.004s}
Kf5 {0.00/31 0.25s} 30. Rf7+ {0.00/127 0.023s} Kg6 {0.00/32 0.25s}
31. Rf1 {0.00/127 0.014s} Rh2 {0.00/34 0.25s} 32. Rg1+ {0.00/127 0.036s}
Kf5 {0.00/34 0.25s} 33. Rf1+ {0.00/127 0.020s} Kg6 {0.00/37 0.25s}
34. Rg1+ {0.00/127 0.003s} Kf5 {0.00/37 0.25s} 35. Rf1+ {0.00/127 0.003s}
Ke6 {0.00/34 0.25s} 36. Re1+ {0.00/127 0.024s} Kd6 {0.00/31 0.25s}
37. Ra1 {0.00/127 0.025s} Ke7 {0.00/30 0.25s} 38. Ra7+ {0.00/127 0.035s}
Kd6 {0.00/33 0.25s} 39. Ra6+ {0.00/127 0.030s} Kc7 {0.00/35 0.25s}
40. Ra7+ {0.00/127 0.037s} Kc6 {0.00/34 0.25s} 41. Ra6+ {0.00/127 0.029s}
Kc7 {0.00/37 0.25s} 42. Ra7+ {0.00/127 0.005s} Kb6 {0.00/34 0.25s}
43. Ra1 {0.00/127 0.060s} Kb5 {0.00/34 0.25s} 44. Rb1+ {0.00/127 0.026s}
Kc6 {0.00/36 0.25s} 45. Rc1+ {0.00/127 0.018s} Kd6 {0.00/35 0.25s}
46. Rd1 {0.00/127 0.013s} Rh7 {0.00/31 0.25s} 47. Kc3+ {0.00/127 0.006s}
Kc5 {0.00/32 0.25s} 48. Ra1 {0.00/127 0.019s} Kd6 {0.00/28 0.25s}
49. Rd1+ {0.00/127 0.010s} Kc5 {0.00/33 0.25s} 50. Rc1 {0.00/127 0.003s}
Kd5 {0.00/22 0.25s} 51. Rd1+ {0.00/127 0.008s} Ke6 {0.00/26 0.25s}
52. Re1+ {0.00/127 0.016s} Kf5 {0.00/21 0.25s} 53. Rf1+ {0.00/127 0.020s}
Kg4 {0.00/19 0.25s} 54. Ra1 {0.00/127 0.036s} Rh2 {0.00/28 0.25s}
55. Ra4+ {0.00/127 0.009s} Kf5 {0.00/34 0.25s} 56. Ra5+ {0.00/127 0.022s}
Kf4 {0.00/39 0.25s} 57. Ra8 {0.00/127 0.017s} Rh3+ {0.00/37 0.25s}
58. Kc4 {0.00/127 0.002s} Kf5 {0.00/38 0.25s} 59. Ra5+ {0.00/127 0.017s}
Kg6 {0.00/49 0.25s} 60. Ra1 {0.00/127 0.041s} Rh4+ {0.00/67 0.25s}
61. Kb3 {0.00/127 0.001s} Kf6 {0.00/108 0.25s} 62. Ra6+ {0.00/127 0.004s}
Ke5 {0.00/127 0.001s, Draw by fifty moves rule} 1/2-1/2
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Stockfish Natural TB loses heavily to Stockfish master

Post by Laskos »

On 5-men regular Wins, it seems to perform a bit better than the first version.

Wins:
1000 games
Suite: Regular 5-men Wins
TC: 0.25s per move
Score of SF Master vs SF Final2 NTB: 500 - 496 - 4 [0.502] 1000
ELO difference: 1.39 +/- 21.49
Finished match

4 failures out of 500 5-men Wins.

Here are 2 failures to convert:

Code: Select all

[Event "?"]
[Site "?"]
[Date "2017.09.06"]
[Round "84"]
[White "SF Final2 NTB"]
[Black "SF Master"]
[Result "1/2-1/2"]
[FEN "4r3/8/1R6/8/5K2/4P2k/8/8 w - - 0 1"]
[PlyCount "101"]
[SetUp "1"]
[TimeControl "0.25/move"]

1. Rf6 {+127.97/20 0.25s} Rb8 {-132.79/16 0.25s} 2. e4 {+132.74/19 0.25s}
Rb4 {-132.79/17 0.25s} 3. Rh6+ {+85.56/19 0.26s} Kg2 {-132.79/18 0.25s}
4. Rg6+ {+132.76/19 0.26s} Kh3 {-132.79/19 0.25s} 5. Rh6+ {+132.60/20 0.25s}
Kg2 {-132.79/19 0.25s} 6. Rg6+ {+130.20/20 0.25s} Kf2 {-132.79/19 0.25s}
7. Ra6 {+122.74/22 0.25s} Ke2 {-132.79/17 0.25s} 8. Ra2+ {+132.69/21 0.25s}
Kd3 {-132.79/18 0.25s} 9. Ra3+ {+82.82/19 0.25s} Kc4 {-132.79/16 0.25s}
10. Ra1 {+2.09/21 0.25s} Rb2 {-132.79/17 0.25s} 11. Rc1+ {+8.41/23 0.25s}
Kb5 {-132.79/19 0.25s} 12. Kf5 {+4.53/23 0.25s} Rf2+ {-132.79/20 0.25s}
13. Ke6 {+4.78/27 0.25s} Ka4 {-132.79/18 0.25s} 14. e5 {+132.67/27 0.25s}
Ka5 {-132.79/19 0.25s} 15. Rd1 {+132.70/18 0.25s} Kb5 {-132.79/18 0.25s}
16. Re1 {+132.70/18 0.25s} Kc6 {-132.79/21 0.25s} 17. Rc1+ {+132.70/19 0.25s}
Kb7 {-132.79/24 0.25s} 18. Rh1 {+132.74/19 0.25s} Re2 {-132.79/20 0.25s}
19. Kd6 {+32.33/21 0.26s} Rd2+ {-132.79/20 0.25s} 20. Ke7 {+32.34/19 0.25s}
Kc6 {-132.79/17 0.25s} 21. Rh6+ {+48.84/20 0.25s} Kc7 {-132.79/17 0.25s}
22. Rh1 {+18.07/18 0.25s} Rd7+ {-132.79/18 0.25s} 23. Kf6 {+32.32/20 0.25s}
Rd2 {-132.79/19 0.25s} 24. Rh6 {+80.24/18 0.26s} Re2 {-132.79/19 0.25s}
25. Rh1 {0.00/23 0.25s} Kd7 {0.00/29 0.25s} 26. Rd1+ {0.00/127 0.057s}
Ke8 {0.00/34 0.25s} 27. Ke6 {0.00/127 0.051s} Rg2 {0.00/23 0.25s}
28. Kd5 {0.00/127 0.023s} Ra2 {0.00/29 0.25s} 29. Rh1 {0.00/127 0.023s}
Ra6 {0.00/35 0.25s} 30. Rh8+ {0.00/127 0.012s} Kd7 {0.00/35 0.25s}
31. e6+ {0.00/125 0.25s} Ke7 {0.00/29 0.25s} 32. Rh7+ {0.00/111 0.25s}
Ke8 {0.00/33 0.25s} 33. Rh4 {0.00/127 0.14s} Ke7 {0.00/35 0.25s}
34. Rh7+ {0.00/40 0.25s} Ke8 {0.00/37 0.25s} 35. e7 {0.00/127 0.019s}
Ra1 {0.00/34 0.25s} 36. Rh8+ {0.00/108 0.26s} Kxe7 {0.00/27 0.25s}
37. Kc4 {0.00/127 0.041s} Rc1+ {0.00/27 0.25s} 38. Kb4 {0.00/127 0.001s}
Kd7 {0.00/28 0.25s} 39. Rh7+ {0.00/127 0.036s} Ke6 {0.00/31 0.25s}
40. Ra7 {0.00/127 0.029s} Re1 {0.00/28 0.25s} 41. Ra6+ {0.00/127 0.038s}
Kd5 {0.00/25 0.25s} 42. Ra5+ {0.00/127 0.027s} Kd4 {0.00/28 0.25s}
43. Kb5 {0.00/127 0.027s} Re5+ {0.00/29 0.25s} 44. Kb4 {0.00/127 0.003s}
Re1 {0.00/30 0.25s} 45. Ra4 {0.00/127 0.003s} Rb1+ {0.00/28 0.25s}
46. Ka3+ {0.00/127 0.001s} Kc3 {0.00/29 0.25s} 47. Ka2 {0.00/127 0.093s}
Re1 {0.00/33 0.25s} 48. Ra3+ {0.00/127 0.010s} Kb4 {0.00/33 0.25s}
49. Rb3+ {0.00/127 0.013s} Kc4 {0.00/36 0.25s} 50. Rb1 {0.00/127 0.011s}
Rxb1 {0.00/35 0.25s}
51. Kxb1 {0.00/127 0.011s, Draw by insufficient mating material} 1/2-1/2



[Event "?"]
[Site "?"]
[Date "2017.09.06"]
[Round "156"]
[White "SF Final2 NTB"]
[Black "SF Master"]
[Result "1/2-1/2"]
[FEN "1r6/8/4K3/8/3P4/7R/8/3k4 w - - 0 1"]
[PlyCount "26"]
[SetUp "1"]
[TimeControl "0.25/move"]

1. Rh1+ {+132.68/17 0.25s} Kc2 {-132.79/17 0.25s} 2. Rh2+ {+132.69/19 0.25s}
Kb3 {-132.79/17 0.25s} 3. Rh5 {+3.33/18 0.26s} Kc4 {-132.79/17 0.25s}
4. d5 {+132.70/21 0.25s} Kc5 {-132.79/19 0.25s} 5. d6+ {0.00/17 0.25s}
Kc6 {-132.79/22 0.25s} 6. Rh1 {0.00/18 0.25s} Re8+ {0.00/15 0.25s}
7. Kf7 {0.00/127 0.003s} Kd7 {0.00/19 0.25s} 8. Rh6 {0.00/127 0.018s}
Re1 {0.00/23 0.25s} 9. Kf8 {0.00/127 0.014s} Rf1+ {0.00/23 0.25s}
10. Kg8 {0.00/127 0.004s} Rg1+ {0.00/24 0.25s} 11. Kf7 {0.00/127 0.005s}
Re1 {0.00/32 0.25s} 12. Kf8 {0.00/127 0.002s} Re8+ {0.00/36 0.25s}
13. Kf7 {0.00/127 0.001s} Re1 {0.00/58 0.25s, Draw by 3-fold repetition} 1/2-1/2
tpoppins
Posts: 919
Joined: Tue Nov 24, 2015 9:11 pm
Location: upstate

Re: Stockfish Natural TB loses heavily to Stockfish master

Post by tpoppins »

duncan wrote:do not understand the difference between Sf NTB and "early mate". would you be able to explain. thanks.
Natural TB is this.
Early_mate is a branch of SF by Ronald, now available as a patch:
syzygy wrote: I have updated the patch to current SF master:
The patch: https://github.com/syzygy1/Stockfish/co ... 53730caf9d
The branch: https://github.com/syzygy1/Stockfish/tree/early_mate

By design, current SF will never find a mate if the root position is not in the TBs and the path to mate enters the TBs.

This patch changes this behaviour. If it makes sense (as indicated by the values of alpha and beta), SF will continue to look for a mate after finding a TB win or loss within the search tree. If a mate score is found, it is returned. Otherwise, the TB win or loss score is returned.
An example of what it does was posted on the previous page of this thread (look at the differences in the score, time and depth):
syzygy wrote: Extreme example:
[D]kb6/b7/8/8/8/3K1p2/8/1R1B4 w - - 0 1

Stockfish-master:

Code: Select all

info depth 1 seldepth 2 multipv 1 score cp 13279 nodes 22 nps 11000 tbhits 2 time 2 pv d1f3
info depth 2 seldepth 2 multipv 1 score cp 13279 nodes 45 nps 15000 tbhits 4 time 3 pv d1f3
info depth 3 seldepth 2 multipv 1 score cp 13279 nodes 64 nps 21333 tbhits 5 time 3 pv d1f3
info depth 4 seldepth 2 multipv 1 score cp 13279 nodes 83 nps 27666 tbhits 6 time 3 pv d1f3
info depth 5 seldepth 2 multipv 1 score cp 13279 nodes 102 nps 34000 tbhits 7 time 3 pv d1f3
...
info depth 127 seldepth 2 multipv 1 score cp 13279 nodes 90711881 nps 2955073 hashfull 999 tbhits 3487429 time 30697 pv d1f3
Stockfish-early_mate:

Code: Select all

info depth 1 seldepth 2 multipv 1 score mate 1 nodes 22 nps 11000 tbhits 2 time 2 pv d1f3
info depth 2 seldepth 2 multipv 1 score mate 1 nodes 41 nps 20500 tbhits 3 time 2 pv d1f3
info depth 3 seldepth 2 multipv 1 score mate 1 nodes 60 nps 30000 tbhits 4 time 2 pv d1f3
info depth 4 seldepth 2 multipv 1 score mate 1 nodes 79 nps 39500 tbhits 5 time 2 pv d1f3
info depth 5 seldepth 2 multipv 1 score mate 1 nodes 98 nps 49000 tbhits 6 time 2 pv d1f3
...
info depth 127 seldepth 2 multipv 1 score mate 1 nodes 2416 nps 402666 tbhits 128 time 6 pv d1f3

whereagles wrote:hmmm.. to alternate natural TB/normal TB, does one need to have two TB sets installed?
The difference is in the probing algorithm; so no, you don't need two TB sets installed.