First come, first served. An alpha-beta search does not even get to know that the second move is 0.00 and not <0.00.Pi4Chess wrote: ↑Tue Dec 29, 2020 5:12 pmHow it chooses between 2 0.00 moves?syzygy wrote: ↑Tue Dec 29, 2020 3:20 pmBecause SF prefers 0.00 over -0.01.Pi4Chess wrote: ↑Mon Dec 28, 2020 9:46 pmI 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.
Draw by 3 fold repetition...
Moderators: hgm, Rebel, chrisw
-
- Posts: 5563
- Joined: Tue Feb 28, 2012 11:56 pm
Re: Draw by 3 fold repetition...
-
- Posts: 5563
- Joined: Tue Feb 28, 2012 11:56 pm
Re: Draw by 3 fold repetition...
It would be preferring -0.24 over -0.25. If a draw is evaluated as -0.24, then moves leading to a -0.23 evaluation would be preferred over moves leading to a draw.
-
- Posts: 253
- Joined: Mon Nov 16, 2020 12:13 pm
- Full name: Manuel Rivera
Re: Draw by 3 fold repetition...
Oh..syzygy wrote: ↑Tue Dec 29, 2020 8:43 pmFirst come, first served. An alpha-beta search does not even get to know that the second move is 0.00 and not <0.00.Pi4Chess wrote: ↑Tue Dec 29, 2020 5:12 pmHow it chooses between 2 0.00 moves?syzygy wrote: ↑Tue Dec 29, 2020 3:20 pmBecause SF prefers 0.00 over -0.01.Pi4Chess wrote: ↑Mon Dec 28, 2020 9:46 pmI 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.
Raspberry Pi4 bot : https://lichess.org/@/BetterAnalyze
-
- Posts: 1470
- Joined: Mon Apr 23, 2018 7:54 am
Re: Draw by 3 fold repetition...
The Play Magnus engine does appear not to know the 3-fold-repetition rule, allowing draws in totally winning positions. Glaurung (on which it was based) is open source. It might be interesting to look inside the code to see what's going on.
-
- Posts: 4556
- Joined: Tue Jul 03, 2007 4:30 am
Re: Draw by 3 fold repetition...
Depends on the implementation, I recall Rebel Decade used to be able to switch from some 0.00 move to another, or from any score to another move of the same score. I believe it did it when it spent more time on the move it switched to (not that this move is any better, but I'll play it instead so all this time wasn't wasted.)
The logic is sound (specially when memory is scarce, and this new move has overwritten hash contents of the old one), though I don't know if it remains like this in latest versions of ProDeo.
-
- Posts: 5563
- Joined: Tue Feb 28, 2012 11:56 pm
Re: Draw by 3 fold repetition...
Not when it implements alpha-beta.
Perhaps in such cases the new move failed high, which means new score > 0.00 (> old score), and the engined displayed 0.00 (old score) as the known lower bound. With more time it would then figure out its exact score.I recall Rebel Decade used to be able to switch from some 0.00 move to another, or from any score to another move of the same score. I believe it did it when it spent more time on the move it switched to (not that this move is any better, but I'll play it instead so all this time wasn't wasted.)
-
- Posts: 4556
- Joined: Tue Jul 03, 2007 4:30 am
Re: Draw by 3 fold repetition...
Rebel Decade never displayed fails lows, only exact scores (a failing high move would not replace a current one until its exact score was known).
Another possibility is that it truncated scores (say, move is scored 0.001, new move scores 0.002, both truncate to 0.00, user sees engine switch from move A to move B with same score.)
This was a common occurrence.
-
- Posts: 27793
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Draw by 3 fold repetition...
Virtually all engines with >2000 Elo do recognize 3-fold repetitions as draws. And as a consequence they will avoid the opponent forcing them on them when they think non-repeating alternatives score better.
If they nevertheless allow them to happen when there are better alternatives, it was just because they did not search deep enough to see them coming.
Why don't engines just search so deep that they would always see everything infinitely far in advance? Well, I suppose you can guess the answer to that yourself...
If they nevertheless allow them to happen when there are better alternatives, it was just because they did not search deep enough to see them coming.
Why don't engines just search so deep that they would always see everything infinitely far in advance? Well, I suppose you can guess the answer to that yourself...
-
- Posts: 10282
- Joined: Thu Mar 09, 2006 12:37 am
- Location: Tel-Aviv Israel
Re: Draw by 3 fold repetition...
It is possible to add some small random number to the evaluation sosyzygy wrote: ↑Sun Mar 21, 2021 10:22 amNot when it implements alpha-beta.
Perhaps in such cases the new move failed high, which means new score > 0.00 (> old score), and the engined displayed 0.00 (old score) as the known lower bound. With more time it would then figure out its exact score.I recall Rebel Decade used to be able to switch from some 0.00 move to another, or from any score to another move of the same score. I believe it did it when it spent more time on the move it switched to (not that this move is any better, but I'll play it instead so all this time wasn't wasted.)
alphabeta can prefer one draw and not another draw because draws(including draws by repetition) are not exactly 0.00.
In this case if there are many moves that allow you to force repetitions after the move you play and the opponent does not have many option to get a draw then you can expect the score to become higher and I think that it can help the engine to play better in some cases because if you have many paths that lead to draw by repetition then there is a better probability that you miss something because of not searching deep enough and you have more than a draw.