Nalimov EGTB problem related to DTM?

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Nalimov EGTB problem related to DTM?

Post by Laskos »

Playing around with hard 5-men wins, I started to observe that from 5-men root positions the "Syzygy perfect play" wins over "Nalimov perfect play". On some KBBKN won positions Nalimov failed to convert. An example:

[D]8/4K3/8/4B1n1/B7/8/5k2/8 w - - 0 1

It's a win in 62. If I am not doing anything wrong, Nalimov 3-4-5 men EGTB, at least in their implementation, fail to convert it. I checked with Houdini 4 and Shredder 12.

I have a set of KBBKN won positions which Nalimov fails to convert (Syzygy is converting them), but I didn't check if all of them are in fact wins. Is this issue related to the use of DTM and 50 move rule?

Code: Select all

2Bn4/8/2k5/8/8/1K6/8/4B3 w - - 0 1
5BB1/8/8/1n6/8/8/7K/3k4 w - - 0 1
1B6/3K4/8/8/1k6/1B6/6n1/8 w - - 0 1
8/4k2B/8/8/8/1K6/3B1n2/8 w - - 0 1
B7/8/4nB2/k7/8/8/8/1K6 w - - 0 1
8/6B1/6B1/8/8/7n/8/K6k w - - 0 1
1K6/8/8/2n5/8/8/1k6/3BB3 w - - 0 1
3B4/4K3/4B3/8/8/8/7k/5n2 w - - 0 1
4n3/2k5/8/8/4B2B/7K/8/8 w - - 0 1
8/8/7K/8/2nB4/8/8/3k3B w - - 0 1
8/1n6/8/8/7K/k7/8/1B2B3 w - - 0 1
2B2n2/8/5Bk1/8/8/3K4/8/8 w - - 0 1
8/8/2k5/7B/2nBK3/8/8/8 w - - 0 1
8/8/1K6/8/1B6/8/2B5/5kn1 w - - 0 1
5B2/8/8/1k6/4B3/1n6/5K2/8 w - - 0 1
8/K7/8/8/8/8/1B6/1k1B1n2 w - - 0 1
8/B7/6k1/5n2/8/7K/8/5B2 w - - 0 1
8/8/8/2K2B2/7B/5n2/8/5k2 w - - 0 1
K7/2B3nk/8/8/8/1B6/8/8 w - - 0 1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: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Nalimov EGTB problem related to DTM?

Post by hgm »

It is related to ignoring the 50- move rule. Even in a DTM framework you could do better. You would have to keep track of DTZ during building, though.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Nalimov EGTB problem related to DTM?

Post by Laskos »

hgm wrote:It is related to ignoring the 50- move rule. Even in a DTM framework you could do better. You would have to keep track of DTZ during building, though.
I only now realized how important this might be in harder (longer) wins. Out of a set of 250 hard 5-men wins I collected, about 50 were unsolved by Nalimovs. This problem should be even more pronounced with 6-men. I am surprised that Syzygy does so well comparatively, even if it theoretically lacks DTR/DTZR.
User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 9:48 am

Re: Nalimov EGTB problem related to DTM?

Post by velmarin »

Laskos wrote: An example:

[D]8/4K3/8/4B1n1/B7/8/5k2/8 w - - 0 1

It's a win in 62. If I am not doing anything wrong, Nalimov 3-4-5 men EGTB, at least in their implementation, fail to convert it. I checked with Houdini 4 and Shredder 12.
It seems you have a configuration problem, at least in the Fritz GUI having loaded the Nalimov all engines see the mate in 62.
Nalimov online does not have a problem with any of the positions.
http://www.k4it.de/?topic=egtb&lang=en
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Nalimov EGTB problem related to DTM?

Post by Laskos »

velmarin wrote:
Laskos wrote: An example:

[D]8/4K3/8/4B1n1/B7/8/5k2/8 w - - 0 1

