Some thoughts about draws

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Pio
Posts: 115
Joined: Sat Feb 25, 2012 9:42 pm
Location: Stockholm
Contact:

Some thoughts about draws

Post by Pio » Wed Aug 03, 2016 8:34 pm

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

User avatar
cdani
Posts: 2101
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

Re: Some thoughts about draws

Post by cdani » Wed Aug 03, 2016 9:53 pm

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

Pio
Posts: 115
Joined: Sat Feb 25, 2012 9:42 pm
Location: Stockholm
Contact:

Re: Some thoughts about draws

Post by Pio » Wed Aug 03, 2016 10:39 pm

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
Hi Daniel!

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

bob
Posts: 20358
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Some thoughts about draws

Post by bob » Wed Aug 03, 2016 10:58 pm

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
I use a coarser version of that.

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

Post Reply