I got good advice how to use the old code of nalimov
see http://wbforum.volker-pittlik.name/view ... sc&start=0
Now my question is what exactly I need to replace to use the new code of nalimov.
I already have the function in the bottom of this post in order to probe the nalimov tablebases and all I miss is relevant new files tbdecode.h and tbindex.cpp that I can compile with no errors.
If someone can help me to give me instruction what files to use exactly it can be productive(I guess that the files are the same for all programs but I am afraid that I need to modify the files of nalimov that I have in order not to have error).
The instructions that dieter gave were already instruction for modificationof crafty (I followed them without understanding) and I want to know what modification is needed to be done and what is the reason to modify(I would like simply to add specific files without modification and I wonder if there is a reason that Nalimov did not give files that programmers can simply add to their program and after it defining the relevant function to probe egtb)
Uri
static int probe_egtb(POSITION2 *pos,int *score)
{
int idx_tb;
int invert;
int value;
int side;
square *wp,
*bp;
int ep;
INDEX idx;
if (pos->castling_state)
return 0;
if (pos->numpieces>table_pieces)
return 0;
idx_tb = IDescFindFromCounters(pos->piece_count);
if (idx_tb==0)
return 0;
if (idx_tb > 0)
{
side = pos->stm;
invert = 0;
wp = pos->white_squares;
bp = pos->black_squares;
} else {
side = pos->stm ^ 1;
invert = 1;
wp = pos->black_squares;
bp = pos->white_squares;
idx_tb = -idx_tb;
}
if (!FRegisteredFun(idx_tb, side))
return 0;
ep = (pos->eps > 0) ? pos->eps : XX; /* Careful, see comment in
* setboard Note that pos
* uses "Nalimov squares" for
* ep already */
idx = PfnIndCalcFun(idx_tb, side) (wp, bp, ep, invert);
value = L_TbtProbeTable(idx_tb, side, idx);
if (value == bev_broken)
return 0;
*score = value;
return 1;
}