Draw by 3 fold repetition...

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Pi4Chess
Posts: 253
Joined: Mon Nov 16, 2020 12:13 pm
Full name: Manuel Rivera

Re: Draw by 3 fold repetition...

Post by Pi4Chess »

Thanks for all your participations in this topic. You have helped me express what i was thinking about this 3 king's check repetition draws happening and my wondering about the adressing of this.
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Draw by 3 fold repetition...

Post by Ras »

Pi4Chess wrote: Tue Dec 29, 2020 9:58 am@ras : when you Say a draw is a draw, are you saying that when SF evaluates a position as a draw he is always right ?
The problem isn't the draw. It's that the alternatives Stockfish can see would be worse, and not just by a tiny little bit. That's what the contempt is for, to prevent the engine heading for a draw just because of minor eval noise.

As for why a draw is a draw: because draw through repetition earns you half a point, just as draw through insufficient material or stalemate.
Rasmus Althoff
https://www.ct800.net
Pi4Chess
Posts: 253
Joined: Mon Nov 16, 2020 12:13 pm
Full name: Manuel Rivera

Re: Draw by 3 fold repetition...

Post by Pi4Chess »

Ras wrote: Tue Dec 29, 2020 10:33 am
Pi4Chess wrote: Tue Dec 29, 2020 9:58 am@ras : when you Say a draw is a draw, are you saying that when SF evaluates a position as a draw he is always right ?
The problem isn't the draw. It's that the alternatives Stockfish can see would be worse, and not just by a tiny little bit. That's what the contempt is for, to prevent the engine heading for a draw just because of minor eval noise.

As for why a draw is a draw: because draw through repetition earns you half a point, just as draw through insufficient material or stalemate.
Ok so conptempt is already adressing this with I assume testing has lead to 24 contempt to be the number with better results.

If SF always search for opponent's possible checks to its king's in say next n moves we can then assume that when a 3 repetition by forced checks occurs SF is never taken by surprise then ?
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Draw by 3 fold repetition...

Post by Ras »

Pi4Chess wrote: Tue Dec 29, 2020 10:53 amIf SF always search for opponent's possible checks to its king's in say next n moves we can then assume that when a 3 repetition by forced checks occurs SF is never taken by surprise then ?
Yes. Stockfish knows that this will be draw through repetition. In particular, checks are extended in search so that Stockfish should see such lines already at relatively low search depths.
Rasmus Althoff
https://www.ct800.net
Pi4Chess
Posts: 253
Joined: Mon Nov 16, 2020 12:13 pm
Full name: Manuel Rivera

Re: Draw by 3 fold repetition...

Post by Pi4Chess »

Ras wrote: Tue Dec 29, 2020 11:17 am
Pi4Chess wrote: Tue Dec 29, 2020 10:53 amIf SF always search for opponent's possible checks to its king's in say next n moves we can then assume that when a 3 repetition by forced checks occurs SF is never taken by surprise then ?
Yes. Stockfish knows that this will be draw through repetition. In particular, checks are extended in search so that Stockfish should see such lines already at relatively low search depths.
Ok. may be as i said telling SF the "difference" between a SURE draw by rule of repetition and an evaluated draw (other than egtb) could open a very tiny window of improvment even if i don't know how.
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Draw by 3 fold repetition...

Post by Ras »

Pi4Chess wrote: Tue Dec 29, 2020 11:55 amOk. may be as i said telling SF the "difference" between a SURE draw by rule of repetition and an evaluated draw (other than egtb) could open a very tiny window of improvment
The alternative to allowing repetition in the example positions wasn't an endgame draw. It would have been a clearly worse-than-draw continuation. Just use Stockfish in multi-PV mode and see how the best non-drawing move would fare.
Rasmus Althoff
https://www.ct800.net
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: Draw by 3 fold repetition...

Post by syzygy »

Pi4Chess wrote: Mon Dec 28, 2020 9:46 pm
Uri Blass wrote: Mon Dec 28, 2020 9:30 pm
If you think that some move should be different then you should give a position and say what move stockfish played and what it should play based on your opinion.
I am just asking those who know how engines are coded why a top engine like stockfish "accepts" to get into a position where the opponent can draw by 3 fold repetition with forced King's check. Is it unavoidable ? Is this took into account enough to discard certain moves from others within its evaluation ?
I am just asking.
Because SF prefers 0.00 over -0.01.
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: Draw by 3 fold repetition...

Post by syzygy »

Pi4Chess wrote: Tue Dec 29, 2020 11:55 am
Ras wrote: Tue Dec 29, 2020 11:17 am
Pi4Chess wrote: Tue Dec 29, 2020 10:53 amIf SF always search for opponent's possible checks to its king's in say next n moves we can then assume that when a 3 repetition by forced checks occurs SF is never taken by surprise then ?
Yes. Stockfish knows that this will be draw through repetition. In particular, checks are extended in search so that Stockfish should see such lines already at relatively low search depths.
Ok. may be as i said telling SF the "difference" between a SURE draw by rule of repetition and an evaluated draw (other than egtb) could open a very tiny window of improvment even if i don't know how.
Please come back when you know how...
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Draw by 3 fold repetition...

Post by Ras »

syzygy wrote: Tue Dec 29, 2020 3:20 pmBecause SF prefers 0.00 over -0.01.
With the standard contempt of 24, that would be preferring 0.00 over -0.25, no?
Rasmus Althoff
https://www.ct800.net
Pi4Chess
Posts: 253
Joined: Mon Nov 16, 2020 12:13 pm
Full name: Manuel Rivera

Re: Draw by 3 fold repetition...

Post by Pi4Chess »

syzygy wrote: Tue Dec 29, 2020 3:20 pm
Pi4Chess wrote: Mon Dec 28, 2020 9:46 pm
Uri Blass wrote: Mon Dec 28, 2020 9:30 pm
If you think that some move should be different then you should give a position and say what move stockfish played and what it should play based on your opinion.
I am just asking those who know how engines are coded why a top engine like stockfish "accepts" to get into a position where the opponent can draw by 3 fold repetition with forced King's check. Is it unavoidable ? Is this took into account enough to discard certain moves from others within its evaluation ?
I am just asking.
Because SF prefers 0.00 over -0.01.
How it chooses between 2 0.00 moves?