Author: Tony Werten
Date: 03:16:44 04/11/00
Go up one level in this thread
On April 11, 2000 at 05:41:04, Severi Salminen wrote: >Hi! > >The next is from www.xs4all.nl/~verhelst/chess/search.html >It is the principal of negamax algorithm. But I don't quite understand it. If we >make, say, 1 ply search (white to move), then the evaluation is negated and >compared to the best value found so far. But bigger evaluation is better for >white and now bigger is negated and so it becomes smaller. So better evaluation >doesn't increase the value of best. What am I missing? The basic advantage of negamax. I'll give it a try. In minimax you are looking for the highest score if it's white to move and the lowest if black to move. In negamax you always look for the highest score, and let the minus do the work. So if black gets +100 (for him ) on ply 2, that comes back to ply 1 as -100 for white. White will take the highest score. That means the lowest returnvalue from ply 2, because it will get high because of the minus. Good luck with it, Tony > >int NegaMax (pos, depth) >{ > if (depth == 0) return Evaluate(pos); > best = -INFINITY; > succ = Successors(pos); > while (not Empty(succ)) > { > pos = RemoveOne(succ); > value = -NegaMax(pos, depth-1); > if (value > best) best = value; > } > return best; >} > >Severi
This page took 0.01 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.