Syzygy 7-piece - several questions

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
RubiChess
Posts: 100
Joined: Fri Mar 30, 2018 5:20 am

Syzygy 7-piece - several questions

Post by RubiChess » Mon Aug 19, 2019 4:03 pm

Hi.

I'm planning to update my engine supporting 7-piece syzygy.
Currently it supports 6-piece and for that I have implemented/rewritten the interface code from https://github.com/syzygy1/tb/tree/master/interface some time ago. I know that https://github.com/jdart1/Fathom is up-to-date supporting the 7-piece tb but I would like to stay at original tbprobe/tbcore interface.

Here are the questions:
1. I guess this interface from Ronalds github isn't updated to support 7-piece as the latest updates are two years old. Right?
2. Do you have a recommendations which code to look at for the necessary changes? Maybe cfish?
3. I would like to download some (but only some!) of the 7-piece tb files for testing. Any recommendations which of them are most useful? Criteria would be:
a. Stressing the probing code. Means: Crashing the probing code if it isn't rewritten correctly.
b. Not too big.
c. Useful in common endgames.

As always: Any help is welcome.

Andreas

jdart
Posts: 3805
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: Syzygy 7-piece - several questions

Post by jdart » Tue Aug 20, 2019 1:05 am

> I guess this interface from Ronalds github isn't updated to support 7-piece as the latest updates are two years old. Right?
Right, and not likely to be, as I understand it.

> Do you have a recommendations which code to look at for the necessary changes? Maybe cfish?
The problem with the cfish code is that tbprobe.c is entangled with quite a bit of the cfish engine code and datatypes. So extracting just what you need is not so easy.

I think the easiest thing for you would be to use the latest Fathom, which won't have the same interface, but could be used to get the same functionality if you are willing to adapt your code that interfaces to it. That would be much, much less work than trying to integrate the Cfish code.

--Jon

RubiChess
Posts: 100
Joined: Fri Mar 30, 2018 5:20 am

Re: Syzygy 7-piece - several questions

Post by RubiChess » Tue Aug 20, 2019 9:32 am

Thanks for your answer, Jon.
I will rethink my decission fixing the old Interface code and not switching to Fathom.

On my third question: Do you have any special 7-piece file that will make the 6-piece probing code fail/crash by some integer overflow or whatever? Would probably be useful for testing in both cases.

-Andreas

jdart
Posts: 3805
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: Syzygy 7-piece - several questions

Post by jdart » Tue Aug 20, 2019 10:12 am

RubiChess wrote:
Tue Aug 20, 2019 9:32 am
Do you have any special 7-piece file that will make the 6-piece probing code fail/crash by some integer overflow or whatever? Would probably be useful for testing in both cases.
-Andreas
The 6-man code won't even try to load, much less probe, 7-man bases.

I have some test cases in the unit tests for Arasan (unit.cpp), which might be useful to testing that your interface code is ok, but only a couple of those are for 7-man bases.

--Jon

User avatar
phhnguyen
Posts: 364
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Syzygy 7-piece - several questions

Post by phhnguyen » Tue Aug 20, 2019 10:33 am

RubiChess wrote: 3. I would like to download some (but only some!) of the 7-piece tb files for testing. Any recommendations which of them are most useful?
According to this post (viewtopic.php?f=2&t=69309&start=20) you may need to download from 1 to 100 7 piece endgames:

KRPPvKRP 1
KBPPvKBP 2
KPPPvKPP 3
RubiChess wrote: On my third question: Do you have any special 7-piece file that will make the 6-piece probing code fail/crash by some integer overflow or whatever? Would probably be useful for testing in both cases.
As I have understood, Syzygy probing code will generate the list of endgames first then match them to files in folders. It means the 6-piece code does not aware of any 7 piece endgames. Of course, there are some other problems such as memory allocation...

If you need a ready-modified Fathom code for C++ (compilable by both gcc and MSVC), take it from my open-source Banksia.
https://github.com/nguyenpham/Banksia
An open source C++11 chess tournament manager

Look
Posts: 214
Joined: Thu Jun 05, 2014 12:14 pm
Location: Iran
Full name: Mehdi Amini
Contact:

Re: Syzygy 7-piece - several questions

Post by Look » Tue Aug 20, 2019 11:30 am

[...]
phhnguyen wrote:
Tue Aug 20, 2019 10:33 am

According to this post (viewtopic.php?f=2&t=69309&start=20) you may need to download from 1 to 100 7 piece endgames:

KRPPvKRP 1
KBPPvKBP 2
KPPPvKPP 3
[...]

I suppose KRPPvKRP is an important end game to master both for humans and computers.

RubiChess
Posts: 100
Joined: Fri Mar 30, 2018 5:20 am

Re: Syzygy 7-piece - several questions

Post by RubiChess » Tue Aug 20, 2019 1:58 pm

jdart wrote:
Tue Aug 20, 2019 10:12 am
RubiChess wrote:
Tue Aug 20, 2019 9:32 am
Do you have any special 7-piece file that will make the 6-piece probing code fail/crash by some integer overflow or whatever? Would probably be useful for testing in both cases.
-Andreas
The 6-man code won't even try to load, much less probe, 7-man bases.
I would do the trivial necessary changes like extending the tested filenames to the 7-piece ones first of course. Then it should hopefully try to load (and probe?).
jdart wrote:
Tue Aug 20, 2019 10:12 am
I have some test cases in the unit tests for Arasan (unit.cpp), which might be useful to testing that your interface code is ok, but only a couple of those are for 7-man bases.
I will have a look at that. Thanks.

RubiChess
Posts: 100
Joined: Fri Mar 30, 2018 5:20 am

Re: Syzygy 7-piece - several questions

Post by RubiChess » Tue Aug 20, 2019 2:02 pm

Look wrote:
Tue Aug 20, 2019 11:30 am
[...]
phhnguyen wrote:
Tue Aug 20, 2019 10:33 am

According to this post (viewtopic.php?f=2&t=69309&start=20) you may need to download from 1 to 100 7 piece endgames:

KRPPvKRP 1
KBPPvKBP 2
KPPPvKPP 3
[...]

I suppose KRPPvKRP is an important end game to master both for humans and computers.
Okay. I will start with the first 4-5 most frequent endgames mentioned in this list. The first two have quite big wdl and dtz files so they may stress the probing code enough for a proper test.
Thanks.
-Andreas

Post Reply