Computer Chess Club Archives


Search

Terms

Messages

Subject: Extensions prunning

Author: Grzegorz Sidorowicz

Date: 06:25:02 04/30/02


Sometimes extensions is suicide for program.
Below is my method to extensions prunning on ply=0.
If you want I can public it for ply>0 (it is not the same)
In my program it working very well :-)
(about 10 positions more in WAC and 60 points more in LoguetII)

extensions_off=false;
bestmove=AlphaBeta (pos, depth, alpha, beta, 0)

int AlphaBeta (pos, depth, alpha, beta, ply)
{
    if (depth == 0) return Evaluate(pos);
    best = -INFINITY;
    succ = Successors(pos);
    while (not Empty(succ) && best < beta)
    {
      pos = RemoveOne(succ);
      if (best > alpha)
        alpha = best;

        int swap=0;
	if (!ply && target)
	   swap=StaticExchangeEvaluator(from,to);

        go_deepper=0;
        if (AnyExtension())
	    go_deepper=1;

	if (swap>0 && extensions_off)
	    extensions_off=false;
	if (extensions_off)
	    go_deepper=0;

         value = -AlphaBeta(pos, depth-1+go_deepper, -beta, -alpha, ply+1);

	if (swap>0)
	    extensions_off=true;

        if (value > best)
	    best = value;
    }
    return best;
}



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.