That's something I also do and with a lot of extensions so that depth shall be +2 or +3. What you mean is that when depth is extended during search the further insertion in TT shall only take initial depth into account ? What about reduction ? I don't understand how it is better to use initial depth, can you write a little more on the subject please ?When incheck you extend depth + 1, but in the depth var itself, this means that if you store a position in hash it gets depth+1 in the hash instead of depth
This is also confusing for me. Let's look at CPW implementationSo you should wait with storing the bestmove in hash until all moves are searched. If you have new bestmove you store it in hash as EXACT, otherwise you store the position with UPPER( like you do already) If a fail high occurs you store it directly in hash with LOWER and return the score, but you do that already.
Code: Select all
// loop on move
if (val > alpha) {
bestmove = movelist[i].id;
move_to_make = movelist[i];
if (val > beta) {
tt_save(depth, beta, TT_BETA, bestmove);
info_pv(beta);
return beta;
}
alpha = val;
tt_save(depth, alpha, TT_ALPHA, bestmove);
info_pv(val);
}
} // end loop on move
tt_save(depth, alpha, TT_EXACT, bestmove);
return alpha;