Page 1 of 1

Syzygy 7-piece - several questions

Posted: Mon Aug 19, 2019 6:03 pm
by RubiChess
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

Re: Syzygy 7-piece - several questions

Posted: Tue Aug 20, 2019 3:05 am
by jdart
> 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

Re: Syzygy 7-piece - several questions

Posted: Tue Aug 20, 2019 11:32 am
by RubiChess
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

Re: Syzygy 7-piece - several questions

Posted: Tue Aug 20, 2019 12:12 pm
by jdart
RubiChess wrote: Tue Aug 20, 2019 11: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

Re: Syzygy 7-piece - several questions

Posted: Tue Aug 20, 2019 12:33 pm
by phhnguyen
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.

Re: Syzygy 7-piece - several questions

Posted: Tue Aug 20, 2019 1:30 pm
by Look
[...]
phhnguyen wrote: Tue Aug 20, 2019 12:33 pm
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.

Re: Syzygy 7-piece - several questions

Posted: Tue Aug 20, 2019 3:58 pm
by RubiChess
jdart wrote: Tue Aug 20, 2019 12:12 pm
RubiChess wrote: Tue Aug 20, 2019 11: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 12:12 pm 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.

Re: Syzygy 7-piece - several questions

Posted: Tue Aug 20, 2019 4:02 pm
by RubiChess
Look wrote: Tue Aug 20, 2019 1:30 pm [...]
phhnguyen wrote: Tue Aug 20, 2019 12:33 pm
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