Changes

Jump to: navigation, search

Markian Hlynka

578 bytes added, 11:40, 17 May 2020
no edit summary
// Found a shallow node
new_depth = tt_depth + ( IDDepth - tt_iteration );
if( presearchFilter( newdepth, depth, tt_depth, tt_iteration, presearch ) == YES ) { presearch = TRUEtrue;
depth = new_depth;
}
TTUpdate( state, score, save_alpha, save_beta, depth, IDDepth );
return( score );
}
 
 
bool presearchFilter( new_depth, depth, tt_depth, tt_iteration, presearch ) {
// Do not allow a pre-search in a pre-search
if( presearch ) return( false);
 
// Ensure that we are searching deeper
if( new_depth <= depth ) return( false );
 
// Limit the amount of the search extension
if( new_depth - depth > Risk ) return( false );
 
// Prefer deep nodes close to the root
if( tt_iteration - tt_depth > NearRoot ) return( false );
 
// Prefer shallow nodes that are not close to the leaves
if( depth < NearLeaf ) return( false );
 
// Pre-search
return( true );
}
</pre>

Navigation menu