It's a win in 62. If I am not doing anything wrong, Nalimov 3-4-5 men EGTB, at least in their implementation, fail to convert it. I checked with Houdini 4 and Shredder 12.
It seems you have a configuration problem, at least in the Fritz GUI having loaded the Nalimov all engines see the mate in 62.
Nalimov online does not have a problem with any of the positions.
http://www.k4it.de/?topic=egtb&lang=en
I am worried about my tests here with egtbs, but that it's showing mate in 62 doesn't mean it actually converts it. My tests were Houdini/Shredder Nalimov versus Komodo/Stockfish Syzygy with 5 men at the root.
User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 9:48 am

Re: Nalimov EGTB problem related to DTM?

Post by velmarin »

Syzygy website gives different moves to mate
https://syzygy-tables.info/?fen=8/4K3/8 ... 0-%200%201
Lomosov site coincides with Nalimov.
Although the capture of the horse, is move 52.
http://tb7.chessok.com/probe
[pgn]
[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "1-0"]
[SetUp "1"]
[FEN "8/4K3/8/4B1n1/B7/8/5k2/8 w - -"]

1.Bf4 Nh3 2.Bc1 Ng1 3.Ke6 Nf3 4.Kf5 Nh4+ 5.Ke4 Ng2 6.Bb2 Nh4 7.Bd4+ Kg3 8.Bd1
Ng2 9.Bb6 Nh4 10.Kd3 Ng2 11.Bc7+ Kf2 12.Kd2 Nh4 13.Bb6+ Kg3 14.Ke2 Nf5 15.Ba4
Kg4 16.Bc7 Nd4+ 17.Ke3 Ne6 18.Be5 Kf5 19.Bc3 Nc5 20.Bc6 Ke6 21.Bf3 Na6 22.Ke4
Nc7 23.Bg4+ Kd6 24.Bb4+ Kc6 25.Bf3 Kb5 26.Ba3 Na8 27.Kd4 Nb6 28.Be4 Nc8 29.Bg6
Kc6 30.Be8+ Kb6 31.Ba4 Na7 32.Kd5 Nc8 33.Bb4 Na7 34.Bd2 Nc8 35.Bg5 Na7 36.Bd8+
Kb7 37.Bd7 Kb8 38.Bf5 Kb7 39.Kc5 Nc6 40.Be4 Kc8 41.Bf6 Nd8 42.Bf5+ Kc7 43.Be5+
Kb7 44.Bg4 Nf7 45.Bf6 Kc7 46.Be6 Nd8 47.Be5+ Kb7 48.Bc4 Kc8 49.Kd6 Nb7+ 50.Ke7
Nc5 51.Bd6 Kb7 52.Bxc5 Kc6 53.Bd4 Kc7 54.Bb5 Kc8 55.Kd6 Kd8 56.Bc5 Kc8 57.Kc6
Kd8 58.Kb6 Kc8 59.Be7 Kb8 60.Ba6 Ka8 61.Bb7+ Kb8 62.Bd6# 1-0
[/pgn]
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Nalimov EGTB problem related to DTM?

Post by Laskos »

velmarin wrote:Syzygy website gives different moves to mate
https://syzygy-tables.info/?fen=8/4K3/8 ... 0-%200%201
Lomosov site coincides with Nalimov.
Although the capture of the horse, is move 52.
Therefore Nalimov shows a draw (if claimed).
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Nalimov EGTB problem related to DTM?

Post by syzygy »

Laskos wrote:
hgm wrote:It is related to ignoring the 50- move rule. Even in a DTM framework you could do better. You would have to keep track of DTZ during building, though.
I only now realized how important this might be in harder (longer) wins. Out of a set of 250 hard 5-men wins I collected, about 50 were unsolved by Nalimovs. This problem should be even more pronounced with 6-men. I am surprised that Syzygy does so well comparatively, even if it theoretically lacks DTR/DTZR.
There are 5 types of positions:
- wins
- cursed wins (i.e. win but 50-move draw)
- draws
- blessed losses (i.e. loss but 50-move draw)
- losses

