Test 3:Ferdy wrote: ↑Tue Jul 30, 2019 2:30 amImplemented the conflict on stalemate and insufficient mating material rules. The player that played the last move will decide if it is stalemate or insufficient.Ferdy wrote: ↑Sun Jul 28, 2019 11:58 pmI have not thought such conflict of interests, but I think after white's Nxc6, white can decide for stalemate or insufficient.todd wrote: ↑Sun Jul 28, 2019 6:09 pm Neat idea - I'll try to play a few games with friends who like variants.
What happens if two conflicting conditions occur on the same move?
For example, here, after black plays 1... Rc6, white plays 2. Nxc6, resulting in both stalemate and insufficient material.
[d]k1r5/8/1K6/4N3/8/8/8/8 b - - 0 1
Repetition and 50 move rule could also be triggered at the same time, as can stalemate and the 50 move rule.
I suppose it's not possible to trigger repetition and insufficient material at the same time, though, as reducing to insufficient material implies a capture, which cannot be repeated.
In case of repetition and fifty, the player that made the last move can also decide if it is repetition or fifty. So generally the player that made the last move will decide.
Deuterium rsif is not optimized on those specific rules. Will make some modification and try another tests.
Test 1:
k7/8/1Kr5/4N3/8/8/8/8 w - - bm Nxc6; c0 "win in 1 move via rsif stalemate wins for white";
White should play the bm to win the game.
[d]k7/8/1Kr5/4N3/8/8/8/8 w - - 0 1
Deuterium rsifCode: Select all
position fen k7/8/1Kr5/4N3/8/8/8/8 w - - 0 1 go movetime 50 info depth 1 seldepth 4 multipv 1 score cp -478 time 1 nodes 23 nps 23000 pv b6a5 c6c5 a5b4 c5e5 info depth 2 seldepth 4 multipv 1 score mate 1 time 18 nodes 44 nps 2444 pv e5c6 info depth 2 seldepth 3 multipv 1 score mate 1 time 28 nodes 54 nps 1928 pv e5c6 info depth 3 seldepth 2 multipv 1 score mate 1 time 33 nodes 60 nps 1818 pv e5c6 info depth 4 seldepth 5 multipv 1 score mate 1 time 36 nodes 83 nps 2305 pv e5c6 info depth 5 seldepth 5 multipv 1 score mate 1 time 39 nodes 114 nps 2923 pv e5c6 info depth 6 seldepth 6 multipv 1 score mate 1 time 42 nodes 147 nps 3500 pv e5c6 info depth 7 seldepth 6 multipv 1 score mate 1 time 45 nodes 179 nps 3977 pv e5c6 info depth 8 seldepth 6 multipv 1 score mate 1 time 47 nodes 212 nps 4510 pv e5c6 info time 54 nodes 213 bestmove e5c6
Test 2:
k1r5/8/1K6/4N3/8/8/8/8 b - - am Rc6+; c0 "After Nxc6 black cannot claim insufficient mating material rule because white will claim first stalemate which is a win for white";
Black should not play Rc6+.
[d]k1r5/8/1K6/4N3/8/8/8/8 b - - 0 1
Deuterium rsifCode: Select all
position fen k1r5/8/1K6/4N3/8/8/8/8 b - - 0 1 go movetime 50 info depth 1 seldepth 2 multipv 1 score cp 20 time 1 nodes 20 nps 20000 pv a8b8 info depth 2 seldepth 5 multipv 1 score cp 19 time 15 nodes 100 nps 6666 pv a8b8 b6b5 info depth 3 seldepth 5 multipv 1 score cp 21 time 15 nodes 394 nps 26266 pv c8e8 e5f3 a8b8 info depth 4 seldepth 7 multipv 1 score cp 19 time 31 nodes 1168 nps 37677 pv c8c1 e5d3 c1b1 b6c6 a8b8 info depth 5 seldepth 8 multipv 1 score cp 21 time 31 nodes 1801 nps 58096 pv c8c1 e5d3 c1c6 b6b5 a8b7 info depth 6 seldepth 10 multipv 1 score cp 21 time 31 nodes 3300 nps 106451 pv c8b8 b6c6 b8b6 c6c7 a8a7 e5d7 b6c6 c7d8 info depth 7 seldepth 10 multipv 1 score cp 23 time 31 nodes 5970 nps 192580 pv c8c5 e5f3 c5c6 b6b5 a8b7 f3d4 c6c8 info depth 8 seldepth 11 multipv 1 score cp 23 time 46 nodes 7353 nps 159847 pv c8c5 e5f3 c5c6 b6a5 a8b7 a5b5 c6c8 f3d4 info depth 9 seldepth 12 multipv 1 score cp 25 time 46 nodes 11313 nps 245934 pv c8c5 e5d3 c5c6 b6b5 a8b7 b5b4 c6c4 b4b5 c4c5 b5b4 c5c6 info time 62 nodes 11324 bestmove c8c5
6k1/4Q1p1/5p2/8/8/8/KP3qr1/8 w - - 91 150 bm Qe8+; c0 "White wins due to rsif 3-position repetition. Black cannot claim fify-move because it was white that played last.";
Notice the 91 in "6k1/4Q1p1/5p2/8/8/8/KP3qr1/8 w - - 91 150" that is the half-move clock. In normal chess if it reaches 100 without being checkmated one can claim a draw due to fifty-move draw rule.
So in that position white has to find a way to get the 3-position repetition in order to win in rsif rule but should not exceed 100 otherwise black will win.
[d]6k1/4Q1p1/5p2/8/8/8/KP3qr1/8 w - -
Deuterium rsif:
Code: Select all
position fen 6k1/4Q1p1/5p2/8/8/8/KP3qr1/8 w - - 91 150
go movetime 50
info depth 1 seldepth 6 multipv 1 score cp -651 time 1 nodes 59 nps 59000 pv e7b7 g2g1
info depth 2 seldepth 6 multipv 1 score cp -651 time 1 nodes 153 nps 153000 pv e7b7 g2g1
info depth 3 seldepth 8 multipv 1 score cp -681 time 15 nodes 581 nps 38733 pv e7e8
info depth 3 seldepth 9 multipv 1 score cp -665 time 15 nodes 686 nps 45733 pv e7e8 g8h7 e8b8 h7h6
info depth 4 seldepth 9 multipv 1 score cp -665 time 15 nodes 1026 nps 68400 pv e7e8 g8h7 e8h5 h7g8 h5e8 g8h7 e8b8 h7h6
info depth 5 seldepth 9 multipv 1 score mate 5 time 15 nodes 1035 nps 69000 pv e7e8
info depth 5 seldepth 9 multipv 1 score mate 5 time 31 nodes 1521 nps 49064 pv e7e8 g8h7 e8h5 h7g8 h5e8 g8h7 e8h5 h7g8 h5e8
info depth 6 seldepth 9 multipv 1 score mate 5 time 31 nodes 2123 nps 68483 pv e7e8 g8h7 e8h5 h7g8 h5e8 g8h7 e8h5 h7g8 h5e8
info depth 7 seldepth 9 multipv 1 score mate 5 time 31 nodes 2934 nps 94645 pv e7e8 g8h7 e8h5 h7g8 h5e8 g8h7 e8h5 h7g8 h5e8
info depth 8 seldepth 10 multipv 1 score mate 5 time 46 nodes 3929 nps 85413 pv e7e8 g8h7 e8h5 h7g8 h5e8 g8h7 e8h5 h7g8 h5e8
info depth 9 seldepth 11 multipv 1 score mate 5 time 46 nodes 4986 nps 108391 pv e7e8 g8h7 e8h5 h7g8 h5e8 g8h7 e8h5 h7g8 h5e8
info depth 10 seldepth 14 multipv 1 score mate 5 time 46 nodes 6498 nps 141260 pv e7e8 g8h7 e8h5 h7g8 h5e8 g8h7 e8h5 h7g8 h5e8
info depth 11 seldepth 14 multipv 1 score mate 5 time 46 nodes 8381 nps 182195 pv e7e8 g8h7 e8h5 h7g8 h5e8 g8h7 e8h5 h7g8 h5e8
info time 62 nodes 8390
bestmove e7e8
Black could have claimed fifty-move rule because the halmove-clock has reached 100 (91+9=100), but it is white that played the last move h8e8, so white wins.
Test 4
If we increase that 91 to 92, Deuterium rsif would no longer consider it as a win for white.
6k1/4Q1p1/5p2/8/8/8/KP3qr1/8 w - - 92 150 c0 "Black is winning, white could not deliver a 3-position repetition win due to fifty-move rule which black will win instead";
[d]6k1/4Q1p1/5p2/8/8/8/KP3qr1/8 w - - 92 150
Deuterium rsif
Code: Select all
position fen 6k1/4Q1p1/5p2/8/8/8/KP3qr1/8 w - - 92 150
go movetime 50
info depth 1 seldepth 6 multipv 1 score cp -629 time 1 nodes 55 nps 55000 pv e7b7 g8h7
info depth 2 seldepth 6 multipv 1 score cp -665 time 16 nodes 304 nps 19000 pv e7e8 g8h7 e8b8 h7h6
info depth 3 seldepth 8 multipv 1 score cp -655 time 16 nodes 495 nps 30937 pv e7e8 g8h7 e8h5 h7g8 h5e8 g8h7 e8b8
info depth 4 seldepth 9 multipv 1 score cp -723 time 16 nodes 1487 nps 92937 pv e7b7 g8h7 b7b3 f2a7 b3a3
info depth 5 seldepth 9 multipv 1 score cp -769 time 16 nodes 2496 nps 156000 pv e7b7 g8h7 b7b8 f2f1 b8b7 f1c4 b7b3
info depth 6 seldepth 11 multipv 1 score cp -782 time 32 nodes 3799 nps 118718 pv e7b7 g8h7 b7b8 f2f1 b8c8 g2g1
info depth 7 seldepth 13 multipv 1 score cp -876 time 32 nodes 8489 nps 265281 pv e7a3 f2f1 a3a8 g8h7 a8c6 g2g1 b2b4 f1f2 a2a3 g1a1 a3b3
info depth 8 seldepth 15 multipv 1 score cp -906 time 32 nodes 10896 nps 340500 pv e7a3
info depth 8 seldepth 17 multipv 1 score cp -1056 time 47 nodes 17431 nps 370872 pv e7a3 f2f1 a3a8 g8h7 a8c6 g2g1 b2b4 f1a1 a2b3 g1b1 b3c4 b1c1 c4d5 c1c6 d5c6
info depth 9 seldepth 15 multipv 1 score cp -1056 time 63 nodes 19656 nps 312000 pv e7b4 g8h7 b4b7 f2f1 b7c6 g2g1 b2b4 f1a1 a2b3 g1b1 b3c4 b1c1 c4d5 c1c6 d5c6
info time 63 nodes 19656
bestmove e7b4 ponder g8h7