de Man's Stockfish syzygy is faster than normal version!

Discussion of chess software programming and technical issues.

Moderator: Ras

Jouni
Posts: 3641
Joined: Wed Mar 08, 2006 8:15 pm
Full name: Jouni Uski

de Man's Stockfish syzygy is faster than normal version!

Post by Jouni »

I noticed, that SF sygyzy 16.2. is faster than normal according to bench and also in another test positions (both from http://abrok.eu/stockfish/). How is this explained? Of course I am testing in early games before TB access. At least Ronald's implementation is totally flawless!
Jouni
syzygy
Posts: 5712
Joined: Tue Feb 28, 2012 11:56 pm

Re: de Man's Stockfish syzygy is faster than normal version!

Post by syzygy »

Jouni wrote:I noticed, that SF sygyzy 16.2. is faster than normal according to bench and also in another test positions (both from http://abrok.eu/stockfish/). How is this explained? Of course I am testing in early games before TB access. At least Ronald's implementation is totally flawless!
Assuming I did not somehow introduce strange bugs (not impossible, because SF keeps changing and some changes require adaptations in the probing code), any objective speed advantage can only be explained by compiler luck. And it might only apply to your particular processor. For sure there is nothing in the version I maintain that could explain a speed up in terms of nps.

Regarding the possibility of bugs, I did catch the recent change in the calculation of the material key. As far as I know, the probing code still works.
phenri
Posts: 284
Joined: Tue Aug 13, 2013 9:44 am

Re: de Man's Stockfish syzygy is faster than normal version!

Post by phenri »

+1
Thank you so much Ronald, for all the efforts you make to keep updating Stockfish Syzygy, for some months now.

Regards
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: de Man's Stockfish syzygy is faster than normal version!

Post by BBauer »

Sorry to put some water into the wine.
I got compiler warnings:

With the latest version I get compiler warnings

g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto -c -o thread.o thread.cpp

tbprobe.cpp: In function ‘probe_ab(Position&, int, int, int*)’:
tbprobe.cpp:191:7: warning: array subscript is above array bounds [-Warray-bounds]
p[i++] = pop_lsb(&bb) ^ mirror;
^
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto -c -o timeman.o timeman.cpp
tbprobe.cpp:191:7: warning: array subscript is above array bounds [-Warray-bounds]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto -c -o tt.o tt.cpp
tbprobe.cpp: In function ‘Tablebases::probe_dtz(Position&, int*)’:
tbprobe.cpp:301:7: warning: array subscript is above array bounds [-Warray-bounds]
p[i++] = pop_lsb(&bb) ^ mirror;
^
tbprobe.cpp:301:7: warning: array subscript is above array bounds [-Warray-bounds]

compiler:gcc version 4.8.1 20130909 [gcc-4_8-branch revision 202388] (SUSE Linux)

and with 6-pieces stockfish crashes.
kind regards
Bernhard
phenri
Posts: 284
Joined: Tue Aug 13, 2013 9:44 am

Re: de Man's Stockfish syzygy is faster than normal version!

Post by phenri »

syzygy wrote:
phenri wrote:I applied the syzygy patch on the last version of stockfish but I can no longer compile because I get these errors:
https://github.com/syzygy1/Stockfish

Ignore the warnings, different compilers give different warnings and they are all bogus.
http://talkchess.com/forum/viewtopic.ph ... 777#534777
syzygy
Posts: 5712
Joined: Tue Feb 28, 2012 11:56 pm

Re: de Man's Stockfish syzygy is faster than normal version!

Post by syzygy »

gcc-4.8.x gives spurious warnings. I am not going to address them.

If you mean that windows stockfish with 6 piece TB crashes on Linux when run under wine, yes, I know. Limitation of wine, not the fault of SF. I will not address it.

If a native Linux compile crashes on Linux, please give a position on which it crashes.
phenri
Posts: 284
Joined: Tue Aug 13, 2013 9:44 am

Re: de Man's Stockfish syzygy is faster than normal version!

Post by phenri »

BBauer wrote: and with 6-pieces stockfish crashes.
Can be improperly downloaded, check the files if they are not corrupted
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: de Man's Stockfish syzygy is faster than normal version!

Post by BBauer »

The versions which crash for me are:
Windows x64 for modern computers + sse4.2
Windows x64 for modern computers
Windows x64
downloaded from
Author: Ronald de Man
Date: Sun Feb 16 14:31:29 2014 +0100
Timestamp: 1392557489

Synchronise material key calculation with SF, which now assigns a non-zero
value to the white and black kings.

In Windows8.1 in a command window I do:

C:\Users\bbauer\64>C:\Users\bbauer\arena3.5\Engines\Stockfish\stockfish_sy_14021614
Stockfish 160214 64 SSE4.2 by Tord Romstad, Marco Costalba and Joona Kiiski
setoption name Threads value 4
setoption name Hash value 2048
setoption name SyzygyPath value E:\WDL5;G:\WDL33;G:\WDL51;C:\Users\bbauer\64\WDL42;E:\DTZ5;C:\Users\bbauer\64\DTZ33;C:\Users\bbauer\64\DTZ51;C:\Users\bbau
er\64\DTZ42
info string Found 510 tablebases.
setoption name SyzygyProbeLimit value 6
setoption name SyzygyProbeDepth value 1
position fen 8/3Pb1p1/8/3P2P1/5P2/7k/4K3/8 w - - bm Kd3; id "E_E_T 007 - B vs L";
# position fen 5r1k/1P4pp/3P1p2/4p3/1P5P/3q2P1/Q2b2K1/B3R3 w - -
Unknown command: # position fen 5r1k/1P4pp/3P1p2/4p3/1P5P/3q2P1/Q2b2K1/B3R3 w - -
# position fen 2r2rk1/1bpR1p2/1pq1pQp1/p3P2p/P1PR3P/5N2/2P2PPK/8 w - -
Unknown command: # position fen 2r2rk1/1bpR1p2/1pq1pQp1/p3P2p/P1PR3P/5N2/2P2PPK/8 w - -
# position fen 1n1r1rk1/ppq2ppp/3p2b1/3B1NP1/4PB1R/bP2P2P/P1P5/3KQ1R1 w - -
Unknown command: # position fen 1n1r1rk1/ppq2ppp/3p2b1/3B1NP1/4PB1R/bP2P2P/P1P5/3KQ1R1 w - -
isready
readyok
go movetime 60000
quitinfo depth 1 seldepth 1 score cp 254 nodes 42 nps 21000 tbhits 0 time 2 multipv 1 pv e2e3
info depth 2 seldepth 2 score cp 232 nodes 147 nps 49000 tbhits 0 time 3 multipv 1 pv d5d6 e7d8
info depth 3 seldepth 3 score cp 270 nodes 250 nps 62500 tbhits 0 time 4 multipv 1 pv d5d6 e7d8 e2e3
info depth 4 seldepth 4 score cp 203 nodes 496 nps 16000 tbhits 1 time 31 multipv 1 pv d5d6 e7d8 e2f3 h3h4
info depth 5 seldepth 5 score cp 229 nodes 695 nps 17375 tbhits 2 time 40 multipv 1 pv d5d6 e7d8 e2f3 h3h4 f3e4
info depth 6 seldepth 6 score cp 208 nodes 1178 nps 28047 tbhits 3 time 42 multipv 1 pv d5d6 e7d8 e2f3 h3h4 f3e4 g7g6
info depth 7 seldepth 7 score cp 191 nodes 2169 nps 26132 tbhits 8 time 83 multipv 1 pv d5d6 e7d8 e2f3 g7g6 f3e4 h3g4 e4e5
info depth 8 seldepth 8 score cp 181 nodes 3635 nps 23301 tbhits 35 time 156 multipv 1 pv d5d6 e7d8 e2f3 g7g6 f3e4 h3g4 e4e5 d8b6
info depth 9 seldepth 10 score cp 160 nodes 7875 nps 26694 tbhits 69 time 295 multipv 1 pv d5d6 e7d8 e2f3 h3h4 f3e4 h4g4 e4e5 g7g6 e5e4 d8b6
info depth 10 seldepth 13 score cp 124 nodes 16641 nps 42343 tbhits 139 time 393 multipv 1 pv e2f3 h3h4 f3e4 g7g6 e4e5 h4g4 d5d6 e7d8 f4f5 g4h5 f5f6 h5g5
info depth 11 seldepth 14 score cp 112 nodes 24451 nps 39693 tbhits 242 time 616 multipv 1 pv e2f3 e7d8 f3e4 h3g4 e4e5 g7g6 e5e4 d8b6 e4e5 b6d8
info depth 12 seldepth 16 score cp 80 nodes 49805 nps 42279 tbhits 594 time 1178 multipv 1 pv e2f3 e7d8 d5d6 h3h4 f3e4 h4g4 e4e5 g4f3 e5f5 f3g3 g5g6 g3f3 f5e5 f
3g4 e5e4 d8f6 f4f5 g4g5
info depth 13 seldepth 16 score cp 80 nodes 56330 nps 40064 tbhits 677 time 1406 multipv 1 pv e2f3 e7d8 d5d6 h3h4 f3e4 h4g4 e4e5 g4f3 e5f5 f3g3 f5e4 g3g4
info depth 14 seldepth 17 score cp 74 nodes 82851 nps 48422 tbhits 984 time 1711 multipv 1 pv e2f3 e7d8 f3e4 h3g3 e4e5 g3g4 d5d6 g4f3 e5f5 f3g3 g5g6 g3f3 f5e5 d
8f6 e5f5 f6d8
info depth 15 seldepth 18 score cp 81 nodes 102288 nps 54006 tbhits 1174 time 1894 multipv 1 pv e2f3 e7d8 f3e4 h3g3 e4e5 g3g4 g5g6 g4h5 f4f5 h5g5 e5e6 d8f6 e6f7
g5g4 f7e8 g4f5 d7d8q f6d8 e8d8 f5g6
info depth 16 seldepth 18 score cp 81 nodes 114524 nps 49814 tbhits 1328 time 2299 multipv 1 pv e2f3 e7d8 f3e4 h3g3 e4e5 g3g4 g5g6 g4h5 f4f5 h5g5 e5e6 d8f6 e6f7
g5g4 f7e8 g4f5 d7d8q f6d8 e8d8 f5g6
info depth 17 seldepth 18 score cp 81 nodes 128955 nps 52145 tbhits 1732 time 2473 multipv 1 pv e2f3 e7d8 f3e4 h3g3 e4e5 g3g4 g5g6 g4h5 f4f5 h5g5 e5e6 d8f6 e6f7
g5g4 f7e8 g4f5 d7d8q f6d8 e8d8 f5g6
info depth 18 seldepth 19 score cp 97 lowerbound nodes 176219 nps 55327 tbhits 2391 time 3185 multipv 1 pv e2f3 e7d8 f3e4 h3g3 e4e5 g3g4 g5g6 g4h5 f4f5 h5g5 e5e
6 d8f6 e6f7 g5g4 f7e8 g4f5 d7d8q f6d8 e8d8 f5g6
info depth 18 currmove e2f3 currmovenumber 1
info depth 18 seldepth 19 score cp 110 lowerbound nodes 187451 nps 58052 tbhits 2447 time 3229 multipv 1 pv e2f3 e7d8 f3e4 h3g3 e4e5 g3g4 g5g6 g4h5 f4f5 h5g5 e5
e6 d8f6 e6f7 g5g4 f7e8 g4f5 d7d8q f6d8 e8d8 f5g6
info depth 18 currmove e2f3 currmovenumber 1
info depth 18 seldepth 19 score cp 128 lowerbound nodes 225885 nps 62227 tbhits 2945 time 3630 multipv 1 pv e2f3 e7d8 f3e4 h3g3 e4e5 g3g4 g5g6 g4h5 f4f5 h5g5 e5
e6 d8f6 e6f7 g5g4 f7e8 g4f5 d7d8q f6d8 e8d8 f5g6
info depth 18 currmove e2f3 currmovenumber 1
info depth 18 seldepth 19 score cp 155 lowerbound nodes 257035 nps 64630 tbhits 3176 time 3977 multipv 1 pv e2f3 e7d8 f3e4 h3g3 e4e5 g3g4 g5g6 g4h5 f4f5 h5g5 e5
e6 d8f6 e6f7 g5g4 f7e8 g4f5 d7d8q f6d8 e8d8 f5g6
info depth 18 currmove e2f3 currmovenumber 1

At this point a error window pops up. Same in arena.
This happens regularly.

Kind regards
Bernhard
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: de Man's Stockfish syzygy is faster than normal version!

Post by BBauer »

IMHO not all warnings are bogus. Bound crossings are to be taken serious.
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: de Man's Stockfish syzygy is faster than normal version!

Post by BBauer »

The files are running well with 5-pieces.
They are corrupted when using full 6-pieces.
They may run without the 4.2 set.
Kind regards
Bernhard