a) First you have to convet the WDL score into something that differentiates b/n won positions. I do this in egbbprobe.dll. Eg. 4 men are a 1000 points better than 5 men, higher material difference is better than lower, passed pawn ranks etc... In short I have a lot of heuristics and these combined with the rest had made it almost a perfect solver without tbs.
b) Integrate PLY into the score. This is like we do it for mates but the ply is multiplied by a factor so say 40 * PLY. So shorter wins are preferred.
c) Do not probe bitbases within the first 2/3 * search_depth. Without this you will not be able to make progress when the position is already a 5 men. This applies whether in normal or qsearch.
d) Captures , promotions and pawn moves (those that zero 50-move counter) allow probing anywhere even in the 2/3 zone. We are definately making progress here.
e) ... Not necessary for making progress, but I also filter root moves based on bitbase score to make move rapidly when there is one move left.
Maybe some others that I forget. Anyway here is the code for probing bitbases in scorpio. The code for scoring the position is too long so I recommend you look in egbbprobe.cpp if you are interested
Code: Select all
bool SEARCHER::bitbase_cutoff() {
#ifdef EGBB
/*
. Cutoff tree only if we think "progress" is being made
. after captures
. after pawn moves
. or just after a certain ply (probe_depth)
*/
if( egbb_is_loaded
&& all_man_c <= 5
&& (ply >= probe_depth
|| is_cap_prom((pstack - 1)->current_move)
|| PIECE(m_piece((pstack - 1)->current_move)) == pawn
)
) {
/*
Probe bitbases at leafs ,only if they are loaded in RAM
*/
register int score;
if((ply <= probe_depth
|| (egbb_load_type >= 1 && all_man_c <= 4)
|| egbb_load_type == 3)
&& probe_bitbases(score)
) {
egbb_probes++;
/*prefer wins near root*/
if(score > 0)
score -= WIN_PLY * (ply + 1);
else if(score < 0)
score += WIN_PLY * (ply + 1);
pstack->best_score = score;
return true;
}
}
#endif
/*
. no cutoff
*/
return false;
}