Author: Renze Steenhuisen
Date: 02:45:47 03/10/04
Go up one level in this thread
In the code below leaving line with "/* 1 */" out saves nodes, and I don't
understand why?! If I am correct the code represents a normal implementation of
the use of Transposition Tables.
---------------------------
SCORE search(alpha, beta, depth)
{
if( depth==0 )
return static_eval();
probe_TT_and_try_to_cutoff()
if( do_null_move )
{
makeMove(null_move)
null_val = -search(-beta-1, -beta)
unmakeMove(null_move)
if( null_val>=beta)
{
store_in_TT(null_val, LOWERBOUND) /* 1 */
return null_val;
}
}
best_val = -INFINITY
for(all legal moves)
{
makeMove()
val = -search(-beta, -alpha, depth-1);
unmakeMove()
best_val = MAX(best_val, val)
if( val>=beta )
{
store_in_TT(val, LOWERBOUND)
}
}
if( best_val>alpha )
store_in_TT(best_val, EXACTBOUND)
else
store_in_TT(best_val, UPPERBOUND)
return best_val
}
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.