Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Handling draws values

Author: Peter Fendrich

Date: 08:23:55 06/27/01

Go up one level in this thread


On June 27, 2001 at 10:33:52, Robert Hyatt wrote:

>On June 27, 2001 at 08:49:56, Peter Fendrich wrote:
>
>>I can, in Terra, set values for a draw and that can cause problems.
>>Let's say that the DrawValue=-10 meaning that from my programs point of view the
>>draw is worth -10. This draw value if not zero, has to be handled as a special
>>case all over tha code:
>>
>>1) In the Evaluation function
>>   I always compute the evaluation from white's point of view and adjust it
>>   (by reversing sign) if it's not Terra's turn to move.
>>   The draw value from white's point of view is dependent on if Terra is white
>>   ot not.
>>   Easy to handle if you watch out but I don't like it because it's a source
>>   of errors...
>
>A simple fix:
>int drawscore[2];


Of course!


>at the root of the tree when you start a search:
>
>if (wtm) {
>  drawscore[0]=10;
>  drawscore[1]=-10;
>}
>else {
>  drawscore[0]=-10;
>  drawscore[1]=10;
>}
>
>Now anywhere in the search you can refer to drawscore[wtm] and get the right
>value...
>
>no errors or mess.
>
>
>>
>>2) Hash tables
>>   if I change colours at the root, for instance during an anlyze, all saved
>>   draw vaues in the hash tables are wrong. I can't always know if I have a
>>   draw value or if it's just from an ordinary evaluation. The values are
>>   wrong because the "point of view" for whom the draw is worth = -10 is
>>   changed. I can't rely on the hash tables during an analyze session!
>
>During analyze, set drawscore=0.  It makes no sense otherwise, as the score
>will bounce back and forth from -10 to +10 as you change sides.  That analysis
>looks wrong to the end user.  I turn off asymmetry in analyze mode as well,
>to further avoid this oscillation.


That's what I do and if colours are changed with a command I clear the hash- and
other tables.
Still it can be confusing when a clear draw sitauation will give different
scores just by changing colours and making a move. That's the price of being
asymetric so it doesn't bother me however.


>>
>>3) In the tree
>>   I use something like "Quick Recognizers" as in DarkThought meaning that
>>   certain endgame pattern are detected in interior-nodes instead of in the
>>   evaluation in the end nodes. When draw is recogized it has to be handled
>>   in the same way as in the evaluation function. With EGTB's (I dont use it)
>>   we have the same situation. Source of errors!
>
>Use the simple trick I gave, and it solves this totally.
>
>
>>
>>I'm not sure that my thinking is clear here! Might be that there is some more
>>clever way of looking at things...
>>How do you other chess programming guys do with draw values others than zero?
>>
>>//Peter



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.