Author: Severi Salminen
Date: 02:41:04 04/11/00
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? 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 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.