Author: Russell Reagan
Date: 22:50:49 07/12/02
Go up one level in this thread
Let me see if I understand what you are saying. TSCP it uses a move stack rather
than a move list? So the following would be an example of a program that uses a
move list (off the top of my head here...)
int AlphaBeta(int depth, int alpha, int beta)
{
if (depth == 0)
return Evaluate();
vector<Move> moves;
int val;
GenerateLegalMoves(moves); // fills moves with the legal moves
for(int i = 0; i < moves.size(); i++)
{
MakeMove(moves[i]);
val = -AlphaBeta(depth-1, -beta, -alpha);
UndoMove();
if (val >= beta)
return beta;
if (val > alpha)
alpha = val;
}
return alpha;
}
With any coding errors I made (I think you get the idea), is that what you meant
by a program that uses a move list?
If that is correct, then is using a move list rather than a move stack
considered better or worse? Or is it simply a matter of simplicity or personal
taste?
Russell
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.