Nalimov EGTB problem related to DTM?

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
Laskos
Posts: 9414
Joined: Wed Jul 26, 2006 8:21 pm
Full name: Kai Laskos

Re: Nalimov EGTB problem related to DTM?

Post by Laskos » Sun Feb 14, 2016 9:20 pm

bob wrote:
Laskos wrote:Very illuminating, I had very vague clues on these issues. If my file of general 5-men wins with "perfect play" is not flawed, it seems Nalimov fails to convert in about 6% of cases with these positions at the root, which is a lot. When I selected harder wins, the percentage went to 20%. For some reasons I thought egtbs using DTM fail to convert from the root in few freak cases only.
DTM handles mate in <= 50 perfectly. For longer mates, they can lead to a draw. DTZ tries to zero the 50 move counter ASAP to avoid that problem, which generally extends the mates but makes them winnable.
Until I tested, I was not aware of the magnitude of the problem with "solely DTM". While I knew that DTM is fine for mate in 50 moves and less, the problem is probably accentuated for 6-men egtbs and further to 7-men compared to 5-men. Then, it propagates unpleasantly to more pieces than available egtbs, Houdini Syzygy beats convincingly Houdini Nalimov on 6-men wins with 5-men egtbs available. Also, Ronald's example of how to win from a theoretically drawn egtb position is illustrative.

MikeB
Posts: 3393
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: Nalimov EGTB problem related to DTM?

Post by MikeB » Sun Feb 14, 2016 10:21 pm

Laskos wrote:
bob wrote:
Laskos wrote:
velmarin wrote:Syzygy website gives different moves to mate
https://syzygy-tables.info/?fen=8/4K3/8 ... 0-%200%201
Lomosov site coincides with Nalimov.
Although the capture of the horse, is move 52.
Therefore Nalimov shows a draw (if claimed).
For me Nalimov shows the knight being captures on move 46:

White(1): 8/4K3/8/4B1n1/B7/8/5k2/8 w - - 0 1
White(1): egtb
1. Bf4! Nh3 2. Bh6 Ng1! 3. Kf6 Nf3! 4. Kf5! Ne1 5. Bf8 Nd3 6. Ke4!
Ne1! 7. Bc5+ Kg3! 8. Bb6 Ng2! 9. Bd1! Ne1 10. Ke3! Ng2+! 11. Kd2!
Kf4! 12. Ke2! Kf5! 13. Bc2+! Ke6! 14. Bb3+! Kf5 15. Kf3! Nh4+! 16.
Kf2! Ng6! 17. Bc2+! Kf6! 18. Bd8+! Kf7! 19. Ke3! Ne7! 20. Bb3+! Ke8!
21. Bc7! Kd7! 22. Bf4! Kc6! 23. Kd4! Nf5+ 24. Ke5! Nd6! 25. Bd5+!
Kd7! 26. Bg3! Ke7! 27. Bb3! Nf7+! 28. Ke4! Nd6+! 29. Kd5! Ne8! 30.
Ke5! Nd6! 31. Bh4+! Kd7! 32. Kd5! Nf7! 33. Ba4+! Kc7! 34. Kc5! Kc8!
35. Bg3 Kd8! 36. Kd5! Ke7! 37. Bh4+! Kf8! 38. Bf6 Nh6 39. Ke6! Ng4
40. Bb2! Nh6! 41. Bd1! Ng8! 42. Bh5! Nh6! 43. Kf6! Ng8+! 44. Kg6!
Ke7 45. Kg7! Nf6 46. Bxf6+! Ke6! 47. Bg6 Kd5 48. Kf7! Kc5 49. Be4
Kb4 50. Bd3! Ka3 51. Bc3 Ka2 52. Bc4+ Kb1 53. Bb3! Kc1 54. Ke7 Kb1
55. Kd6! Kc1 56. Kc5! Kb1 57. Kb4! Kc1 58. Ka3! Kb1 59. Bd2! Ka1
60. Bg8 Kb1 61. Bh7+! Ka1 62. Bc3#

The moves with ! following them are singular best moves and any other move extends the mate in 62 further.
Can you try an engine with 3-4-5-men Nalimov as white against Stockfish with 3-4-5-men Syzygy as black? My guess is that the losing side (black) doesn't defend optimally using Nalimov (or not using egtb at all).
Kai, my tests show you are correct. Although Crafty shows mate and it will score a mate against another Nalimov engine, it does not covert the win against a Syzygy engine - tried both Stockfish and Komodo. Conversely , both Stockfish and Komodo will score the win against Crafty and against each other.

[pgn][Event "Computer Chess Game"]
[Site "Mac-Pro.local"]
[Date "2016.02.14"]
[Round "-"]
[White "Stockfish 7"]
[Black "Komodo 9.3"]
[Result "1-0"]
[TimeControl "15+0"]
[FEN "8/4K3/8/4B1n1/B7/8/5k2/8 w - - 0 1"]
[SetUp "1"]

