Author: Vincent Diepeveen
Date: 06:54:40 03/11/04
Go up one level in this thread
On March 10, 2004 at 05:45:47, Renze Steenhuisen wrote:
>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();
I hope you mean:
return quiescencesearch(side);
Just returning eval doesn't work.
>
> 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 */
I hope you also store at least: depthleft, move=nullmove, betacutoff, score
> return null_val;
> }
> }
>
> best_val = -INFINITY
> for(all legal moves)
> {
> makeMove()
> val = -search(-beta, -alpha, depth-1);
// uh oh normal alfabeta, you can do that better with PVS
// first move search with : [alfa;beta]
// all other moves you search with [alfa,alfa+1]
// in case of fail high and alfa+1 != beta && val < beta then you research
// with [alfa;beta]
> unmakeMove()
> best_val = MAX(best_val, val)
I assume you also have:
if( val > alpha )
alpha = val;
If not, add it :)
> if( val>=beta )
> {
> store_in_TT(val, LOWERBOUND)
> }
> }
>
> if( best_val>alpha )
if( best_val > originalalpha )
> store_in_TT(best_val, EXACTBOUND)
> else
> store_in_TT(best_val, UPPERBOUND)
>
> return best_val
>}
This page took 0 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.