syzygy question

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

syzygy question

Post by bob »

This has come up in Crafty discussions, and since I have intentionally not followed the W/D/L type endgame table discussions, I have a question.

One significant issue with W/D/L was "progress". IE you know whether a position is won or lost (or drawn) but you don't know how to make progress once you are in that particular endgame class. I assume this is still the case?

If so, is traditional DTM tables (or DTZ50 for that matter) the usual solution to handle the "make progress" case once in that specific endgame???

IE W/D/L used in the search, DTM/DTZ used at the root to make progress?
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: syzygy question

Post by syzygy »

bob wrote:This has come up in Crafty discussions, and since I have intentionally not followed the W/D/L type endgame table discussions, I have a question.

One significant issue with W/D/L was "progress". IE you know whether a position is won or lost (or drawn) but you don't know how to make progress once you are in that particular endgame class. I assume this is still the case?

If so, is traditional DTM tables (or DTZ50 for that matter) the usual solution to handle the "make progress" case once in that specific endgame???

IE W/D/L used in the search, DTM/DTZ used at the root to make progress?
Yes, the engine is supposed to use the WDL tables within the search tree and the DTZ tables at the root.

To avoid unnatural moves caused by "DTZ-optimal" play, the engine could use DTZ to filter out all root moves that would lose half or a whole point and then search the remaining moves without probing any tables. This is what SF does. Some care has to be taken to avoid the possibility of spoiling a win by three-fold repetition (the trick is to switch to DTZ-optimal play immediately after the first repetition). If the root position is losing or drawn, this is basically swindle mode.

If DTZ tables are not available, then WDL tables can be used at the root to similarly filter out moves that the WDL tables tells you are bad. The remaining moves could then be searched while probing WDL tables after a capture or pawn move. This will of course not work in all positions.

Since the WDL (or rather, WDL50) tables take into account the 50-move rule (they return -2,-1,0,1,2 depending on whether the position is a loss, loss but 50-move draw, draw, win but 50-move draw, win), they should be used together with the DTZ50 tables (which store distance to zero for winning and losing positions and a slightly more complicated metric for the 50-move draw wins/losses which still guarantees conversion in case the 50-move rule is ignored). But I guess it would be possible, at the root, to first use DTZ50 to filter out the bad moves and then use DTM to select a move out of those that remain.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: syzygy question

Post by bob »

syzygy wrote:
bob wrote:This has come up in Crafty discussions, and since I have intentionally not followed the W/D/L type endgame table discussions, I have a question.

One significant issue with W/D/L was "progress". IE you know whether a position is won or lost (or drawn) but you don't know how to make progress once you are in that particular endgame class. I assume this is still the case?

If so, is traditional DTM tables (or DTZ50 for that matter) the usual solution to handle the "make progress" case once in that specific endgame???

IE W/D/L used in the search, DTM/DTZ used at the root to make progress?
Yes, the engine is supposed to use the WDL tables within the search tree and the DTZ tables at the root.

To avoid unnatural moves caused by "DTZ-optimal" play, the engine could use DTZ to filter out all root moves that would lose half or a whole point and then search the remaining moves without probing any tables. This is what SF does. Some care has to be taken to avoid the possibility of spoiling a win by three-fold repetition (the trick is to switch to DTZ-optimal play immediately after the first repetition). If the root position is losing or drawn, this is basically swindle mode.

If DTZ tables are not available, then WDL tables can be used at the root to similarly filter out moves that the WDL tables tells you are bad. The remaining moves could then be searched while probing WDL tables after a capture or pawn move. This will of course not work in all positions.

Since the WDL (or rather, WDL50) tables take into account the 50-move rule (they return -2,-1,0,1,2 depending on whether the position is a loss, loss but 50-move draw, draw, win but 50-move draw, win), they should be used together with the DTZ50 tables (which store distance to zero for winning and losing positions and a slightly more complicated metric for the 50-move draw wins/losses which still guarantees conversion in case the 50-move rule is ignored). But I guess it would be possible, at the root, to first use DTZ50 to filter out the bad moves and then use DTM to select a move out of those that remain.
That is what I recalled from when this was first discussed, so it seems like nothing has really changed other than the cursed/blessed stuff. I suppose the question I need to consider next is whether to get rid of DTM completely and revert back to DTZ (which I used many moons ago with Ken's tables).