{--------------
. . . . . . . .
. . . . K . . .
. . . . . . . .
. . . . B . n .
B . . . . . . .
. . . . . . . .
. . . . . k . .
. . . . . . . .
white to play
--------------}
1. Bf4 {+123.53/1} Ne4 {-80.00/18 0.3} 2. Bc6 {+123.53/1 0.1} Nc3
{+0.00/5 0.1} 3. Be5 {+123.53/1 0.1} Nb1 {+0.00/5 0.1} 4. Ke6
{+123.53/17 0.2} Nd2 {+0.00/5 0.1} 5. Bd4+ {+123.53/1 0.1} Kg3
{+0.00/5 0.1} 6. Kf5 {+123.53/1 0.1} Nf3 {+0.00/5 0.1} 7. Bb6
{+123.53/1 0.1} Nh4+ {+0.00/5 0.1} 8. Ke4 {+123.53/1 0.1} Ng2 {+0.00/5 0.1}
9. Bd5 {+123.53/20 0.2} Nh4 {+0.00/5 0.1} 10. Bc7+ {+123.53/24 0.2} Kf2
{+0.00/5 0.1} 11. Kd3 {+123.53/1 0.1} Ng2 {+0.00/5 0.1} 12. Kd2
{+123.53/1 0.1} Nh4 {+0.00/5 0.1} 13. Bb6+ {+123.53/1 0.1} Kg3
{+0.00/5 0.1} 14. Ke2 {+123.53/1 0.1} Kf4 {+0.00/5 0.1} 15. Bc7+
{+123.53/21 0.3} Kf5 {+0.00/5 0.1} 16. Ke3 {+123.53/22 0.1} Ng6
{+0.00/5 0.1} 17. Be4+ {+123.53/21 0.3} Kf6 {+0.00/5 0.1} 18. Bb1
{+123.53/1 0.1} Ne7 {-80.00/19 0.4} 19. Ke4 {+123.53/1 0.1} Ke6
{+0.00/5 0.1} 20. Be5 {+123.53/1 0.1} Nc6 {+0.00/5 0.1} 21. Bh2
{+123.53/21 0.3} Ne7 {-80.00/21 0.4} 22. Ba2+ {+123.53/1 0.1} Kd7
{+0.00/5 0.1} 23. Bf7 {+123.53/1 0.1} Nc8 {+0.00/5 0.1} 24. Ke5
{+123.53/21 0.3} Nd6 {+0.00/5 0.1} 25. Bb3 {+123.53/1 0.1} Kc6
{+0.00/5 0.1} 26. Bd5+ {+123.53/1 0.1} Kd7 {+0.00/5 0.1} 27. Bg3
{+123.53/1 0.1} Ke7 {+0.00/5 0.1} 28. Bb3 {+123.53/1 0.1} Nf7+
{+0.00/5 0.1} 29. Ke4 {+123.53/1 0.1} Nd6+ {+0.00/5 0.1} 30. Kd5
{+123.53/1 0.1} Nf5 {-80.00/18 0.2} 31. Be1 {+123.53/1 0.1} Kf6
{-80.00/17 0.2} 32. Bc3+ {+123.53/1 0.1} Kg6 {+0.00/5 0.1} 33. Bc2
{+123.53/1 0.1} Kg5 {+0.00/5 0.1} 34. Ke5 {+123.53/1 0.1} Nh6 {+0.00/5 0.1}
35. Bd2+ {+123.53/25 1.5} Kh5 {+0.00/5 0.1} 36. Bd1+ {+123.53/22 1.0} Kg6
{+0.00/5 0.1} 37. Ke6 {+123.53/1 0.1} Ng8 {+0.00/5 0.1} 38. Ba4
{+123.53/21 1.7} Nh6 {-80.00/21 0.7} 39. Be3 {+123.53/1 0.1} Ng4
{-80.00/17 0.2} 40. Be8+ {+123.53/1 0.1} Kh7 {+0.00/5 0.1} 41. Bc5
{+123.53/20 3} Kg7 {+0.00/5 0.2} 42. Bd4+ {+123.53/1 0.1} Kh7 {+0.00/5 0.1}
43. Bh5 {+123.53/1 0.1} Nh6 {+0.00/5 0.1} 44. Kf6 {+123.53/1 0.1} Ng8+
{+0.00/5 0.1} 45. Kg5 {+123.53/1 0.1} Ne7 {+0.00/5 0.1} 46. Bf3
{+123.53/1 0.1} Kg8 {+0.00/5 0.1} 47. Kf6 {+123.53/1 0.1} Nc8 {+0.00/5 0.1}
48. Bc5 {+123.53/1 0.1} Kh7 {-99.68/19 0.1} 49. Bg4 {+99.85/37 0.3} Kh6
{-99.86/21 0.1} 50. Bxc8 {+99.87/1 0.1} Kh5 {-99.88/22 0.1} 51. Bf2
{+99.89/39 0.3} Kh6 {+0.00/5 0.1} 52. Bg4 {+99.91/44 0.1} Kh7 {+0.00/5 0.1}
53. Kf7 {+99.93/127 0.2} Kh6 {-99.94/99 0.1} 54. Be3+ {+99.95/127 0.1} Kh7
{+0.00/5 0.1} 55. Bf5+ {+99.97/127 0.1} Kh8 {+0.00/5 0.1} 56. Bd4#
{+99.99/127 0.1}
{Xboard adjudication: Checkmate} 1-0[/pgn]

