Problem with Syzygy bases

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

Moderators: hgm, chrisw, Rebel

User avatar
Rebel
Posts: 7215
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Problem with Syzygy bases

Post by Rebel »

I am working to improve my NN with Syzygy bases, I have installed the 3-6 men and the 10 most used 7-men and use SF16 to reanalyze the 3-6 men and the 10 most used 7-men in my NN.

This goes well except for 1/3500 cases the bases don't return a TB score and I wonder what the reason is. I went to https://syzygy-tables.info/ and here the failed positions worked well. So maybe a false download?

Some failed positions.

Code: Select all

2n5/2P5/8/1k6/p7/3K4/3N1p2/8 b - - 0 1 68 c8d6 0
8/kp3KP1/8/2q5/5Q2/8/8/8 b - - 0 1 -19 c5d5 0
8/8/8/1k5p/3K3N/8/4N3/8 b - - 0 1 -28 b5c6 0
Maybe someone is willing to check?
90% of coding is debugging, the other 10% is writing bugs.
Jouni
Posts: 3446
Joined: Wed Mar 08, 2006 8:15 pm
Full name: Jouni Uski

Re: Problem with Syzygy bases

Post by Jouni »

In last position SF 17 thinks, that white win (50 move draw on).

Analysis by Stockfish 17:

1...Kc6 2.Ke4 Kc5 3.Nd4 Kd6 4.Nb3 Ke6 5.Nc5+ Kd6 6.Kd4 Kc6 7.Ne4 Kb5 8.Kd5 Kb4 9.Nf2 Kc3 10.Kc5 Kd2 11.Kd4 Kc2 12.Ne4 Kb3 13.Kc5 Ka3 14.Kc4 Ka4 15.Nf2 Ka5 16.Kc5 Ka4 17.Nd3 Ka5 18.Nb4 Ka4 19.Nc6 Kb3 20.Kd4 Kc2 21.Na5 Kd2 22.Nb3+ Ke2 23.Ke4 Kf2 24.Nd4 Kg3 25.Ndf5+ Kf2 26.Kd3 Ke1 27.Nd6 Kf2 28.Ne4+ Ke1 29.Ng2+ Kd1 30.Nc5 Kc1 31.Ne3 Kb2 32.Kd2 Kb1 33.Nc4 Ka2 34.Kc1 Ka1 35.Nb3+ Ka2 36.Kc2 h4 37.Nc1+ Ka1 38.Nb2 h3 39.Nd1 h2 40.Nc3 h1Q 41.Nb3#
+- (200.00) Depth: 7/7 00:00:00 0kN, tb=6

Nalimov tbs says mate in 79.

What's this??
Jouni
User avatar
Brunetti
Posts: 345
Joined: Tue Dec 08, 2009 1:37 pm
Location: Milan, Italy
Full name: Alex Brunetti

Re: Problem with Syzygy bases

Post by Brunetti »

Jouni wrote: Wed Nov 20, 2024 10:58 pm What's this??
If you explore the Stockfish line on the Syzygy tables site, you’ll encounter some peculiar positions. I’m not an expert in tablebases, but here’s an example:

[d]8/8/8/7p/2K1N2N/k7/8/8 b - - 0 1

The site shows:

Code: Select all

Black is losing DTM 122 DTZ 45
Ka4 DTM 107 Loss with DTZ 44
Kb2 DTM 121 Loss with DTZ 28
Ka2 DTM 103 Loss with DTZ 16
stating that ...Ka4 is the best move, while Lichess online tablebases indicate ...Kb2 as the best choice for Black.
There are several such instances along this line. I hope this information proves helpful.

Alex
syzygy
Posts: 5650
Joined: Tue Feb 28, 2012 11:56 pm

Re: Problem with Syzygy bases

Post by syzygy »

Rebel wrote: Wed Nov 20, 2024 8:32 pmand the 10 most used 7-men
[d]2n5/2P5/8/1k6/p7/3K4/3N1p2/8 b
You need all the tables into which black can promote.
syzygy
Posts: 5650
Joined: Tue Feb 28, 2012 11:56 pm

Re: Problem with Syzygy bases

Post by syzygy »

Jouni wrote: Wed Nov 20, 2024 10:58 pm In last position SF 17 thinks, that white win (50 move draw on).

Analysis by Stockfish 17:

1...Kc6 2.Ke4 Kc5 3.Nd4 Kd6 4.Nb3 Ke6 5.Nc5+ Kd6 6.Kd4 Kc6 7.Ne4 Kb5 8.Kd5 Kb4 9.Nf2 Kc3 10.Kc5 Kd2 11.Kd4 Kc2 12.Ne4 Kb3 13.Kc5 Ka3 14.Kc4 Ka4 15.Nf2 Ka5 16.Kc5 Ka4 17.Nd3 Ka5 18.Nb4 Ka4 19.Nc6 Kb3 20.Kd4 Kc2 21.Na5 Kd2 22.Nb3+ Ke2 23.Ke4 Kf2 24.Nd4 Kg3 25.Ndf5+ Kf2 26.Kd3 Ke1 27.Nd6 Kf2 28.Ne4+ Ke1 29.Ng2+ Kd1 30.Nc5 Kc1 31.Ne3 Kb2 32.Kd2 Kb1 33.Nc4 Ka2 34.Kc1 Ka1 35.Nb3+ Ka2 36.Kc2 h4 37.Nc1+ Ka1 38.Nb2 h3 39.Nd1 h2 40.Nc3 h1Q 41.Nb3#
+- (200.00) Depth: 7/7 00:00:00 0kN, tb=6

Nalimov tbs says mate in 79.

What's this??
It seems Stockfish gets that wrong. Is it repeatable with different hash sizes?
syzygy
Posts: 5650
Joined: Tue Feb 28, 2012 11:56 pm

Re: Problem with Syzygy bases

Post by syzygy »

syzygy wrote: Thu Nov 21, 2024 1:52 am
Jouni wrote: Wed Nov 20, 2024 10:58 pm In last position SF 17 thinks, that white win (50 move draw on).

Analysis by Stockfish 17:

1...Kc6 2.Ke4 Kc5 3.Nd4 Kd6 4.Nb3 Ke6 5.Nc5+ Kd6 6.Kd4 Kc6 7.Ne4 Kb5 8.Kd5 Kb4 9.Nf2 Kc3 10.Kc5 Kd2 11.Kd4 Kc2 12.Ne4 Kb3 13.Kc5 Ka3 14.Kc4 Ka4 15.Nf2 Ka5 16.Kc5 Ka4 17.Nd3 Ka5 18.Nb4 Ka4 19.Nc6 Kb3 20.Kd4 Kc2 21.Na5 Kd2 22.Nb3+ Ke2 23.Ke4 Kf2 24.Nd4 Kg3 25.Ndf5+ Kf2 26.Kd3 Ke1 27.Nd6 Kf2 28.Ne4+ Ke1 29.Ng2+ Kd1 30.Nc5 Kc1 31.Ne3 Kb2 32.Kd2 Kb1 33.Nc4 Ka2 34.Kc1 Ka1 35.Nb3+ Ka2 36.Kc2 h4 37.Nc1+ Ka1 38.Nb2 h3 39.Nd1 h2 40.Nc3 h1Q 41.Nb3#
+- (200.00) Depth: 7/7 00:00:00 0kN, tb=6

Nalimov tbs says mate in 79.

What's this??
It seems Stockfish gets that wrong. Is it repeatable with different hash sizes?
I think I am getting the same result:

Code: Select all

info depth 60 seldepth 123 multipv 1 score cp -20000 nodes 3577883971 nps 7699308 hashfull 173 tbhits 6 time 464702 pv b5c6 d4e4 c6c5 e2d4 c5d6 d4b3 d6e6 b3c5 e6d6 e4d4 d6c6 c5e4 c6b5 d4d5 b5b4 e4f2 b4c3 d5c5 c3d2 c5d4 d2c2 f2e4 c2b3 d4c5 b3a3 c5c4 a3a4 e4f2 a4a5 c4c5 a5a4 f2d3 a4a5 d3b4 a5a4 b4c6 a4b3 c5d4 b3c2 c6a5 c2d2 a5b3 d2e2 d4e4 e2f2 b3d4 f2g3 d4f5 g3f2 e4d3 f2e1 f5d6 e1f2 d6e4 f2e1 h4g2 e1d1 e4c5 d1c1 g2e3 c1b2 d3d2 b2b1 e3c4 b1a2 d2c1 a2a1 c5b3 a1a2 c1c2 h5h4 b3c1 a2a1 c4b2 h4h3 b2d1 h3h2 d1c3 h2h1q c1b3
I did not check the full line, but it also ends with h1Q and Nb3, which is probably mate.

The line does end in mate, but it is not the optimal line.
However, SF does not return a mate score. It return what I think is the TB win score.

So maybe this is not strictly a bug (SF does not actually find a mate), but it is strange to see the PV end in mate.