Coincidentally I have written a tool to do exactly this. I will be releasing it in the next week or two and will make an announcement on this forum. I wrote this as part of my effort to bring syzygy to Gull.flok wrote: So I'm wondering: has anyone created a c++ class around it or some kind of c-wrapper with a license that allows free inclusion in other software?
c++ class or a c wrapper for the syzygy egtb
Moderators: hgm, Rebel, chrisw
-
- Posts: 55
- Joined: Thu Oct 22, 2015 2:14 am
Re: c++ class or a c wrapper for the syzygy egtb
-
- Posts: 5566
- Joined: Tue Feb 28, 2012 11:56 pm
Re: c++ class or a c wrapper for the syzygy egtb
Lack of bitboards is not a problem.flok wrote:Not as easy as it may seem: my engine is rather different from how other engines do it. No bitboards for starters.syzygy wrote:No need to make it more generic. Just replace the calls to SF move generation routines with calls to the equivalent routines of your engine.flok wrote:I looked at the included c-code and I think it'll take quite a bit of time to convert into something more generic. I think it is stockfish oriented?
The probing code expects you to tell it what piece combination is on the board (via a material key) and to give it the positions of these pieces.
If your engine does not keep track of a material key, then you could generate it on the spot in the probing routine (but it might be better to add one to your engine... material keys can be useful for other reasons as well). If your engine does have a material key, but it distinguishes between dark and light bishops, then you need a bit of trickery as my probing code expects the same material key independent of bishop color (i.e. dark/light).
-
- Posts: 589
- Joined: Tue Jun 04, 2013 10:15 pm
Re: c++ class or a c wrapper for the syzygy egtb
You can smoothen that by keeping counters for "light+dark" and "light" (or dark) in the material key, instead of the more traditional separate "light" and "dark" counters. Then no trickery is needed because you can mask away the unwanted counters when probing (instead of shifting, masking and adding).syzygy wrote:If your engine does have a material key, but it distinguishes between dark and light bishops, then you need a bit of trickery as my probing code expects the same material key independent of bishop color (i.e. dark/light).
[Account deleted]
-
- Posts: 55
- Joined: Thu Oct 22, 2015 2:14 am
Re: c++ class or a c wrapper for the syzygy egtb
The syzygy stand-alone wrapper (called Fathom) is now available: https://github.com/basil00/Fathom
Fathom has been used to bring syzygy to Gull. See here for more information.
Fathom has been used to bring syzygy to Gull. See here for more information.
Re: c++ class or a c wrapper for the syzygy egtb
Hi,basil00 wrote:The syzygy stand-alone wrapper (called Fathom) is now available: https://github.com/basil00/Fathom
Fathom has been used to bring syzygy to Gull. See here for more information.
Any chance for an interface that accepts a fen-string as input?
-
- Posts: 55
- Joined: Thu Oct 22, 2015 2:14 am
Re: c++ class or a c wrapper for the syzygy egtb
See the fathom.c example tool which already does this.flok wrote:Any chance for an interface that accepts a fen-string as input?
Re: c++ class or a c wrapper for the syzygy egtb
So when do you query it?
Do you check every node if total piece_count < x and then check it?
Do you check every node if total piece_count < x and then check it?
-
- Posts: 55
- Joined: Thu Oct 22, 2015 2:14 am
Re: c++ class or a c wrapper for the syzygy egtb
Basically, except for qsearch. Also the result is stored in the TT to help minimize the TB queries. See the Gull Syzygy Patch. There are probably more optimal ways of doing it too.flok wrote:So when do you query it?
Do you check every node if total piece_count < x and then check it?
-
- Posts: 5566
- Joined: Tue Feb 28, 2012 11:56 pm
Re: c++ class or a c wrapper for the syzygy egtb
If you want to limit the number of probes, it is best to do that by only probing if remaining_depth >= y (and piece_count <= x), where y is the "probe depth" parameter.flok wrote:So when do you query it?
Do you check every node if total piece_count < x and then check it?