[pgn][Event "Computer Chess Game"]
[Site "Mac-Pro.local"]
[Date "2016.02.14"]
[Round "-"]
[White "Crafty v25.0.1"]
[Black "Crafty v25.0.1"]
[Result "1-0"]
[TimeControl "15+0"]
[FEN "8/4K3/8/4B1n1/B7/8/5k2/8 w - - 0 1"]
[SetUp "1"]

{--------------
. . . . . . . .
. . . . K . . .
. . . . . . . .
. . . . B . n .
B . . . . . . .
. . . . . . . .
. . . . . k . .
. . . . . . . .
white to play
--------------}
1. Bf4 {+326.44/17} Nh3 {+326.45/17 0.1} 2. Bh6 {+326.46/17 0.1} Ng1
{+326.47/17 0.1} 3. Kf6 {+326.48/17 0.1} Nf3 {+326.49/17 0.1} 4. Kf5
{+326.50/17 0.1} Ne1 {+326.51/17 0.1} 5. Bg5 {+326.52/17 0.1} Ng2
{+326.53/17 0.1} 6. Bd8 {+326.54/17 0.1} Kf3 {+326.55/17 0.1} 7. Bc6+
{+326.56/17 0.1} Kg3 {+326.57/17 0.1} 8. Bc7+ {+326.58/17 0.1} Kf2
{+326.59/17 0.1} 9. Be4 {+326.60/17 0.1} Ne1 {+326.61/17 0.1} 10. Bb6+
{+326.62/17 0.1} Kg3 {+326.63/17 0.1} 11. Bd5 {+326.64/17 0.1} Ng2
{+326.65/17 0.1} 12. Kg5 {+326.66/17 0.1} Ne1 {+326.67/17 0.1} 13. Bc7+
{+326.68/17 0.1} Kf2 {+326.69/17 0.1} 14. Kg4 {+326.70/17 0.1} Ke3
{+326.71/17 0.1} 15. Bb6+ {+326.72/17 0.1} Kd3 {+326.73/17 0.1} 16. Bf7
{+326.74/17 0.1} Nc2 {+326.75/17 0.1} 17. Bg6+ {+326.76/17 0.1} Kc3
{+326.77/17 0.1} 18. Ba5+ {+326.78/17 0.1} Kb3 {+326.79/17 0.1} 19. Kf4
{+326.80/17 0.1} Nb4 {+326.81/17 0.1} 20. Bf7+ {+326.82/17 0.1} Ka4
{+326.83/17 0.1} 21. Bb6 {+326.84/17 0.1} Kb5 {+326.85/17 0.1} 22. Be3
{+326.86/17 0.1} Kc6 {+326.87/17 0.1} 23. Ke5 {+326.88/17 0.1} Kb5
{+326.89/17 0.1} 24. Bg1 {+326.90/17 0.1} Nd3+ {+326.91/17 0.1} 25. Kd4
{+326.92/17 0.1} Nc5 {+326.93/17 0.1} 26. Bf2 {+326.94/17 0.1} Kc6
{+326.95/17 0.1} 27. Bd5+ {+326.96/17 0.1} Kb5 {+326.97/17 0.1} 28. Bf3
{+326.98/17 0.1} Nd7 {+326.99/17 0.1} 29. Bg3 {+327.00/17 0.1} Nf6
{+327.01/17 0.1} 30. Bd1 {+327.02/17 0.1} Nd7 {+327.03/17 0.1} 31. Bh5
{+327.04/17 0.1} Kb6 {+327.05/17 0.1} 32. Kc4 {+327.06/17 0.1} Nf6
{+327.07/17 0.1} 33. Bf3 {+327.08/17 0.1} Ng8 {+327.09/17 0.1} 34. Bh4
{+327.10/17 0.1} Kc7 {+327.11/17 0.1} 35. Kd5 {+327.12/17 0.1} Kd7
{+327.13/17 0.1} 36. Bg4+ {+327.14/17 0.1} Ke8 {+327.15/17 0.1} 37. Ke6
{+327.16/17 0.1} Kf8 {+327.17/17 0.1} 38. Bg5 {+327.18/17 0.1} Kg7
{+327.19/17 0.1} 39. Bh5 {+327.20/17 0.1} Kf8 {+327.21/17 0.1} 40. Bf4
{+327.22/17 0.1} Kg7 {+327.23/17 0.1} 41. Be5+ {+327.24/17 0.1} Kf8
{+327.25/17 0.1} 42. Bb2 {+327.26/17 0.1} Nh6 {+327.27/17 0.1} 43. Kf6
{+327.28/17 0.1} Ng8+ {+327.29/17 0.1} 44. Kg6 {+327.30/17 0.1} Ke7
{+327.31/17 0.1} 45. Kg7 {+327.32/17 0.1} Kd6 {+327.33/17 0.1} 46. Kxg8
{+327.34/17 0.1} Kd5 {+327.35/17 0.1} 47. Kf7 {+327.36/17 0.1} Ke4
{+327.37/17 0.1} 48. Ke6 {+327.38/17 0.1} Kd3 {+327.39/17 0.1} 49. Bg6+
{+327.40/17 0.1} Ke3 {+327.41/17 0.1} 50. Ke5 {+327.42/17 0.1} Kf3
{+327.43/17 0.1} 51. Be4+ {+327.44/17 0.1} Ke3 {+327.45/17 0.1} 52. Bc1+
{+327.46/17 0.1} Ke2 {+327.47/17 0.1} 53. Kf4 {+327.48/17 0.1} Kd1
{+327.49/17 0.1} 54. Be3 {+327.50/17 0.1} Ke2 {+327.51/17 0.1} 55. Bf5
{+327.52/17 0.1} Ke1 {+327.53/17 0.1} 56. Bg4 {+327.54/17 0.1} Kf1
{+327.55/10 0.1} 57. Kg3 {+327.56/15 0.1} Ke1 {+327.57/10 0.1} 58. Bh6
{+327.58/13 0.1} Kf1 {+327.59/10 0.1} 59. Bd2 {+327.60/11 0.1} Kg1
{+327.61/10 0.1} 60. Bh3 {+327.62/9 0.1} Kh1 {+327.63/10 0.1} 61. Bg2+
{+327.64/7 0.1} Kg1 {+327.65/10 0.1} 62. Be3# {+327.66/5 0.1}
{Xboard adjudication: Checkmate} 1-0[/pgn]