DTZ50 will win wins and will at least draw cursed wins, draws and blessed losses.

DTM will at least draw wins, cursed wins and draws. It may lose blessed losses and losses.

So if DTZ50 plays DTM:
- win results in win
- cursed win results in draw or win
- draw results in draw
- blessed loss results in draw
- loss results in draw or loss

Or symmetrically, if DTM plays DTZ50:
- win results in win or draw
- cursed win results in draw
- draw results in draw
- blessed loss results in draw or loss
- loss results in loss

DTZ50 v DTZ50 gives "perfect play". Once the opponent uses DTZ50, you will not be able to win a cursed win or to draw a loss.

If the opponent uses DTM, then you can hope to win a cursed win or to draw a loss.

How to play cursed wins or losses optimally is a very interesting question.

When trying to draw a lost position, the most obvious thing to do is to maximise DTZ on each move. But that is not necessarily optimal. If the current position has, say, DTZ = 50 ply, you probably won't be able to last till 101 plies. But there might be a way to force or trick the opponent into playing or allowing a pawn move after 20 ply that transitions the game into a position with DTZ = 98 ply, which gives much better chances.

Similar considerations apply to trying to win a cursed win. Cursed win means you can force a mate, but the opponent can force the path to mate to include a "phase" (between two zeroing moves) lasting more than 100 plies. Ideally you want to minimise the length of the longest phase and then minimise DTZ during that phase and hope for opponent mistakes.

Syzygy TBs store "DTZ50+". A value from 1 to 100 is the distance in plies to a zeroing move leading to a won position. A value > 100 is either the distance to a zeroing move leading to a won position or the distance plus 100 to a zeroing move leading to a cursed win. It is enough to implement the simple strategy of minimising or maximising DTZ, but it does not give "global" information, i.e. information on the length of phases after the current phase.

DTR is an attempt to encode more global information, but since its value depends on the value of the 50-move counter it is not very usable when it comes to generating practical TBs. (But dependency on the current value of the 50-move counter is unavoidable if you want "best" play against fallible opponents: if you can barely reach a zeroing move before the 50-move counter runs out, you have no room for manoeuvre. If you have plenty of moves left, then you can spend those on manoeuvring into a position with a much more promising next phase.)
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Nalimov EGTB problem related to DTM?

Post by syzygy »

Some time ago I helped a correspondence player win an endgame that was drawn under the 50-move rule, but could be won under a 52-move rule. For this I generated a few DTZ52 and DTZ51 tables. The idea was to play "optimal" winning DTZ52 moves until the position became winnable under the 51-move (due to suboptimal DTZ51-play by the opponent). Then play optimal winning DTZ51 moves until the position became winnable under the 50-move rule. The opponent played surprisingly well (even deviating from Nalimov a couple of times at just the right time), but in the end made mistakes.

(I'm not sure if this kind of help was completely ethical. It was an interesting experiment. Of course with current correspondence chess rules, the drawn 6-piece position would have been wrongly adjudicated as a win.)
User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 9:48 am

Re: Nalimov EGTB problem related to DTM?

Post by velmarin »

Ronald, a good explanation to be understood.
This already talked about it in other posts, the 50 moves rule was changed again from 2001 to 2003, even there are historical items with more than 50 moves.
I guess when the Nalimov created was not how a referee of adjuducacion, rather a support for engines that support them.
And now we ask more, human players doubt with a horse and Bishop against King matte...
Now the support of Nalimov and SyzyGy is complete for any engine in Fritz GUI when the pieces on the Board are coincident.
In my thinking the bases without DTM, (also Syzigy, lomonosov, robbotriplebasses ) are consulted much before and are a very important factor in the evaluation of positions.

In correspondence one expected to have better resources than the contrary ( books, engines, bases, tablebasses) and take advantage of them. One of them is the remove pieces or pawns of a position to a evaluate position, well know if you win, empatas or lose with almost a XX/100, and replace pieces.