Cupcake and ending materials

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Cupcake and ending materials

Post by Ferdy »

Checking test games under winboard 4.6.2, Cupcake was flagged on false draw claim. The position is drawish but both sides still have the possibility to win.
[pgn]
[Event "Computer Chess Game"]
[Site "?"]
[Date "2015.05.18"]
[Round "109"]
[White "CDrill 1928"]
[Black "Cupcake"]
[Result "1-0"]
[TimeControl "40/60"]
[Annotator "9. +0.15 9... -0.15"]

1. e4 c5 2. Nf3 e6 3. d4 cxd4 4. Nxd4 a6 5. Nc3 b5 6. Bd3 Qc7 7. O-O Bb7 8.
Kh1 Nf6 9. f3 {+0.15/6 1.9} Nc6 {-0.15/5 1.5} 10. Be3 {+0.14/6 1.9} Bb4
{-0.06/5 1.9} 11. a4 {+0.30/6 1.9} Nxd4 {+0.30/6 1.9} 12. Bxd4
{-0.13/6 1.9} e5 {+0.26/6 1.9} 13. Bf2 {-0.13/6 1.9} Bxc3 {+0.72/7 1.9} 14.
bxc3 {-0.18/7 1.1} bxa4 {+0.68/7 1.9} 15. Rxa4 {-0.12/7 1.5} Qxc3
{+0.74/6 1.9} 16. Qb1 {+0.13/7 1.4} Qc7 {+0.94/6 1.6} 17. Rb4 {-0.11/6 1.9}
Bc8 {+0.84/6 2.1} 18. Bb6 {-0.08/6 1.9} Qc6 {+0.82/6 1.9} 19. Qb2
{-0.12/6 1.9} Qe6 {+0.57/6 1.5} 20. Bc5 {+0.72/6 1.9} d6 {-0.97/7 1.9} 21.
Rb6 {+0.87/6 1.9} O-O {-1.97/6 4} 22. Rxd6 {+0.94/6 1.9} Qe8 {-3.08/7 1.6}
23. Rb6 {+1.24/6 1.9} Nd7 {-1.26/7 1.4} 24. Bxf8 {+1.19/6 1.9} Nxb6
{-1.22/7 1.1} 25. Bxg7 {+1.26/7 1.4} Nd7 {-1.45/7 1.7} 26. Bh6
{+1.56/7 2.0} Rb8 {-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 {-1.67/9 1.6} 55. Kc3 {+3.69/9 1.5} Bb5 {-1.66/10 1.6}
56. Bb7 {+3.84/9 1.2} Ke8 {-1.52/11 1.6} 57. Kd2 {+3.54/8 1.6} Kd7
{-1.35/10 1.6} 58. Bd5 {+1.99/9 1.6} Bc4 {-1.28/11 1.5} 59. Ke3
{+2.04/9 1.3} a5 {-1.30/11 1.6} 60. g4 {+1.72/8 1.6} hxg4 {-0.06/10 1.6}
61. h5 {+0.92/9 0.9} Bxd5 {+0.13/11 1.6} 62. exd5 {+0.52/9 1.6} a4
{+1.53/10 1.6} 63. Bf6 {+0.07/9 1.6} a3 {+1.67/11 1.6} 64. h6 {+0.08/8 1.6}
Nf5+ {+1.79/11 1.6} 65. Ke4 {-1.45/9 1.6} Nxh6 {+1.97/11 1.4} 66. Bxe5
{-2.12/9 1.6} a2 {+2.09/11 1.6} 67. Kf4 {-1.42/8 1.6} Nf7 {+2.22/12 1.2}
68. c8=Q+ {-3.11/9 1.6} Kxc8 {+2.22/12 0.8} 69. Bb2 {-3.19/10 1.6} Kd7
{+2.22/13 1.7} 70. Kxg4 {-3.24/10 1.6} Kd6 {+2.19/12 1.6} 71. Kf5
{-3.23/10 1.2} Kxd5 {+2.90/11 0.9} 72. Ba1 {-3.32/10 1.6} Nd6+
{+2.89/11 1.8} 73. Kf4 {-3.27/10 1.6} Nc4 {+2.45/12 1.8} 74. Bf6
{-3.25/10 1.4} Nd2 {+2.12/12 1.8} 75. Ke3 {-3.21/10 1.0} Ne4 {+0.07/13 2.5}
76. Bg7 {-3.20/10 1.0} Nc5 {+0.00/13 1.6} 77. Kd2 {-0.45/10 1.5} Kd6
{+0.00/14 1.6} 78. Kc2 {+0.00/10 1.1} Kd5 {+0.00/15 1.6} 79. Kb2
{+0.14/10 2.7} Ne6 {+0.00/17 0.6} 80. Bf6 {+0.17/10 1.9} a1=Q+
{+0.00/124 0.1} 81. Kxa1 {+0.21/11 0.9}
{False draw claim: 'Insufficient force'} 1-0
[/pgn]
User avatar
hgm
Posts: 27812
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Cupcake and ending materials

Post by hgm »

Note that on FICS occasionally games occur like

[d]2R3bk/8/5nKN/8/8/8/8/8 w - - 0 1

1. Rxg8+ Nxg8 {FICS declares draw}
User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: Cupcake and ending materials

Post by stegemma »

hgm wrote:Note that on FICS occasionally games occur like

[d]2R3bk/8/5nKN/8/8/8/8/8 w - - 0 1

1. Rxg8+ Nxg8 {FICS declares draw}
That's right because if you have mate in 1 and play mate in 2, you should be punished! :)
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Cupcake and ending materials

Post by Evert »

Ferdy wrote:Checking test games under winboard 4.6.2, Cupcake was flagged on false draw claim. The position is drawish but both sides still have the possibility to win.
Yeah, with probability 0 (unless they're playing Skipper).

I've played with the thought of scoring dead-drawn positions from static eval at -1 for the side to move, to encourage the program to go for the repetition draw and not waste computer time on burning through the required moves to hit the 50-move draw, but it's low on my list of things to fix (and it doesn't really help when testing against opponents that don't do the same thing).
User avatar
hgm
Posts: 27812
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Cupcake and ending materials

Post by hgm »

For this reason XBoard has an option 'trivial draws', which makes it adjudicate the position as draw after 3 moves. But it is an adjudication thing; FIDE rules do not allow you to claim a draw here.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Cupcake and ending materials

Post by Evert »

hgm wrote:For this reason XBoard has an option 'trivial draws', which makes it adjudicate the position as draw after 3 moves.
Awesome, I'm going to activate that.
How trivial are the draws that it recognises? Does it work for variants?
But it is an adjudication thing; FIDE rules do not allow you to claim a draw here.
Indeed. Which is still pretty stupid, considering that I would be surprised if any of the possible mate positions ever showed up in a real game.

I suppose the following is a somewhat real possibility though
[d]7K/4n3/7k/3B4/6r1/8/8/8 b - - 0 1
but I can't think of one where the bishop-mate is anything other than a help-mate...

EDIT: changed the position to something that actually works.
User avatar
hgm
Posts: 27812
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Cupcake and ending materials

Post by hgm »

Evert wrote:Awesome, I'm going to activate that.
How trivial are the draws that it recognises? Does it work for variants?
Trivial draws are KNNK, K+minor vs K+minor, KRKR and KQKQ. (The latter is controversial, though, as there are some quite lengthy mates in that ending. With KRKR there are no forced wins longer than 3 moves, so this is why the adjudication is done only after 3 moves.)

It doesn't work in variants. (Although I am not sure anymore whether it works in Xiangqi. I might have added dedicated rules for that.)
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Cupcake and ending materials

Post by sje »

hgm wrote:Trivial draws are KNNK, K+minor vs K+minor, KRKR and KQKQ. (The latter is controversial, though, as there are some quite lengthy mates in that ending. With KRKR there are no forced wins longer than 3 moves, so this is why the adjudication is done only after 3 moves.)
For KQKQ:
Longest mate score (WTM): MateIn13
Sample WTM longest mating position: 8/8/8/8/8/8/8/qk1K2Q1 w - - 0 1

Optimal move sequence from the above WTM longest mating position:

1. Kd2+ Ka2 2. Qg8+ Ka3 {Kb1} 3. Qa8+ Kb2 4. Qb7+ {Qb8+} Ka3 5. Qa6+ {Qa7+} Kb2
{Kb4} 6. Qb5+ {Qb6+} Ka3 7. Qa5+ Kb3 8. Qxa1 Kb4 {Kc4} 9. Qe5 Kc4 10. Kc2 Kb4
11. Qd5 Ka4 12. Kc3 Ka3 13. Qa5# {Qa8# Qb3#}

For KRKR:
Longest mate score (WTM): MateIn19
Sample WTM longest mating position: K7/2R5/8/k7/8/8/8/1r6 w - - 0 1

Optimal move sequence from the above WTM longest mating position:

1. Ra7+ Kb4 {Kb5 Kb6} 2. Rb7+ Kc3 {Kc4 Kc5} 3. Rxb1 Kd4 4. Ka7 {Kb7 Kb8 Ra1 Rb8
Rd1+ Re1} Kd3 {Kd5 Ke4} 5. Ka6 {Kb6 Kb7 Rb4 Rd1+ Re1} Kc2 {Kd4 Ke3 Ke4} 6. Rb4
{Re1} Kc3 {Kd2 Kd3} 7. Kb5 Kd3 8. Kc5 {Kc6} Ke3 9. Kd5 {Rd4} Kd2 {Kd3 Kf3} 10.
Kd4 {Ke4} Ke2 11. Ke4 {Ra4 Rb3 Rc4} Kd2 {Kf2} 12. Rc4 Ke2 13. Rc2+ Kd1 14. Kd3
{Ra2} Ke1 15. Ke3 {Ra2 Rb2 Rd2} Kf1 16. Ra2 {Rb2 Rd2} Kg1 17. Kf3 Kh1 18. Kg3
Kg1 19. Ra1#
PK
Posts: 893
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: Cupcake and ending materials

Post by PK »

Are there any KQKQ / KRKR mates longer than 5 moves if neither king stands on the edge of the board?
User avatar
hgm
Posts: 27812
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Cupcake and ending materials

Post by hgm »

sje wrote:For KRKR:
Longest mate score (WTM): MateIn19
Note that the DTM (which you report) is not relevant, and it is the DTC that counts. After the conversion, you are no longer in KRKR but in KRK, and there is no danger the latter will be adjudicated as draw. The longest DTC in KRKR is 3 (check - skewer - capture).