[pgn][Event "Computer Chess Game"]
[Site "Mac-Pro.local"]
[Date "2016.02.14"]
[Round "-"]
[White "Crafty v25.0.1"]
[Black "Komodo 9.3"]
[Result "1/2-1/2"]
[TimeControl "15+0"]
[FEN "8/4K3/8/4B1n1/B7/8/5k2/8 w - - 0 1"]
[SetUp "1"]

{--------------
. . . . . . . .
. . . . K . . .
. . . . . . . .
. . . . B . n .
B . . . . . . .
. . . . . . . .
. . . . . k . .
. . . . . . . .
white to play
--------------}
1. Bf4 {+326.44/17} Ne4 {-80.00/18 0.3} 2. Bc6 {+326.46/17 0.1} Nc3
{+0.00/5 0.1} 3. Be5 {+326.48/17 0.1} Nb1 {+0.00/5 0.1} 4. Ke6
{+326.50/17 0.1} Nd2 {+0.00/5 0.1} 5. Bd4+ {+326.52/17 0.1} Kg3
{+0.00/5 0.1} 6. Kf5 {+326.54/17 0.1} Nf3 {+0.00/5 0.1} 7. Bb6
{+326.56/17 0.1} Nh4+ {+0.00/5 0.1} 8. Ke4 {+326.58/17 0.1} Ng2
{+0.00/5 0.1} 9. Bd5 {+326.60/17 0.1} Nh4 {+0.00/5 0.1} 10. Bc7+
{+326.62/17 0.1} Kf2 {+0.00/5 0.1} 11. Kd3 {+326.64/17 0.1} Ng2
{+0.00/5 0.1} 12. Kd2 {+326.66/17 0.1} Nh4 {+0.00/5 0.1} 13. Bb6+
{+326.68/17 0.1} Kg3 {+0.00/5 0.1} 14. Ke2 {+326.70/17 0.1} Kf4
{+0.00/5 0.1} 15. Bc7+ {+326.72/17 0.1} Kf5 {+0.00/5 0.1} 16. Bb3
{+326.74/17 0.1} Ng6 {+0.00/5 0.1} 17. Bc2+ {+326.76/17 0.1} Kf6
{+0.00/5 0.1} 18. Bd8+ {+326.78/17 0.1} Kf7 {+0.00/5 0.1} 19. Ke3
{+326.80/17 0.1} Ne7 {+0.00/5 0.1} 20. Bb3+ {+326.82/17 0.1} Ke8
{+0.00/5 0.1} 21. Bc7 {+326.84/17 0.1} Kd7 {+0.00/5 0.1} 22. Bf4
{+326.86/17 0.1} Kc6 {+0.00/5 0.1} 23. Kd4 {+326.88/17 0.1} Kd7
{+0.00/5 0.1} 24. Bh2 {+326.90/17 0.1} Nf5+ {+0.00/5 0.1} 25. Ke5
{+326.92/17 0.1} Nd6 {+0.00/5 0.1} 26. Bg3 {+326.94/17 0.1} Kc6
{+0.00/5 0.1} 27. Bd5+ {+326.96/17 0.1} Kd7 {+0.00/5 0.1} 28. Bf3
{+326.98/17 0.1} Nb5 {+0.00/5 0.1} 29. Bf2 {+327.00/17 0.1} Nc3
{+0.00/5 0.1} 30. Bh5 {+327.02/17 0.1} Nb5 {+0.00/5 0.1} 31. Bd1
{+327.04/17 0.1} Kc7 {+0.00/5 0.1} 32. Ke6 {+327.06/17 0.1} Nc3
{+0.00/5 0.1} 33. Bf3 {+327.08/17 0.1} Na2 {+0.00/5 0.1} 34. Be1
{+327.10/17 0.1} Kb6 {+0.00/5 0.1} 35. Kd5 {+327.12/17 0.1} Kb5
{+0.00/5 0.1} 36. Be2+ {+327.14/17 0.1} Ka4 {+0.00/5 0.1} 37. Kc4
{+327.16/17 0.1} Ka3 {+0.00/5 0.1} 38. Bd1 {+327.18/17 0.1} Kb2
{+0.00/5 0.1} 39. Bd2 {+327.20/17 0.1} Ka3 {-0.48/18 0.2} 40. Bh6
{+327.22/17 0.1} Kb2 {+0.00/5 0.1} 41. Bg7+ {+327.24/17 0.1} Kb1
{-0.48/16 0.7} 42. Kb3 {+327.30/17 0.1} Nc1+ {+0.00/5 0.1} 43. Kc3
{+327.32/17 0.1} Na2+ {+0.00/5 0.1} 44. Kd2 {+327.34/17 0.1} Nb4
{+0.00/5 0.1} 45. Bf3 {+327.36/17 0.1} Na6 {+0.00/5 0.1} 46. Be4+
{+327.40/17 0.1} Ka2 {+0.00/5 0.1} 47. Kc3 {+327.42/17 0.1} Nc5
{+0.00/5 0.1} 48. Bc6 {+327.44/17 0.1} Kb1 {+0.00/5 0.1} 49. Bd4
{+327.46/17 0.1} Ne6 {+0.00/5 0.1} 50. Be3 {+327.54/17 0.1} Nc7
{-0.46/99 0.1}
{Draw by fifty-move rule} 1/2-1/2[/pgn]

