question about syzygy probing

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 9:48 am

Re: question about syzygy probing

Post by velmarin »

Dirt wrote: It's all a matter of what you prefer. Now, I like the idea that in KBNR vs K that you should quickly sacrifice the rook to reach a winning KBN vs K position, but many people think that's stupid. It almost certainly won't lead to the shortest checkmate.
Not need to sacrifice the Rook. Simple you do mate with Bishop and Knight, ignoring the Rook.
The same example used to KNRQvsK, the Queen sacrificing is.
The same engine without tables do not choose this sacrifice.

Everything points to a bug, which we do not know if you can have other consequences during the game.
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: question about syzygy probing

Post by syzygy »

Dirt wrote:
elcabesa wrote:I have another question about the root node search.
State of the art is filtering out bad moves in root and let the search choose the move it like the most?
It's all a matter of what you prefer. Now, I like the idea that in KBNR vs K that you should quickly sacrifice the rook to reach a winning KBN vs K position, but many people think that's stupid. It almost certainly won't lead to the shortest checkmate.
To explain this a bit more:
If the engine at the root simply picks the move that leads to the smallest DTZ value, then that will likely result in an attempt to sac a piece as quickly as possible.

This is "DTZ-optimal" play from both sides from a KRBNvK position with highest DTZ:
[pgn][FEN "8/8/8/8/8/B7/N2k4/RK6 b - - 0 1"]
1... Ke3 2. Nc3 Kf3 3. Bc1 Kg4 4. Bf4 Kf3 5. Ra2 Kg4 6. Rg2+ Kh4 7. Nd1 Kh3
8. Bg5 Kxg2[/pgn]
Against a "normal" opponent playing as black, the bishop would have gone off at move 4. Then white would probably have tried to sac its knight (or at least play so carelessly with it that black could win it - because DTZ optimal means that white assumes the opponent tries to avoid a zeroing move into a winning position).

To avoid such things, it is better to let the engine pick a move and use the DTZ information only to make sure that move makes sufficient progress (i.e. avoids a draw by the 50-move rule).
User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 9:48 am

Re: question about syzygy probing

Post by velmarin »

Before I was wrong to put KNRQvsK,
It was KNBQvsK. same behavior than the Rook.

It seems a bit absurd to see.
[pgn]
[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Nueva partida"]
[Black "?"]
[Result "*"]
[SetUp "1"]
[FEN "8/4k3/8/8/8/2N5/1BK5/3Q4 w - - 0 0"]
[PlyCount "1"]

1. Qd6+ *
[/pgn]
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: question about syzygy probing

Post by hgm »

It could be the only move that wins. If the the ply counter is at 92.

You might argue that the ply counter is not at 92. But the point is that the EGT does not know about the ply counter. Otherwise you would need 100 different EGTs, one for each value of the ply counter. But instead you have only one, and you want it to work for all values of the ply counter.

Under those circumstances it is always best to make resetting the ply counter (to a position that is a certain win) your first priority.