Author: Bruce Moreland
Date: 09:38:18 01/04/00
Go up one level in this thread
On January 03, 2000 at 16:52:21, Daniel Clausen wrote: >int searchWhite(ply, alpha, beta, ...) >{ > legalMoves = 0; > positions = 0; > > // Loop over all moves. > while( (move=nextMove(ply)) != NO_MOVE) > { > makeWhiteMove(move); > > // Search the 1st move with the full window. > // Is that okay? > if(legalMoves==0) > { > score = searchBlack(ply+1, alpha, beta, ...); > } > // Search the rest of the moves with a minimal window. > else > { > pvsTries++; > score = searchBlack(ply+1, alpha, alpha+1, ...); > > if(score>alpha && score<beta) > { > pvsFails++; > score = searchBlack(ply+1, alpha, beta, ...); > } > } > > best = max(best, score); > unmakeWhiteMove(move); > > if(alpha>=beta) I don't understand the previous line. I can't find anywhere where you are changing the value of alpha. You can rework it and make it sensible very easily, but if this is actually in your program, it's wrong. bruce > { > failHighs++; > if(legalMoves == 0) failHighsOn1st++; > > return beta; > } > > legalMoves++; > } >}
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.