Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Redoing search, need help

Author: Dan Homan

Date: 15:24:45 11/05/98

Go up one level in this thread


On November 05, 1998 at 18:16:38, Dan Homan wrote:

>On November 05, 1998 at 17:44:02, Will Singleton wrote:
>
>>
>>On November 05, 1998 at 14:40:39, Dan Homan wrote:
>>
>>>
>>>Hi Will,
>>>
>>>I think you function above is fine for all plies (even and odd), assuming
>>>that the score you return from eval() is really the score for the side
>>>that is on-move at depth = 0.  Naturally the score should be negated for
>>>the depth = 1, because the other side on move at depth = 1.
>>
>>
>>Don't quite follow you.  My eval returns a positive score if the player on move
>>from the start position has the advantage, regardless of the ply depth.  The
>>negation always occurs upon returning from the "value = -ab()" call.
>
>So, if it is black to move at the position you are evaluating but
>white to move at the starting position, you would evaluate with a
>positive score if white has the advantage?  If so, that's why you
>need the extra negation. At a given position (ply) in nega-max,
>positive score is good for the side on move in that position.
>
>The source code fragment you showed only worked if the score returned
>from eval was positive for the side to move at that position in the
>search.

Got tounge-tied here :) I meant...

It only works, if the score returned from eval() is positive if the
side on move at that position in the search has the advantage (or
negative if the side to move does not have the advantage).

>
>With this implementation, everything is symmetric.  You should be able
>to simple add a line to your eval to fix this up.
>
>My eval looks like this....
>
>int eval(position p) {
>
>  .... bunch of code to score positive if white has
>       the advantage .....
>
>  if(p->side_to_move == 'white') return score;
>  else return -score;
>
>}
>
>This way the returned score is always positive if the side on move
>in position p has the advantage.
>
>>
>>
>>>
>>>Now, for a one ply search, you are calling your function (with depth = 0)
>>>from some sort of driver... maybe like this -
>>>
>>
>>Right, at the top level I have a call that starts the iterative deepening,
>>without negation.  But what do you mean by calling ab() with a depth of zero?
>>It will just return the eval for the starting position.  Do you mean a depth of
>>1?  Or do you mean that within your top-level call, you have already made the
>>ply 1 move?
>
>
>I guess I got myself confused too.  You're right that you would call ab() with
>a depth of 1 to start.  (My setup is slightly different... )
>
>
> - Dan
>
>>
>>Will



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.