This is fixed now, see:
https://github.com/jdart1/arasan-chess/ ... 1b111959bd.
This is quite a tricky endgame. It is good test for tbs.
--Jon
Syzygy and draw by repetition
Moderators: hgm, Rebel, chrisw
-
- Posts: 4367
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
-
- Posts: 5566
- Joined: Tue Feb 28, 2012 11:56 pm
Re: Syzygy and draw by repetition
Excellent, but it seems that this only tests if the current root position is repeating an earlier position in the game history. To be fully safe, the engine needs to test (or simply remember) whether there has been some repetition in the game history since the last pawn move or capture.
Basically what should be avoided is that a move is played that brings DTZ to a value higher than the DTZ of that repeated position. Once DTZ is again higher, repeating the earlier repeated position *might* be the only way to win the game (except that it will draw this time). Such a move back to a higher DTZ can be played also in positions that are not themselves repeats.
So the idea is this:
- the engine enters a difficult endgame and tries to win it using its own search (guarded by DTZ);
- after some moves, it repeats in a position with DTZ=25 (say).
- since this position is repeated, the engine will play a DTZ-optimal move, bringing DTZ to 24;
- the engine might now play a few good moves bringing DTZ to 23,22,21.
- unfortunately, the engine then picks a not so good move bringing DTZ back to 27;
- but now the only way leading to a win might go through the DTZ=25 position that was already repeated once.
Indeed, and I am happy to have an example showing that the problem is not merely theoretical.This is quite a tricky endgame. It is good test for tbs.
-
- Posts: 4367
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
Re: Syzygy and draw by repetition
Yeah, I was afraid of that. I can add that check. Thanks.whether there has been some repetition in the game history since the last pawn move or capture
--Jon
-
- Posts: 2272
- Joined: Mon Sep 29, 2008 1:50 am
Re: Syzygy and draw by repetition
So this can be used for a more refined filtering. Only eliminate at root the moves with a DTZ higher than the repeated position(s) (besides of course the moves that change the game theoretic value).Ronald wrote: Basically what should be avoided is that a move is played that brings DTZ to a value higher than the DTZ of that repeated position.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
Without ideas there is nothing to simplify.
-
- Posts: 411
- Joined: Thu Dec 30, 2010 4:48 am
Re: Syzygy and draw by repetition
Because you've had a repetition at all, it's indicative the engine has no clue how to progress by the 'natural' evaluation. You may as well just follow strict DTZ til the counter resets.
-
- Posts: 2272
- Joined: Mon Sep 29, 2008 1:50 am
Re: Syzygy and draw by repetition
I guess agree with this principle. It does not seem to lead to bad DTZ behaviour (silly sacrifices).kbhearn wrote:Because you've had a repetition at all, it's indicative the engine has no clue how to progress by the 'natural' evaluation. You may as well just follow strict DTZ til the counter resets.
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
Without ideas there is nothing to simplify.
-
- Posts: 778
- Joined: Sat Jul 01, 2006 7:11 am
Re: Syzygy and draw by repetition
If I understand correctly, using just DTZ for KRPk would typically result in:
Promote pawn to queen.
Sacrifice queen.
Mate with rook.
Promote pawn to queen.
Sacrifice queen.
Mate with rook.
-
- Posts: 411
- Joined: Thu Dec 30, 2010 4:48 am
Re: Syzygy and draw by repetition
It could. But why is there a repetition since last progress move in the history of a KRPk ending? (and note that after the pawn was pushed once it'd go back to assuming the engine's eval could guide it to a win unless the 50 move rule was encroaching or the engine repeated positions again).jwes wrote:If I understand correctly, using just DTZ for KRPk would typically result in:
Promote pawn to queen.
Sacrifice queen.
Mate with rook.
Mostly you'd expect to see repetitions come up in endings like KQkrp where you have to make a sequence of zugzwangs to maneuvre the attacking king behind the pawn and the eval may not understand what progress is.
-
- Posts: 2851
- Joined: Wed Mar 08, 2006 10:01 pm
- Location: Irvine, CA, USA
Re: Syzygy and draw by repetition
Probably not. To guarantee the strange play it has to be able to force the acceptance of the queen sacrifice, and that has to be faster than the mate. A queen sacrifice is much more likely in a KQBNk ending.jwes wrote:If I understand correctly, using just DTZ for KRPk would typically result in:
Promote pawn to queen.
Sacrifice queen.
Mate with rook.
Deasil is the right way to go.