syzygy
Posts: 4451
Joined: Tue Feb 28, 2012 10:56 pm

Re: Nalimov EGTB problem related to DTM?

Post by syzygy » Sun Feb 14, 2016 10:32 pm

bob wrote:
syzygy wrote:
bob wrote:I am not sure what the problem is here. I tested this position a hundred times against multiple opponents and never saw a loss or draw by any program for the winning side. The knight is captured well before the 50 move rule limit with optimal play
I don't know what you call optimal play, but black can postpone the knight's capture until the49th move.

So the position is won for white under the 50-move rule, but white needs to play carefully and merely following Nalimov might be insufficient.
I call "optimal play" playing the sequence of moves that leads to the shortest possible mate. DTZ handles the 50 move rule where DTM currently does not, of course. But here 50 move is irrelevant. If black tries to postpone the knight loss, he gets mated even quicker however.
Apparently there are lines starting from Kai's position that have DTM-optimal moves by white but do run afoul of the 50-move rule.

And I don't find that surprising given that the position has DTZ=49: white can only afford to lose 1 move in the DTZ-metric. In this respect, your particular DTM-line that has a capture after 46 moves is simply meaningless.

Maybe Kai can give us an example game where white using Nalimov only manages to draw the position.

User avatar
hgm
Posts: 23629
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Nalimov EGTB problem related to DTM?

Post by hgm » Sun Feb 14, 2016 11:10 pm

That the DTM PV does not violate the 50-move rule does not prove a thing, as DTM defense is sub-optimal w.r.t. obtaining draws.

User avatar
Laskos
Posts: 9414
Joined: Wed Jul 26, 2006 8:21 pm
Full name: Kai Laskos

Re: Nalimov EGTB problem related to DTM?

Post by Laskos » Sun Feb 14, 2016 11:20 pm

syzygy wrote:
bob wrote:
syzygy wrote:
bob wrote:I am not sure what the problem is here. I tested this position a hundred times against multiple opponents and never saw a loss or draw by any program for the winning side. The knight is captured well before the 50 move rule limit with optimal play
I don't know what you call optimal play, but black can postpone the knight's capture until the49th move.

So the position is won for white under the 50-move rule, but white needs to play carefully and merely following Nalimov might be insufficient.
I call "optimal play" playing the sequence of moves that leads to the shortest possible mate. DTZ handles the 50 move rule where DTM currently does not, of course. But here 50 move is irrelevant. If black tries to postpone the knight loss, he gets mated even quicker however.
Apparently there are lines starting from Kai's position that have DTM-optimal moves by white but do run afoul of the 50-move rule.

And I don't find that surprising given that the position has DTZ=49: white can only afford to lose 1 move in the DTZ-metric. In this respect, your particular DTM-line that has a capture after 46 moves is simply meaningless.

Maybe Kai can give us an example game where white using Nalimov only manages to draw the position.
Sure, from the discussed position, a game between Shredder 12 Nalimov (3-4-5) against Komodo 9.3 Syzygy (3-4-5). Michael posted it with Crafty 25.01 Nalimov too.

[pgn][Event "?"]
[Site "?"]
[Date "2016.02.14"]
[Round "1"]
[White "Shredder Nalimov"]
[Black "Komodo Syzygy"]
[Result "1/2-1/2"]
[FEN "8/4K3/8/4B1n1/B7/8/5k2/8 w - - 0 1"]
[PlyCount "100"]
[SetUp "1"]
[TimeControl "240+2.399"]

