Lc0 19.1 Cuda: Syzygy Problem

1,157 views
Skip to first unread message

Tony Mars Rover

unread,
Dec 12, 2018, 11:07:34 PM12/12/18
to LCZero
I set up Syzygy in Lc0, because on my PC (quad core Intel Haswell, twin GPUs) the games I played Lc0 against various engines seem to feature Lc0 winning the opening , the middle game, and most of the end game, then losing the game at the end. I can't figure out why Lc0, at least on my computer, can't seem to win the end game? So, I downloaded the 5-man Syzygy tables and the feature in Lc0, pointing it to the Syzygy directory. Then I set up a five piece end game problem (2 Kings, 2 Rooks, and one white pawn with White to move) and asked Lc0 to solve it. To my utter amazement, Lc0 gave up the White pawn, and then proceeded to play 18 moves and then did a three-fold repeat to force a draw. With the Syzygy tables, Lc0 should have ultimately been able to win. Can anyone direct me It doesn't appear that Lc0 is using the Syzygy tables in my setup.

I set up both Stockfish 9 & 10 pointing to the same directory of Syzygy tables and both of those engines see the tables just fine and confirm it with a confirmation message. Lc0 doesn't offer such a confirmation message, and doesn't appear to use the Syzygy tables at all, since it couldn't solve a pretty simple 5-man.

I'm just using simple chess GUI apps like Arena and Lucas, and conduct small tournaments for my own personal research and amusement.

Thank you in advance for your helpful suggestions or just to let me know that I don't know squat.

gvergh...@gmail.com

unread,
Dec 13, 2018, 12:21:46 AM12/13/18
to LCZero

Post the game or the fen of the starting position.
I'll try to reproduce it on my end.

kamp...@gmail.com

unread,
Dec 13, 2018, 5:33:07 AM12/13/18
to LCZero
In Arena, if everything is setup correctly, you should see the number of TB hits during search. Lc0 doesn't send a confirmation even if it finds the TB's correctly. The weird behavior may also be caused by unfilled history-planes - you can try setting 'HistoryFill'  to always and see what Leela does in this position.

Rudolf Posch

unread,
Dec 13, 2018, 6:15:40 AM12/13/18
to LCZero

Cmd with syzygy.PNG

There are a few places where you can specify to use syzygy table bases in Lc0.
I named the syzygy folder "Syzygy" and stored the folder directly in the Leela folder (where lc0.exe resides). So you have not to care for the full path-name.
1) In the screenshot above you see it as command line parameter "--syzygy-paths=Syzygy" in a Windows cmd Datei (Lc0withSyzy.bat) I set up with a text editor for test purposes.
2) The second method is to place "syzygy-paths=Syzygy" in a configuration file named "lc0.config" which I set up with a text-editor and stored in the Leela folder.
This is a good method which I recommend. When lc0.exe starts from anywhere it looks into lc0.config and finds "syzygy-paths=Syzygy" 
3)  You may use in a cmd windows the Lc0 UCI command  "setoption name SyzygyPath value Syzygy"

To prove the proper use of Syzygy
  
enter "go depth 1" into a command window (e.g. after double clicking lc0.exe or in a Lc0 .bat file).
Before Lc0 first starts calculating it loads the syzygy TB (see screenshot above) or outputs an error before loading the network file:
"Loading Syzygy tablebases from Syzygy
"Found 510WDL, 0 DTM and 510 DTZ tablebase files." (with 6 men TB)

A good sign that Lc0 uses the syzygy TB you may see in  endgame positions  after a go depth xx /infinite command in the "info line depth .... tbhits..."  tbhits unequal zero.
In the Arena GUI there is a field TBHits which counts the hits during a search.

As I posted already on other places in this forum, Lc0 with syzygy TB plays endgame positions in my experience weird, shuffling around or give up material to transpose to "less complex " positions. But fortunately (with the help of the 50 move count?) mostly (?) Lc0 stops playing "silly" moves just in time to finish to a win!!!
I tested Lc0 in a KBN vs. k end game  position and Leela shuffled around for some time in 5 games -against SF9 defending-  but mated in all 5 games nearly the with the latest possible move before drawing because of the 50  move rule  (e.g. 50. Nc8 #) 
Message has been deleted

Tony Mars Rover

unread,
Dec 13, 2018, 6:32:51 PM12/13/18
to LCZero
Thank you so much for the valuable information, none of which I knew anything about. I'm gonna take all the advice I can find to continue my research into Lc0!

Thanks again to gvergh, kamp, and Posch

Tony Mars Rover

unread,
Dec 13, 2018, 6:34:18 PM12/13/18
to LCZero
Thanks for the tip on the HistoryFill parameter. I'm gonna experiment with that.

Tony Mars Rover

unread,
Dec 14, 2018, 2:55:56 PM12/14/18
to LCZero
Not that I really know what I'm talking about, but after playing a couple dozen Tournament games between Lc0 and World Class engines such as Xiphos, Fire, Stockfish 9 & 10, etc., it certainly appears that Lc0 would much rather play for a draw than a win!

In more than half the games, Lc0 went into the end game with a decent chance or an outright advantage and as the endgame progressed, it appeared to me that it was playing for a draw. And in the remaining 40 percent of the games, Lc0 definitely had a winning advantage going into the last part of the end game and it obviously played for a draw!

As mentioned before, I installed Syzygy to see if that would help, but it doesn't seem that Lc0 is using, or has had to use, the ables. Makes me wonder whether it actually sees the files? And the system I'm running Lc0 on is nothing to write home about. Four Core Haswell Overclocked, and twin Nvidia GPUs SLI Overclocked. Compared to what Lc0 should be run on, this setup is kinda shabby. I have to keep this in mind while testing. This is just a mobile gaming system I'm using right now - laptop.

One thing for sure that I've confirmed for myself (after reading the scientific paper - I have a Ph.D. in Computer Science), is that Lc0 predominantly utilizes the GPU power of the system. In other words, if you don't have a decent GPU, then Lc0 is not gonna be able to operate the way it was designed. I confirmed this myself with various technical procedures.

Still can't figure out the possible Syzygy problem with Lc0 possibly not using the installed tables.

I installed

On Wednesday, December 12, 2018 at 8:07:34 PM UTC-8, Tony Mars Rover wrote:

Tony Mars Rover

unread,
Dec 15, 2018, 2:46:20 AM12/15/18
to LCZero
I was able to finally confirm that Lc0 does, in fact, see the Syzygy tables and utilize them. So, my concerns were unfounded.


On Wednesday, December 12, 2018 at 8:07:34 PM UTC-8, Tony Mars Rover wrote:

Lee

unread,
Jan 22, 2019, 1:45:36 PM1/22/19
to LCZero
How did you do that and what Gui are you using? I'm have been trying to use the Syzygy tables in Lucas chess. GPU==Nvidia GTX 1060 3GB.

Vassilis

unread,
Jan 22, 2019, 2:20:00 PM1/22/19
to LCZero
Hi guys

I use Scid vs PC under Linux, and still I can't find a way to confirm if Lc0 uses syzygy or not, I also can't find a way to show TB hits info with this GUI.
I tried the steps Rudolf suggested above, and I can only hope that Lc0 uses them.
Sometimes I also experience some strange behavior from some nets, e.g Lc0 is unable to win a QRK vs RK endgame, with syzygy.
Has anyone here have any experience with Scid vs PC (Linux) ?
Unfortunately my Arena GUI (Linux version) stopped working after an upgrade in Manjaro.

Thanks
Vas
Reply all
Reply to author
Forward
0 new messages