Test positions for draw detection

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

zd3nik
Posts: 193
Joined: Wed Mar 11, 2015 3:34 am
Location: United States

Test positions for draw detection

Post by zd3nik »

Anyone know of a set of positions for testing draw detection? For example, a set of positions where the best move is to go for draw by repetition, best move is to trade away material into a drawn position, or best move is to avoid draw?
Vinvin
Posts: 5228
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: Test positions for draw detection

Post by Vinvin »

zd3nik wrote:Anyone know of a set of positions for testing draw detection? For example, a set of positions where the best move is to go for draw by repetition, best move is to trade away material into a drawn position, or best move is to avoid draw?
A friend just show one to me some hours ago : white do play and draw by stalemate
[d]6n1/8/2p4P/8/8/r1p3K1/B7/4B1k1 w - - 0 1
zd3nik
Posts: 193
Joined: Wed Mar 11, 2015 3:34 am
Location: United States

Re: Test positions for draw detection

Post by zd3nik »

Here's an interesting looking one as well.

[d]7K/4k2P/5R2/1pp2p2/6p1/2P3P1/8/q7 w - - 2 77

Rf7! according to Spike 1.4. After that is there a winning move for black?

And is there a better move than Rf7 for white?
Vinvin
Posts: 5228
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: Test positions for draw detection

Post by Vinvin »

Some old hard positions based on draw threats :
[pgn][Event "Test position"]
[Site "-**-"]
[Date "2012.07.20"]
[Round "?"]
[White "White"]
[Black "Black"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "7b/8/kq6/8/8/1N2R3/K2P4/8 w - - 0 1"]
[Comment "bm Nd4; id \"arasan14.67\"; c0 \"study by Kubbel\";"]

1. Nd4 Qxd4 2. Ra3+ Kb7 3. Rb3+
1/2-1/2

[Event "Test position"]
[Site "?"]
[Date "1930.??.??"]
[Round "?"]
[White "Troitzky, A."]
[Black "Black"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "8/3kP3/3br1P1/6P1/7K/8/8/7B w - - 0 1"]
[PlyCount "17"]
[EventDate "1930.??.??"]

1. Bc6+ $1 Kxe7 2. Bd5 (2. g7 Rg6 3. Bd5 Rxg7 4. Kh5 Kf8 $19) 2... Rxg6 3. Kh5
Rg7 4. g6 Kf6 5. Bf7 Kf5 6. Kh4 Kf4 7. Kh3 $1 Be7 8. Kg2 Bh4 9. Kf1 $1 $11
1/2-1/2