1. Bf4 {+298.77/1 0.041s} Ne4 {-280.00/29 4.0s} 2. Bc6 {+298.79/1 0.026s} Nc3 {0.00/5 0s} 3. Be5 {+298.81/1 0.026s} Nb1 {0.00/5 0s}
4. Ke6 {+298.83/1 0.026s} Nd2 {0.00/5 0s} 5. Bd4+ {+298.85/1 0.026s}
Kg3 {0.00/5 0s} 6. Kf5 {+298.87/1 0.026s} Nf3 {0.00/5 0.006s}
7. Bb6 {+298.89/1 0.026s} Nh4+ {0.00/5 0.004s} 8. Ke4 {+298.91/1 0.026s} Ng2 {0.00/5 0s} 9. Kd3 {+298.93/1 0.026s} Nf4+ {-280.00/30 4.5s} 10. Kd2 {+298.95/1 0.026s} Ng2 {0.00/5 0s} 11. Bc7+ {+298.97/1 0.026s} Kf2 {0.00/5 0s} 12. Bd5 {+298.99/1 0.026s} Nh4 {0.00/5 0s}
13. Bb6+ {+M99/1 0.026s} Kg3 {0.00/5 0s} 14. Ke2 {+M97/1 0.026s} Kf4 {0.00/5 0s} 15. Bb3 {+M95/1 0.026s} Ng6 {0.00/5 0s} 16. Bc7+ {+M93/1 0.021s} Kf5 {0.00/5 0.001s} 17. Bc2+ {+M91/1 0.026s} Kf6 {0.00/5 0s} 18. Bd8+ {+M89/1 0.031s} Kf7 {0.00/5 0.001s} 19. Ke3 {+M87/1 0.026s} Ne7 {0.00/5 0s} 20. Bb3+ {+M85/1 0.026s} Ke8 {0.00/5 0s} 21. Bc7 {+M83/1 0.026s} Kd7 {0.00/5 0s} 22. Bf4 {+M81/1 0.026s} Kc6 {0.00/5 0.001s} 23. Kd4 {+M79/1 0.026s} Kd7 {0.00/5 0s} 24. Bh2 {+M77/1 0.025s} Nf5+ {0.00/5 0.001s} 25. Ke5 {+M75/1 0.026s} Nd6 {0.00/5 0.007s} 26. Bg3 {+M73/1 0.025s} Kc6 {0.00/5 0s} 27. Bd5+ {+M71/1 0.025s} Kd7 {0.00/5 0s} 28. Bf3 {+M69/1 0.025s} Nb5 {0.00/5 0s} 29. Bf2 {+M67/1 0.025s} Nc3 {0.00/5 0s} 30. Bh5 {+M65/1 0.025s} Nb5 {0.00/5 0.001s} 31. Bd1 {+M63/1 0.025s} Kc7 {0.00/5 0s} 32. Ke6 {+M61/1 0.026s} Nc3 {0.00/5 0s} 33. Bf3 {+M59/1 0.025s} Na2 {0.00/5 0.001s} 34. Be1 {+M57/1 0.025s} Kb6 {0.00/5 0s} 35. Kd5 {+M55/1 0.026s} Kb5 {0.00/5 0s} 36. Be2+ {+M53/1 0.026s} Ka4 {0.00/5 0s}
37. Kc4 {+M51/1 0.026s} Ka3 {0.00/5 0.016s} 38. Bd2 {+M49/1 0.026s}
Kb2 {0.00/5 0.002s} 39. Bd1 {+M47/1 0.026s} Kb1 {-0.48/28 7.8s}
40. Kb3 {+M39/1 0.026s} Nc1+ {0.00/5 0s} 41. Kb4 {+M37/1 0.025s}
Na2+ {0.00/5 0s} 42. Ka3 {+M35/1 0.031s} Nc1 {0.00/5 0s} 43. Be3 {+M33/1 0.025s} Nd3 {0.00/5 0s} 44. Kb3 {+M31/1 0.025s} Nc1+ {0.00/5 0s} 45. Kc3 {+M29/1 0.025s} Na2+ {0.00/5 0s} 46. Kd2 {+M27/1 0.025s} Nb4 {0.00/5 0s} 47. Bc5 {+M25/1 0.025s} Nd5 {0.00/5 0s} 48. Bf3 {+M23/1 0.025s} Nc7 {0.00/5 0.007s} 49. Kc3 {+M15/1 0.026s} Ka2 {0.00/5 0.008s} 50. Kc2 {+M11/1 0.026s} Nb5 {0.00/5 0s, Draw by fifty moves rule} 1/2-1/2[/pgn]
Last edited by Laskos on Sun Feb 14, 2016 11:27 pm, edited 3 times in total.

syzygy
Posts: 4451
Joined: Tue Feb 28, 2012 10:56 pm

Re: Nalimov EGTB problem related to DTM?

Post by syzygy » Sun Feb 14, 2016 11:21 pm

syzygy wrote:Maybe Kai can give us an example game where white using Nalimov only manages to draw the position.
Michael already posted one:
[pgn][Event "Computer Chess Game"]
[Site "Mac-Pro.local"]
[Date "2016.02.14"]
[Round "-"]
[White "Crafty v25.0.1"]
[Black "Komodo 9.3"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "8/4K3/8/4B1n1/B7/8/5k2/8 w - - 0 1"]

