Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Negamax algorithm??

Author: Antonio Dieguez

Date: 05:17:42 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?

I dont have negamax but I suppose the evaluation is done ever by the point of
view of who has the turn, or not?

>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.