Computer Chess Club Archives


Search

Terms

Messages

Subject: Counting Nodes....

Author: James Robertson

Date: 13:26:59 12/22/98


I'm not sure I'm counting nodes correctly on my program; it seems to get a wierd
node count for my P233.

Here is my incomplete alpha-beta routine. If there are mistakes, please tell me
where they are! Quiesce() looks similar.

//depth = depth currently at
//set = depth to search to

int AlphaBeta(int depth, int set, int alpha, int beta)
{
  int current = alpha;

  GenerateMoves();
  for (int i = 0; i < movelist.number; i ++)
  {
    MakeMove(i);
    if (!InCheck())
    {
       nodes ++;
       if (depth == set) current = -Quiesce(depth + 1, -beta, -alpha);
       else current = -AlphaBeta(depth + 1, set, -beta, -alpha);
       if (current > alpha)
       {
         alpha = current;
         UpdatePV();
       }
    }
    UnMakeMove(i);
    if (alpha >= beta) return alpha;
  }
}

Thanks for any help.

James



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.