yesterday i managed to implement syzygy in quick and dirty way. As base i used the sources from https://github.com/jdart1/Fathom.
It wasn't simply to plug in with Visual Studio 2019. There are some settings to do for the project.
Especially for me, but that might be the same for others, i had to update the code base because of many duplicate names (e.g. Piece type values).
At the same time it was necessary to handle Visual Studio related compiler warnings (error level). So, all in all, i guess it was one or two hours of work until it compiled successfully. I am reporting this because there might be some people who want to know if it works with VS 2019. Yes, just put in some work into code-arrangement, compiler-warnings, naming issues.
Now one of my first questions is, what is the main difference compared to Ethereal/src/pyrrhic/ implementation content wise?
My second question related to the probing wdl call.
Code: Select all
...
int pcnt = Bit::popcnt(Pos::occupied(pos));
if(TB_LARGEST >= pcnt)
{
int result = tb_probe_wdl(
pos->bb[WHITE],
pos->bb[BLACK],
Pos::kings(pos),
Pos::queens(pos),
Pos::rooks(pos),
Pos::bishops(pos),
Pos::knights(pos),
Pos::pawns(pos),
pos->r50, /* R50 needs to be Zero otherwise the probing function will fail */
pos->oo,
pos->ep != INVALID_SQ ? pos->ep : 0,
FlipColor(pos->stm));
....
}
Code: Select all
static inline unsigned tb_probe_wdl(
uint64_t _white,
uint64_t _black,
uint64_t _kings,
uint64_t _queens,
uint64_t _rooks,
uint64_t _bishops,
uint64_t _knights,
uint64_t _pawns,
unsigned _rule50,
unsigned _castling,
unsigned _ep,
bool _turn)
{
if(_castling != 0)
return TB_RESULT_FAILED;
if(_rule50 != 0)
return TB_RESULT_FAILED;
return tb_probe_wdl_impl(_white, _black, _kings, _queens, _rooks,
_bishops, _knights, _pawns, _ep, _turn);
}
What is the point to limit the probe when the 50 move counter is 0 (having a capture or pawn move) ?
That way, a position with 5-Men (no pawns, TB_LARGEST = 5) will never be tested, because a capture is required,
which then reduces the position to 4-Men setup. That can be hacked of course by using 0 instead of the 50 move counter.
So, what is the idea and must it be combined with TB_LARGEST = 6 to lookup 5-Men.