Author: Pat Butler
Date: 15:55:19 01/19/99
The following is the basic structure of my program.But i get some stupid moves.
I think i have something wrong in Quiesce.Any advice would be appreciated.
int alphabeta(alpha,beta)
{ if (deep enough) return Quiesce(alpha,beta);
generate,sort moves;
for (each move m)
{ make move m;
Eval= -alphabeta(-beta,-alpha);
if (Eval>=beta) return beta;
if(Eval>alpha) {alpha=Eval; record move m;}
unmake move m;
}
return alpha,move m;
}//end
int Quiesce(alpha,beta)
{ Eval=evaluation;
if (deep enough) return Eval;
if (Eval>alpha) alpha=Eval; ??????????
for (each move m)
{ make move m;
Eval= -Quiesce(-beta,-alpha)
if (Eval>=beta) return beta;
if(Eval>alpha) {alpha=Eval; record move m;}
unmake move m;
}
return alpha,m;
}//end
The line ??????? I suspect most but it could be something else.
pat butler.
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.