残り深さが2以上あり、nullMoveをまだ実行してない状態で、nullWindow探索の場合で、
現在の盤面の評価がbeta以上の場合に、
探索深さをやや浅くして、
パスして探索して評価値がbetaを越えているのなら
何を指しても、betaを越えるだろうからfail highする
探索削減手法
もし、パスして詰みが帰った場合は、詰めろの可能性があるので、
threatのフラグを立てておいて、本探索で活用する
if ( 2*PLY_INC <= depth
&& ( state_node & node_do_null )
&& beta == alpha_old + 1
&& beta <= evaluate( ptree, ply, turn ) )
{
int null_depth, nrep;
null_depth = NullDepth(depth);
nrep = root_nrep + ply - 1;
MOVE_CURR = MOVE_PASS;
value = -search( ptree, -beta, 1-beta, Flip(turn), null_depth, ply+1,
node_do_mate | node_do_recap | node_do_futile );
if ( beta <= value )
{
ptree->null_pruning_done++;
if ( null_depth < PLY_INC )
{
hash_store( ptree, ply, depth, turn, value_lower,
value, MOVE_NA, state_node );
}
return value;
}
if ( value == - ( score_mate1ply - ply ) )
{
state_node |= node_mate_threat;
}
}
}
最終更新:2011年03月17日 13:32