1. Bf4 Ne4 2. Bc6 Nc3 3. Be5 Nb1 4. Ke6 Nd2 5. Bd4 Kg3 6. Kf5 Nf3 7. Bb6 Nh4 8. Ke4 Ng2 9. Bd5 Nh4 10. Bc7 Kf2 11. Kd3 Ng2 12. Kd2 Nh4 13. Bb6 Kg3 14. Ke2 Kf4 15. Bc7 Kf5 16. Bb3 Ng6 17. Bc2 Kf6 18. Bd8 Kf7 19. Ke3 Ne7 20. Bb3 Ke8 21. Bc7 Kd7 22. Bf4 Kc6 23. Kd4 Kd7 24. Bh2 Nf5 25. Ke5 Nd6 26. Bg3 Kc6 27. Bd5 Kd7 28. Bf3 Nb5 29. Bf2 Nc3 30. Bh5 Nb5 31. Bd1 Kc7 32. Ke6 Nc3 33. Bf3 Na2 34. Be1 Kb6 35. Kd5 Kb5 36. Be2 Ka4 37. Kc4 Ka3 38. Bd1 Kb2 39. Bd2 Ka3 40. Bh6 Kb2 41. Bg7 Kb1 42. Kb3 Nc1 43. Kc3 Na2 44. Kd2 Nb4 45. Bf3 Na6 46. Be4 Ka2 47. Kc3 Nc5 48. Bc6 Kb1 49. Bd4 Ne6 50. Be3 Nc7 1/2-1/2[/pgn]
White's first mistake is 38.Bd1.
https://syzygy-tables.info/?fen=8/8/8/8 ... 0-%200%201
[D]8/8/8/8/2K5/k7/n3B3/4B3 w - - 74 38

White's second mistake is 39.Bd2.
https://syzygy-tables.info/?fen=8/8/8/8 ... 0-%200%201
Note that 39.Bd2 is the unique DTM-optimal move. But both Bg3 and Bb3 are better (and would have retained the win, I think the first mistake is not yet fatal).

White's third mistake is 46.e4.
https://syzygy-tables.info/?fen=8/6B1/n ... 0-%200%201

White's fourth mistake is 48.Bc6.
https://syzygy-tables.info/?fen=8/6B1/8 ... 0-%200%201

So in the end it's not even close...

syzygy
Posts: 4451
Joined: Tue Feb 28, 2012 10:56 pm

Re: Nalimov EGTB problem related to DTM?

Post by syzygy » Sun Feb 14, 2016 11:59 pm

Laskos wrote:
syzygy wrote:Maybe Kai can give us an example game where white using Nalimov only manages to draw the position.
Sure, from the discussed position, a game between Shredder 12 Nalimov (3-4-5) against Komodo 9.3 Syzygy (3-4-5). Michael posted it with Crafty 25.01 Nalimov too.
Thanks, let's analyse another one.
[pgn][Event "?"]
[Site "?"]
[Date "2016.02.14"]
[Round "1"]
[White "Shredder Nalimov"]
[Black "Komodo Syzygy"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "8/4K3/8/4B1n1/B7/8/5k2/8 w - - 0 1"]

1. Bf4 Ne4 2. Bc6 Nc3 3. Be5 Nb1 4. Ke6 Nd2 5. Bd4 Kg3 6. Kf5 Nf3 7. Bb6 Nh4 8. Ke4 Ng2 9. Kd3 Nf4 10. Kd2 Ng2 11. Bc7 Kf2 12. Bd5 Nh4 13. Bb6 Kg3 14. Ke2 Kf4 15. Bb3 Ng6 16. Bc7 Kf5 17. Bc2 Kf6 18. Bd8 Kf7 19. Ke3 Ne7 20. Bb3 Ke8 21. Bc7 Kd7 22. Bf4 Kc6 23. Kd4 Kd7 24. Bh2 Nf5 25. Ke5 Nd6 26. Bg3 Kc6 27. Bd5 Kd7 28. Bf3 Nb5 29. Bf2 Nc3 30. Bh5 Nb5 31. Bd1 Kc7 32. Ke6 Nc3 33. Bf3 Na2 34. Be1 Kb6 35. Kd5 Kb5 36. Be2 Ka4 37. Kc4 Ka3 38. Bd2 Kb2 39. Bd1 Kb1 40. Kb3 Nc1 41. Kb4 Na2 42. Ka3 Nc1 43. Be3 Nd3 44. Kb3 Nc1 45. Kc3 Na2 46. Kd2 Nb4 47. Bc5 Nd5 48. Bf3 Nc7 49. Kc3 Ka2 50. Kc2 Nb5 1/2-1/2[/pgn]
The first mistake is 39.Bd1.
https://syzygy-tables.info/?fen=8/8/8/8 ... 0-%200%201
Interesting position:
39.Bd3 has DTZ=22 and DTM=50 (in ply)
39.Bd1 has DTZ=26 and DTM=46 (in ply)
So Nalimov is always going to play 39.Bd1 here. Two fewer moves to mate, but two more moves before the knight is captured. So Nalimov draws here.

The next move by black (39...Kb1) is interesting as well:
https://syzygy-tables.info/?fen=8/8/8/8 ... 0-%200%201
39...Ka3 has DTZ=25 and DTM=45
39...Kb1 has DTZ=25 and DTM=39
So 39...Kb1 looks like a blunder from Nalimov's point of view as it shortens the mate by 3 full moves. However, black will never get mated as the knight capture was already moved beyond the 50-move horizon.

Another white mistake with 40.Kb3.
https://syzygy-tables.info/?fen=8/8/8/8 ... 0-%200%201
40.Kb3 is necessary for the "quick mate": DTM=38, but DTZ=28.
White can capture the knight much quicker with e.g. 40.Be3 (DTZ=24, but DTM=44).

