Does Syzygy WDL Probe Do Anything?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

D Sceviour
Posts: 570
Joined: Mon Jul 20, 2015 5:06 pm

Does Syzygy WDL Probe Do Anything?

Post by D Sceviour »

[d]8/2p2B2/2P5/4k3/3n4/6p1/6K1/8 b - - 86 95

Code: Select all

// Probe with Syzygy WDL
Black(1): go
depth score time nodes pv
1 185 0 17 e5f4
 #tb_hits 0 tbhits 0
2 214 0 63 e5f4 f7e8
 #tb_hits 1 tbhits 1
3 192 0 121 e5f4 f7e8 f4g4
 #tb_hits 1 tbhits 1
4 155 0 310 e5f4 f7d5 f4g4 d5e4
 #tb_hits 2 tbhits 2
5 159 0 408 e5f4 f7d5 f4g4 d5e4 g4f4
 #tb_hits 7 tbhits 7
6 227 1 767 e5f4 f7d5 d4f5 d5b3 f5e7 b3e6
 #tb_hits 12 tbhits 12
7 222 1 1335 e5f4 f7e8 d4f5 e8f7 f5e3 g2g1 f4g4
 #tb_hits 16 tbhits 16
8 200 1 1675 e5f4 f7e8 d4f5 e8d7 f5e3 g2g1 e3d5 d7e6
 #tb_hits 20 tbhits 20
9 185 2 2722 e5f4 f7e8 d4f5 e8f7 f5e3 g2h3 e3g4 h3g2
 #tb_hits 37 tbhits 37
10 190 2 2992 e5f4 f7e8 d4f5 e8f7 f5e3 g2h3 f4f3 f7b3
 #tb_hits 39 tbhits 39
11 185 2 4664 e5f4 f7e8 d4c2 e8f7 c2e1 g2h3 e1d3 h3g2
 #tb_hits 62 tbhits 62
12 199 3 9936 e5f4 f7e8 d4c2 e8h5 c2e1 g2h3 e1d3 h5f7
 #tb_hits 165 tbhits 165
13 199 3 11204 e5f4 f7e8 d4c2 e8h5 c2e1 g2h3 e1d3 h5f7
 #tb_hits 207 tbhits 207
14 197 4 12781 e5f4 f7e8 d4c2 e8h5 c2e1 g2h3 e1d3 h3g2
 #tb_hits 249 tbhits 249
move e5f4
elap: 0.047000
Total Nodes=12782 nps: 271957
tbhits 249
EGTB Hits 249 tbmiss 0
White(1):
I cannot see how Syzygy WDL probe does anything. Even with 249 table base hits, the engine avoids going into the eventual drawn position to keep the false advantage of the extra material score of a pawn. ELO tests also indicate no advantage, or a strength loss with the WDL probe. If the WDL probe is turned off then fewer nodes are searched, along with a proportional increase in speed. What am I missing?

Code: Select all

// No WDL probe
Black(1): go
depth score time nodes pv
1 185 0 17 e5f4
 #tb_hits 0 tbhits 0
2 214 0 63 e5f4 f7e8
 #tb_hits 0 tbhits 0
3 192 0 125 e5f4 f7e8 f4g4
 #tb_hits 0 tbhits 0
4 155 1 327 e5f4 f7d5 f4g4 d5e4
 #tb_hits 0 tbhits 0
5 159 1 448 e5f4 f7d5 f4g4 d5e4 g4f4
 #tb_hits 0 tbhits 0
6 228 1 929 e5f4 f7e8 f4g4 e8f7 d4f5 f7b3
 #tb_hits 0 tbhits 0
7 228 2 1248 e5f4 f7e8 f4g4 e8f7 d4f5 f7b3 f5e3
 #tb_hits 0 tbhits 0
8 185 2 2238 e5f4 f7e8 d4f5 e8d7 f5e3 g2g1 e3c4 g1g2
 #tb_hits 0 tbhits 0
9 183 3 3078 e5f4 f7e8 d4f5 e8d7 f5e3 g2h3 f4f3 d7e6
 #tb_hits 0 tbhits 0
10 177 3 4568 e5f4 f7e8 d4f5 e8h5 f5e3 g2h3 g3g2 h3h2
 #tb_hits 0 tbhits 0
