Author: Odd Gunnar Malin
Date: 14:58:11 02/25/02
Go up one level in this thread
On February 25, 2002 at 17:13:18, Benny Antonsson wrote:
>Hi !
>
>I have a constant value called DRAW_VALUE = 0.
>This constant is used in e.g. the evaluation function, if the position is
>a known draw, or in the serach if the position is a stalemate and so on.
>
>My question is: Can I change this constant to say -30 or something like that,
>and this will work as a contempt factor... or are there things I'm missing here
>?
If you want to return the drawscore in the search you must remember to shift the
sign according to who is to move so the rootposition get the right sign of the
score.
int alphabeta(...)
{
if (repitation or 50move or (NoMoves and NotInCheck))
return (ToMove==RootToMove)?DRAW_VALUE :-DRAW_VALUE;
}
Odd Gunnar
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.