So by going for the quick mate, Nalimov delays the knight capture by many many moves.

The situation is similar at move 42:
https://syzygy-tables.info/?fen=8/8/8/8 ... 0-%200%201
42.Ka3 has DTZ=26, DTM=34 whereas 42.Kc4 has DTZ=24, DTM=48.

Far from "optimal" play by black in terms of Nalimov/DTM, but black saves the point :-)

User avatar
Daniel Mehrmann
Posts: 855
Joined: Wed Mar 08, 2006 8:24 pm
Location: Germany
Full name: Daniel Mehrmann

Re: Nalimov EGTB problem related to DTM?

Post by Daniel Mehrmann » Mon Feb 15, 2016 3:05 pm

Well, while i'm added Syzygy to Fruit reloaded i notice these king of 50-move rule problems with Nalimov and Syzygy some month ago. Fruit supports Nalimov since Version 2.2.1 and i thought it is a interesting idea to add Syzygy too.
This problems faced me in serval positions with other pieces, like your table, too. After some test positions my first thought was that there must be a bug in my syzygy code, because Nalimov is so old and stable, it was my "reference" base and if Syzygy doesn't give me the same results, something is wrong.
I simply overlooked the fact that the "reference" code of Nalimov ignore the 50-move rule.
Well, it took me some time to realize that. After that it was easy to compare, if you have both endgame table bases options in one engine. :D


Regards
Daniel

User avatar
Laskos
Posts: 9414
Joined: Wed Jul 26, 2006 8:21 pm
Full name: Kai Laskos

Re: Nalimov EGTB problem related to DTM?

Post by Laskos » Mon Feb 15, 2016 4:32 pm

Daniel Mehrmann wrote:Well, while i'm added Syzygy to Fruit reloaded i notice these king of 50-move rule problems with Nalimov and Syzygy some month ago. Fruit supports Nalimov since Version 2.2.1 and i thought it is a interesting idea to add Syzygy too.
This problems faced me in serval positions with other pieces, like your table, too. After some test positions my first thought was that there must be a bug in my syzygy code, because Nalimov is so old and stable, it was my "reference" base and if Syzygy doesn't give me the same results, something is wrong.
I simply overlooked the fact that the "reference" code of Nalimov ignore the 50-move rule.
Well, it took me some time to realize that. After that it was easy to compare, if you have both endgame table bases options in one engine. :D


Regards
Daniel
I knew that Nalimovs have this problem, but first, I imagined it to be a problem with very rare, freak positions, second, I didn't know that Syzygy gives "perfect play" against "perfect play". I was under some sort of artistic impression that if Nalimov shows me the shortest distance to mate in a given root position, even ignoring the 50-move rule it should perform at least as well as Syzygy on wins from the root. Then several days ago I played (color and reversed) from my hard TB won positions, using Nalimov, Syzygy and Komodo no TB, with these results:

Code: Select all

Rank Name                          ELO   Games   Score   Draws
   1 Syzygy                         69    1032     60%     20%
   2 Nalimov                        43    1032     56%     21%
   3 Komodo No TB                 -115    1032     34%     32%
Finished match
And I started to check what the heck happens here, the result shows a clear advantage of Syzygy over Nalimov, with a Syzygy performance {win, draw} color and reversed appearing quite often.

So, if your opponent is using Syzygy, then you cannot do better than using Syzygy too. If your opponent is using some fallible egtbs like Nalimov/DTM, then one can improve even on Syzygy. All in all, Syzygy bases are pretty impressive, when they appeared I was under some sort of vague impression that at their tiny size they might be flawed in the way egbbs are flawed.

User avatar
Daniel Mehrmann
Posts: 855
Joined: Wed Mar 08, 2006 8:24 pm
Location: Germany
Full name: Daniel Mehrmann

Re: Nalimov EGTB problem related to DTM?

Post by Daniel Mehrmann » Mon Feb 15, 2016 8:01 pm

Laskos wrote:I knew that Nalimovs have this problem, but first, I imagined it to be a problem with very rare, freak positions, second, I didn't know that Syzygy gives "perfect play" against "perfect play". I was under some sort of artistic impression that if Nalimov shows me the shortest distance to mate in a given root position, even ignoring the 50-move rule it should perform at least as well as Syzygy on wins from the root. Then several days ago I played (color and reversed) from my hard TB won positions, using Nalimov, Syzygy and Komodo no TB, with these results:

Code: Select all

Rank Name                          ELO   Games   Score   Draws
   1 Syzygy                         69    1032     60%     20%
   2 Nalimov                        43    1032     56%     21%
   3 Komodo No TB                 -115    1032     34%     32%
Finished match
Well, basicly i wouldn't say that Syzygy performs better then Nalimov. A combination of both can be good too. I tested it with Fruit and it looks not so bad.

Probably they are equal with distance zero/mate, but Syzygy performs better, because the files are smaller (timing i/o balance).

Well, if the root position is already inside a database, "Nalimov" engines doesn't do a move order based on the mate scores at root. At least i can say, i don't know such a engine yet. Maybe that could be a reason in some cases if the depth or time is extremely limited. However, i need to do more tests in that case.

Regards
Daniel

Post Reply