[Event "hard CCC 2008"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Pos"]
[Black "Endgame/pertpetual check"]
[Result "1/2-1/2"]
[Annotator "Vinvin"]
[SetUp "1"]
[FEN "6R1/P2k4/r7/5N1P/r7/p7/7K/8 w - - 0 1"]

1. Nh6 $1 {Draw by perpetual check} a2 2. Rg7+ Kd6 3. Rg6+ Kc5 4. Rg5+ Kb6 5. Rg6+
Kc7 6. Rg7+ Kc6 7. Rg6+ Kb5 8. Rg5+ Kc4 9. Rg4+ Kd3 10. Rg3+ Kc2 11. Rg2+ Kb3
1/2-1/2


[Event "hard CCC 2008"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Pos"]
[Black "Pertpetual check"]
[Result "1/2-1/2"]
[Annotator "Vinvin"]
[SetUp "1"]
[FEN "4RQ2/5p2/2q2kp1/3p4/3P2PP/8/1K6/8 b - - 0 1"]

{This position is draw by perpetual check, it should be evaluate as 0.00}
1/2-1/2

[Event "hard CCC 2008"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Pos"]
[Black "Fortress"]
[Result "1/2-1/2"]
[Annotator "Vinvin"]
[SetUp "1"]
[FEN "r7/6k1/5R2/p3p3/Pp1pPp2/1PpP1Pp1/2P3P1/1K6 w - - 0 1"]

1. Rh6 $1 Kxh6 2. Kc1 Kg6 3. Kd1 Rh8 4. Ke2 Rh2 5. Kf1 Rh1+ 6. Ke2 {Draw}
1/2-1/2


[Event "Test position"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "White"]
[Black "Black"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "8/5k2/8/5P2/1pnB1K2/8/1P6/8 b - - 0 1"]

{draw because} 1... Nd2 2. Ke3 Nb3 3. Ke4 Na1 4. Kd3 b3 5. Bc3 Ke7 6. Be5 Kf7 7. f6 Kg6
1/2-1/2

[Event "Computer chess game 0 300 +3 0 0"]
[Site "ICC"]
[Date "2001.10.28"]
[Round "5"]
[White "Yace 0.99.57"]
[Black "Tinker"]
[Result "1/2-1/2"]
[ECO "B78"]
[WhiteElo "2972"]
[BlackElo "2519"]
[SetUp "1"]
[FEN "7k/2R3b1/6R1/1r5P/6K1/8/8/8 w - - 0 55"]
[PlyCount "21"]
[EventDate "2001.??.??"]

55. Rcxg7 $4 Rg5+ 56. Kf3 Rf5+ 57. Ke2 Re5+ 58. Kd1 Rd5+ 59. Ke1 Re5+ 60. Kd1
Rd5+ 61. Kc2 Rc5+ 62. Kd2 Rd5+ 63. Ke3 Re5+ 64. Kd4 Rd5+ 65. Kxd5 1/2-1/2

[Event "Clash of the Titans"]
[Site "Hamburg"]
[Date "2012.03.09"]
[Round "15.1"]
[White "Houdini 2.0c Pro x64"]
[Black "Komodo64 SSE Version 4"]
[Result "1/2-1/2"]
[ECO "D43"]
[SetUp "1"]
[FEN "8/R5R1/7k/4P1p1/6P1/6KP/2r2r2/8 b - - 0 65"]
[PlyCount "38"]

65... Rc3+ $1 {draw score also for 65...Rf3+ and 65...Rg2+ } 66. Kxf2 Rf3+ 67. Ke2 Re3+ 68. Kd2 Rd3+ 69. Kc1 Rc3+ 70. Kb2 Rb3+
71. Kc2 Rc3+ 72. Kd1 Rd3+ 73. Ke1 Re3+ 74. Kf1 Re1+ 75. Kg2 Re2+ 76. Kf3 Re3+ 77. Kg2 Re2+ 78. Kg1 Rg2+
79. Kf1 Rf2+ 80. Kg1 Rf1+ 81. Kg2 Rf2+ 82. Kg3 Rf3+ 83. Kg2 Rf2+ 84. Kxf2
1/2-1/2

[Event "Test position"]
[Site "-**-"]
[Date "2012.07.11"]
[Round "?"]
[White "White"]
[Black "Black"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "4knQ1/7r/3p2p1/2bP1pP1/5P1N/6K1/8/8 b - - 1 1"]

59...Rxh4!! 60. Kxh4 Bd4 {getting the draw} 61. Kg3 Ke7 62. Kf3 Ba1
1/2-1/2

[Event "-"]
[Site "-"]
[Date "2012.07.11"]
[Round "?"]
[White "-"]
[Black "-"]
[Result "1-0"]
[SetUp "1"]
[FEN "8/8/8/5Bp1/7k/7P/4pPK1/8 b - - 0 1"]

1... g4 {the only move that win. The treat is 2. Bg4 : the king is trapped and no mate is possible}
1-0

[Event "Test position"]
[Site "-**-"]
[Date "2012.07.17"]
[White "White"]
[Black "Black"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "3k4/4pp2/n2n4/5BN1/3N4/b7/4K3/8 w - - 0 1"]

1. Nxf7+ {only move to draw}
1/2-1/2


[Event "hard CCC 2008"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Pos"]
[Black "Fortress"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "2b1r3/r2ppN2/8/1p1p1k2/pP1P4/2P3R1/PP3PP1/2K5 w - - 0 1"]

{Building a fortress} 1. Nd6+ $1 exd6 2. Rf3+ Kg5 3. Rg3+ Kf6 4. Rf3+ Ke7 5.
Re3+ Kd8 6. Rxe8+ Kxe8 7. a3 Ra8 8. Kd2 Bb7 9. Ke2 Kf7 10. Kf1 Rh8 11. Kg1 Kf6
12. f3 Kf5 13. g3 Re8 14. Kf2 Re7 15. Kf1 Rh7 16. Kg2 1/2-1/2

[Event "hard CCC 2008"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Pos"]
[Black "Fortress NN vs Q"]
[Result "1/2-1/2"]
[Annotator "Rafal Furdzik"]
[SetUp "1"]
[FEN "8/8/7p/3KNN1k/2p4p/8/3P2p1/8 w - - 0 1"]

{Behting, 1906} 1. Kc6 $3 (1. Ng7+ Kg5 2. Nf3+ (2. Ke4 h3) 2... Kg4 3. Nf5 h3)
(1. Nf3 h3 2. Ke4 (2. N5h4) 2... h2 (2... g1=Q 3. Nxg1 h2 4. Nf3 h1=Q 5. Ng3+))
1... g1=Q (1... h3 2. Ng3+ Kg5 (2... Kh4 3. Ne2 $10) 3. Ne2 $10) (1... g1=Q 2.
Nxh4) 2. Nxh4 Qd4 (2... Qb1 3. Nhf3 $10) (2... Qa1 3. Nhf3) 3. Nhf3 $11 1/2-1/2
[/pgn]

[Event "Test position"]
[Site "-**-"]
[Date "2012.07.20"]
[Round "?"]
[White "White"]
[Black "Black"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "7b/8/kq6/8/8/1N2R3/K2P4/8 w - - 0 1"]
[Comment "bm Nd4; id \"arasan14.67\"; c0 \"study by Kubbel\";"]

1. Nd4 Qxd4 2. Ra3+ Kb7 3. Rb3+
1/2-1/2

[Event "Test position"]
[Site "?"]
[Date "1930.??.??"]
[Round "?"]
[White "Troitzky, A."]
[Black "Black"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "8/3kP3/3br1P1/6P1/7K/8/8/7B w - - 0 1"]
[PlyCount "17"]
[EventDate "1930.??.??"]

1. Bc6+ $1 Kxe7 2. Bd5 (2. g7 Rg6 3. Bd5 Rxg7 4. Kh5 Kf8 $19) 2... Rxg6 3. Kh5
Rg7 4. g6 Kf6 5. Bf7 Kf5 6. Kh4 Kf4 7. Kh3 $1 Be7 8. Kg2 Bh4 9. Kf1 $1 $11
1/2-1/2


[Event "hard CCC 2008"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Pos"]
[Black "Endgame/pertpetual check"]
[Result "1/2-1/2"]
[Annotator "Vinvin"]
[SetUp "1"]
[FEN "6R1/P2k4/r7/5N1P/r7/p7/7K/8 w - - 0 1"]

1. Nh6 $1 {Draw by perpetual check} a2 2. Rg7+ Kd6 3. Rg6+ Kc5 4. Rg5+ Kb6 5. Rg6+
Kc7 6. Rg7+ Kc6 7. Rg6+ Kb5 8. Rg5+ Kc4 9. Rg4+ Kd3 10. Rg3+ Kc2 11. Rg2+ Kb3
1/2-1/2


[Event "hard CCC 2008"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Pos"]
[Black "Pertpetual check"]
[Result "1/2-1/2"]
[Annotator "Vinvin"]
[SetUp "1"]
[FEN "4RQ2/5p2/2q2kp1/3p4/3P2PP/8/1K6/8 b - - 0 1"]

{This position is draw by perpetual check, it should be evaluate as 0.00}
1/2-1/2

[Event "hard CCC 2008"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Pos"]
[Black "Fortress"]
[Result "1/2-1/2"]
[Annotator "Vinvin"]
[SetUp "1"]
[FEN "r7/6k1/5R2/p3p3/Pp1pPp2/1PpP1Pp1/2P3P1/1K6 w - - 0 1"]

1. Rh6 $1 Kxh6 2. Kc1 Kg6 3. Kd1 Rh8 4. Ke2 Rh2 5. Kf1 Rh1+ 6. Ke2 {Draw}
1/2-1/2


[Event "Test position"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "White"]
[Black "Black"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "8/5k2/8/5P2/1pnB1K2/8/1P6/8 b - - 0 1"]

{draw because} 1... Nd2 2. Ke3 Nb3 3. Ke4 Na1 4. Kd3 b3 5. Bc3 Ke7 6. Be5 Kf7 7. f6 Kg6
1/2-1/2

[Event "Computer chess game 0 300 +3 0 0"]
[Site "ICC"]
[Date "2001.10.28"]
[Round "5"]
[White "Yace 0.99.57"]
[Black "Tinker"]
[Result "1/2-1/2"]
[ECO "B78"]
[WhiteElo "2972"]
[BlackElo "2519"]
[SetUp "1"]
[FEN "7k/2R3b1/6R1/1r5P/6K1/8/8/8 w - - 0 55"]
[PlyCount "21"]
[EventDate "2001.??.??"]

55. Rcxg7 $4 Rg5+ 56. Kf3 Rf5+ 57. Ke2 Re5+ 58. Kd1 Rd5+ 59. Ke1 Re5+ 60. Kd1
Rd5+ 61. Kc2 Rc5+ 62. Kd2 Rd5+ 63. Ke3 Re5+ 64. Kd4 Rd5+ 65. Kxd5 1/2-1/2

[Event "Clash of the Titans"]
[Site "Hamburg"]
[Date "2012.03.09"]
[Round "15.1"]
[White "Houdini 2.0c Pro x64"]
[Black "Komodo64 SSE Version 4"]
[Result "1/2-1/2"]
[ECO "D43"]
[SetUp "1"]
[FEN "8/R5R1/7k/4P1p1/6P1/6KP/2r2r2/8 b - - 0 65"]
[PlyCount "38"]

65... Rc3+ $1 {draw score also for 65...Rf3+ and 65...Rg2+ } 66. Kxf2 Rf3+ 67. Ke2 Re3+ 68. Kd2 Rd3+ 69. Kc1 Rc3+ 70. Kb2 Rb3+
71. Kc2 Rc3+ 72. Kd1 Rd3+ 73. Ke1 Re3+ 74. Kf1 Re1+ 75. Kg2 Re2+ 76. Kf3 Re3+ 77. Kg2 Re2+ 78. Kg1 Rg2+
79. Kf1 Rf2+ 80. Kg1 Rf1+ 81. Kg2 Rf2+ 82. Kg3 Rf3+ 83. Kg2 Rf2+ 84. Kxf2
1/2-1/2

[Event "Test position"]
[Site "-**-"]
[Date "2012.07.11"]
[Round "?"]
[White "White"]
[Black "Black"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "4knQ1/7r/3p2p1/2bP1pP1/5P1N/6K1/8/8 b - - 1 1"]

59...Rxh4!! 60. Kxh4 Bd4 {getting the draw} 61. Kg3 Ke7 62. Kf3 Ba1
1/2-1/2

[Event "-"]
[Site "-"]
[Date "2012.07.11"]
[Round "?"]
[White "-"]
[Black "-"]
[Result "1-0"]
[SetUp "1"]
[FEN "8/8/8/5Bp1/7k/7P/4pPK1/8 b - - 0 1"]

1... g4 {the only move that win. The treat is 2. Bg4 : the king is trapped and no mate is possible}
1-0

[Event "Test position"]
[Site "-**-"]
[Date "2012.07.17"]
[White "White"]
[Black "Black"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "3k4/4pp2/n2n4/5BN1/3N4/b7/4K3/8 w - - 0 1"]

1. Nxf7+ {only move to draw}
1/2-1/2


[Event "hard CCC 2008"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Pos"]
[Black "Fortress"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "2b1r3/r2ppN2/8/1p1p1k2/pP1P4/2P3R1/PP3PP1/2K5 w - - 0 1"]

{Building a fortress} 1. Nd6+ $1 exd6 2. Rf3+ Kg5 3. Rg3+ Kf6 4. Rf3+ Ke7 5.
Re3+ Kd8 6. Rxe8+ Kxe8 7. a3 Ra8 8. Kd2 Bb7 9. Ke2 Kf7 10. Kf1 Rh8 11. Kg1 Kf6
12. f3 Kf5 13. g3 Re8 14. Kf2 Re7 15. Kf1 Rh7 16. Kg2 1/2-1/2

[Event "hard CCC 2008"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Pos"]
[Black "Fortress NN vs Q"]
[Result "1/2-1/2"]
[Annotator "Rafal Furdzik"]
[SetUp "1"]
[FEN "8/8/7p/3KNN1k/2p4p/8/3P2p1/8 w - - 0 1"]

{Behting, 1906} 1. Kc6 $3 (1. Ng7+ Kg5 2. Nf3+ (2. Ke4 h3) 2... Kg4 3. Nf5 h3)
(1. Nf3 h3 2. Ke4 (2. N5h4) 2... h2 (2... g1=Q 3. Nxg1 h2 4. Nf3 h1=Q 5. Ng3+))
1... g1=Q (1... h3 2. Ng3+ Kg5 (2... Kh4 3. Ne2 $10) 3. Ne2 $10) (1... g1=Q 2.
Nxh4) 2. Nxh4 Qd4 (2... Qb1 3. Nhf3 $10) (2... Qa1 3. Nhf3) 3. Nhf3 $11 1/2-1/2
JVMerlino
Posts: 1357
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: Test positions for draw detection

Post by JVMerlino »

zd3nik wrote:Anyone know of a set of positions for testing draw detection? For example, a set of positions where the best move is to go for draw by repetition, best move is to trade away material into a drawn position, or best move is to avoid draw?
Here are a few good ones, with the first one being very simple -- you must move the rook on first rank -- capturing the knight on a6 or the pawn on c7 leads to a draw:
[D]3r3N/R1p1kppp/n6n/8/2QPP3/5q2/5P1P/5RK1 w - - 0 24
[D]1k6/4R3/1p6/p1p3p1/qnBn2Qp/5P2/1P6/1K6 w - - 0 46 bm Bb3
[D]8/8/4kp1p/R7/4N2P/p4rP1/6K1/3b4 w - - 0 52 bm Nf2

jm
Norm Pollock
Posts: 1056
Joined: Thu Mar 09, 2006 4:15 pm
Location: Long Island, NY, USA

Re: Test positions for draw detection

Post by Norm Pollock »

White forces draw:

[d]8/8/2Q2bk1/5p1p/4pP1P/7K/5q2/8 w - - bm Qxf6;
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Test positions for draw detection

Post by bob »

Norm Pollock wrote:White forces draw:

[d]8/8/2Q2bk1/5p1p/4pP1P/7K/5q2/8 w - - bm Qxf6;
Multiple solutions including Qe8+ Kany Qh8+ and then a queen contact check that draws.
User avatar
Nordlandia
Posts: 2821
Joined: Fri Sep 25, 2015 9:38 pm
Location: Sortland, Norway

Re: Test positions for draw detection

Post by Nordlandia »

Blathy Otto, 1908, White wins

Code: Select all

1B1k4/3p4/1Kp5/PpP2p2/1PqP1P2/8/1P6/8 w - - 0 1
Image
JVMerlino
Posts: 1357
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: Test positions for draw detection

Post by JVMerlino »

Nordlandia wrote:Blathy Otto, 1908, White wins

Code: Select all

1B1k4/3p4/1Kp5/PpP2p2/1PqP1P2/8/1P6/8 w - - 0 1
Image
White wins? Every engine I've tried (including Stockfish and Komodo) show draw with a6. Admittedly I didn't run them for more than a few minutes each, but I got up to depth 48 on SF.

Can you show a winning line?

jm
User avatar
Nordlandia
Posts: 2821
Joined: Fri Sep 25, 2015 9:38 pm
Location: Sortland, Norway

Re: Test positions for draw detection

Post by Nordlandia »

Sure :)
[pgn][Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "New game"]
[Black "?"]
[Result "*"]
[SetUp "1"]
[FEN "1B1k4/3p4/1Kp5/PpP2p2/1PqP1P2/8/1P6/8 w - - 0 0"]
[PlyCount "23"]

1. a6 Kc8 2. a7 Qa2 3. Bd6 Qa4 4. Be7 Qa2 5. Bh4 Qa4 6. b3 Qa3 7. Bg3 Qa2 8.
Bf2 Qa1 9. Be1 Qa2 10. Bd2 Qa1 11. Bc1 d5 12. Be3 *[/pgn]