Hi!
It seems to me that engines normally evaluate draws as zero. I think that is wrong.
As an example assume that you are on the move. You have two possible moves:
"Move 1" where you can prove that whatever move the opponent may do you can draw (either by repetition, tablebases, insufficent material or pat) but the score returned by the search is zero
"Move 2" where you cannot prove that whatever move the opponent may do you can draw but the returned score is zero
What move should your engine choose? Of course you should choose "Move 1" because you always have the choice to draw but some moves deeper in the tree it turns out that a position that you initially thought was worse than the draw now turns out to be really good.
What value should you assign to a position that you can force a draw? I do not know. Probably you should assign a higher score the closer to leafes you are since you are less certain of the true score.
Good luck with your engines!!!
Some thoughts about draws
Moderators: hgm, Rebel, chrisw
-
- Posts: 2204
- Joined: Sat Jan 18, 2014 10:24 am
- Location: Andorra
Re: Some thoughts about draws
Please, anyone correct me if I'm wrong. Some engines does not colapse evaluations to 0 on repetition even if they don't know how they/the rival will improve, like Gull. The advantage of this is having an evaluation more detailed (!=0). The disadvantage is that they can confuse a draw with a non drawn position. Every developer decides a way to proceed on this.
In Andscacs I have a somewhat different approach. When I have to return 0 because is draw by repetition, I return 1 if the static evaluation is > 0, and -1 if is < 0, and only 0 if is really 0. This serves two purposes. To differentiate a little between draws, and as a little contempt. In fact was a little win even in selfplay.
http://talkchess.com/forum/viewtopic.php?t=60940
In Andscacs I have a somewhat different approach. When I have to return 0 because is draw by repetition, I return 1 if the static evaluation is > 0, and -1 if is < 0, and only 0 if is really 0. This serves two purposes. To differentiate a little between draws, and as a little contempt. In fact was a little win even in selfplay.
http://talkchess.com/forum/viewtopic.php?t=60940
Daniel José - http://www.andscacs.com
-
- Posts: 334
- Joined: Sat Feb 25, 2012 10:42 pm
- Location: Stockholm
Re: Some thoughts about draws
Hi Daniel!cdani wrote:Please, anyone correct me if I'm wrong. Some engines does not colapse evaluations to 0 on repetition even if they don't know how they/the rival will improve, like Gull. The advantage of this is having an evaluation more detailed (!=0). The disadvantage is that they can confuse a draw with a non drawn position. Every developer decides a way to proceed on this.
In Andscacs I have a somewhat different approach. When I have to return 0 because is draw by repetition, I return 1 if the static evaluation is > 0, and -1 if is < 0, and only 0 if is really 0. This serves two purposes. To differentiate a little between draws, and as a little contempt. In fact was a little win even in selfplay.
http://talkchess.com/forum/viewtopic.php?t=60940
The point is, who can force the repetition or force the simplificatio to a won endgame or force the stand pat? The one having that option has an advantage since he can always choose to take that option later on.
One problem is to determine the value of the option if you tune by selfplay. I guess an approximate value could be detemined by halfing the most accurate value found when playing the version that do contain this feature against the old version that do not contain this feature.
Good luck with Andscacs!
Hasta luego
/Pio
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Some thoughts about draws
I use a coarser version of that.cdani wrote:Please, anyone correct me if I'm wrong. Some engines does not colapse evaluations to 0 on repetition even if they don't know how they/the rival will improve, like Gull. The advantage of this is having an evaluation more detailed (!=0). The disadvantage is that they can confuse a draw with a non drawn position. Every developer decides a way to proceed on this.
In Andscacs I have a somewhat different approach. When I have to return 0 because is draw by repetition, I return 1 if the static evaluation is > 0, and -1 if is < 0, and only 0 if is really 0. This serves two purposes. To differentiate a little between draws, and as a little contempt. In fact was a little win even in selfplay.
http://talkchess.com/forum/viewtopic.php?t=60940
In Crafty, including syzygy tables, I use the following draw scores:
-2: blessed loss
0: draw
2: cursed win
To those I add +1 if side on move is ahead in material, and -1 if side on move is behind in material. That gives me:
-3: blessed loss, down in material
-2: blessed loss, equal material
-1: blessed loss, up in material OR actual draw, down in material
0: Draw, material equal
1: draw, material ahead or cursed win down in material
2: cursed win, equal material
3: cursed win, up in material
That was my first cut, I might go back and get rid of the overloaded values of -1 and +1 and spread them out by another unit. The idea is that when choosing among draws, prefer draws with material advantage to avoid tossing material to make the draw easier for the opponent, etc...
I will likely end up with blessed losses at -3 +/- 1 depending on material advantage, cursed win at +3 +/- 1, and draws at 0 +/- 1. I THINK I would prefer a draw material down over a blessed loss material up. Have to think about it a bit...