11 177 3 5827 e5f4 f7e8 d4f5 e8h5 f5e3 g2h3 g3g2 h3h2
 #tb_hits 0 tbhits 0
12 175 4 9822 e5f4 f7e8 d4f5 e8h5 f5e3 g2h3 e3d5 h3g2
 #tb_hits 0 tbhits 0
13 175 4 10593 e5f4 f7e8 d4f5 e8h5 f5e3 g2h3 e3d5 h3g2
 #tb_hits 0 tbhits 0
14 175 5 11969 e5f4 f7e8 d4f5 e8h5 f5e3 g2h3 e3d5 h3g2
 #tb_hits 0 tbhits 0
move e5f4
elap: 0.058000
Total Nodes=11970 nps: 206379
tbhits 0
EGTB Hits 0 tbmiss 0
White(1):

konsolas
Posts: 182
Joined: Sun Jun 12, 2016 5:44 pm
Location: London
Full name: Vincent

Re: Does Syzygy WDL Probe Do Anything?

Post by konsolas »

In games with tablebase adjudication, only the WDL probe has any effect on strength, as only WDL tables are used in search. Generally the effect is small (in the order of 10-20 elo).
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Does Syzygy WDL Probe Do Anything?

Post by hgm »

Note that there is a standard for including the TB hits in the Thinking Output, rather than printing it as a separate remark (which the GUI will ignore if it doesn't crash it): just write it as the 5th number on the line, and separate it from the PV behind it with a TAB character. Then WinBoard / XBoard could print it in the Engine Output, when you open the TB hits column.

See https://www.gnu.org/software/xboard/engine-intf.html .
D Sceviour
Posts: 570
Joined: Mon Jul 20, 2015 5:06 pm

Re: Does Syzygy WDL Probe Do Anything?

Post by D Sceviour »

konsolas wrote: Tue Jul 02, 2019 11:50 am In games with tablebase adjudication, only the WDL probe has any effect on strength, as only WDL tables are used in search. Generally the effect is small (in the order of 10-20 elo).
Not by my findings. The use of root DTZ reported about a 20+ elo increase for a 6-piece egtb. This was attributed to benefit from time loss by opponent engines, and the occasional saved game from complicated endings. However, the use of WDL drained this away to a big overall loss.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Does Syzygy WDL Probe Do Anything?

Post by zullil »

D Sceviour wrote: Tue Jul 02, 2019 3:34 am [d]8/2p2B2/2P5/4k3/3n4/6p1/6K1/8 b - - 86 95

Code: Select all

// Probe with Syzygy WDL
Black(1): go
depth score time nodes pv
1 185 0 17 e5f4
 #tb_hits 0 tbhits 0
2 214 0 63 e5f4 f7e8
 #tb_hits 1 tbhits 1
3 192 0 121 e5f4 f7e8 f4g4
 #tb_hits 1 tbhits 1
4 155 0 310 e5f4 f7d5 f4g4 d5e4
 #tb_hits 2 tbhits 2
5 159 0 408 e5f4 f7d5 f4g4 d5e4 g4f4
 #tb_hits 7 tbhits 7
6 227 1 767 e5f4 f7d5 d4f5 d5b3 f5e7 b3e6
 #tb_hits 12 tbhits 12
7 222 1 1335 e5f4 f7e8 d4f5 e8f7 f5e3 g2g1 f4g4
 #tb_hits 16 tbhits 16
8 200 1 1675 e5f4 f7e8 d4f5 e8d7 f5e3 g2g1 e3d5 d7e6
 #tb_hits 20 tbhits 20
9 185 2 2722 e5f4 f7e8 d4f5 e8f7 f5e3 g2h3 e3g4 h3g2
 #tb_hits 37 tbhits 37
10 190 2 2992 e5f4 f7e8 d4f5 e8f7 f5e3 g2h3 f4f3 f7b3
 #tb_hits 39 tbhits 39
11 185 2 4664 e5f4 f7e8 d4c2 e8f7 c2e1 g2h3 e1d3 h3g2
 #tb_hits 62 tbhits 62
12 199 3 9936 e5f4 f7e8 d4c2 e8h5 c2e1 g2h3 e1d3 h5f7
 #tb_hits 165 tbhits 165
13 199 3 11204 e5f4 f7e8 d4c2 e8h5 c2e1 g2h3 e1d3 h5f7
 #tb_hits 207 tbhits 207c6
14 197 4 12781 e5f4 f7e8 d4c2 e8h5 c2e1 g2h3 e1d3 h3g2
 #tb_hits 249 tbhits 249
move e5f4
elap: 0.047000
Total Nodes=12782 nps: 271957
tbhits 249
EGTB Hits 249 tbmiss 0
White(1):
I cannot see how Syzygy WDL probe does anything. Even with 249 table base hits, the engine avoids going into the eventual drawn position to keep the false advantage of the extra material score of a pawn. ELO tests also indicate no advantage, or a strength loss with the WDL probe. If the WDL probe is turned off then fewer nodes are searched, along with a proportional increase in speed. What am I missing?
There are seven pieces on the board. You have 6-piece tables only. So the correct evaluation of the position needs to be determined by search. The WDL tables provide exact evaluations for any leaf positions that have six or fewer pieces. So search instantly determines that 95...Nxc6 is 0.00. But, as far as the engine knows, the position might be a win for Black. So it searches as usual to find a move that might be better than Nxc6. After a short time, it determines, with the help of the WDL tables, the correct values of all 13 moves in the root position. Here's Stockfish-dev with MultiPV=13:

Code: Select all

info depth 27 seldepth 37 multipv 1 score cp 0 nodes 697892 nps 1188913 tbhits 18301 time 587 pv e5f4 f7e8 d4f5 g2g1 f4f3 e8h5 f3e4 h5g6 e4e5 g6e8 f5e3 e8d7 g3g2 g1f2 e5e4 d7h3 e4d4 h3d7
info depth 27 seldepth 11 multipv 2 score cp 0 nodes 697892 nps 1188913 tbhits 18301 time 587 pv d4f5 g2f3 e5f6 f7e8 f6e6 e8d7 e6e5 d7c8 g3g2 f3g2
info depth 27 seldepth 11 multipv 3 score cp 0 nodes 697892 nps 1188913 tbhits 18301 time 587 pv e5f6 f7c4 d4f5 c4d3 f6e6 g2f3 e6e5 d3b1 f5e3 f3g3
info depth 27 seldepth 3 multipv 4 score cp 0 nodes 697892 nps 1188913 tbhits 18301 time 587 pv d4e6 g2g3
info depth 27 seldepth 3 multipv 5 score cp 0 nodes 697892 nps 1188913 tbhits 18301 time 587 pv e5d6 g2g3
info depth 27 seldepth 3 multipv 6 score cp 0 nodes 697892 nps 1188913 tbhits 18301 time 587 pv e5e4 g2g3
info depth 27 seldepth 3 multipv 7 score cp 0 nodes 697892 nps 1188913 tbhits 18301 time 587 pv e5f5 g2g3
info depth 27 seldepth 2 multipv 8 score cp 0 nodes 697892 nps 1188913 tbhits 18301 time 587 pv d4c6
info depth 27 seldepth 3 multipv 9 score cp 0 nodes 697892 nps 1188913 tbhits 18301 time 587 pv d4c2 g2g3
info depth 27 seldepth 5 multipv 10 score cp 0 nodes 697892 nps 1188913 tbhits 18301 time 587 pv d4e2 f7c4 e5d6 c4e2
info depth 27 seldepth 3 multipv 11 score cp 0 nodes 697892 nps 1188913 tbhits 18301 time 587 pv d4b5 g2g3
info depth 27 seldepth 16 multipv 12 score cp -14906 nodes 697892 nps 1188913 tbhits 18301 time 587 pv d4f3 g2f3 e5d6 f7e8 d6e7 e8d7 e7f7 f3g3 f7e7
info depth 27 seldepth 16 multipv 13 score cp -14906 nodes 697892 nps 1188913 tbhits 18301 time 587 pv d4b3 f7b3 e5d6 b3a4 d6d5 g2g3 d5e4
D Sceviour
Posts: 570
Joined: Mon Jul 20, 2015 5:06 pm

Re: Does Syzygy WDL Probe Do Anything?

Post by D Sceviour »

zullil wrote: Tue Jul 02, 2019 3:18 pm Here's Stockfish-dev with MultiPV=13:
… and how does Stockfish do with syzygy WDL turned off, but DTZ turned on? I do not have a build environment for SF, but somebody could comment the WDL section out in SF, re-build and compare the probes under the same position. Also, compare the final elo test under game conditions.