Repetition score issue when opponent things different.

Discussion of chess software programming and technical issues.

Moderator: Ras

Pio
Posts: 338
Joined: Sat Feb 25, 2012 10:42 pm
Location: Stockholm

Re: Repetition score issue when opponent things different.

Post by Pio »

OliverBr wrote: Sat Jul 12, 2025 10:38 pm
Pio wrote: Wed Jul 09, 2025 1:47 pm The way I handle it, is to give the side having the option to draw, a slight advantage score wise. In that way the leading side will always favour positions where it cannot loose and the loosing side will always have to try to get out of the trouble.
Yes, I know of this, but I am fear, this breaks evaluation symmetry. I have seen it, but on only a few engines. Please correct me if I am wrong. Of course this doesn't automatically mean it could be a good way to prevent this phenomen.
I would try it. I guess one way of finding wins when you can force draws is that when you have a forced draw score, remove history reductions since they will be complete garbage. Maybe try to remove reductions/extensions belonging to pv too.
osvitashev
Posts: 12
Joined: Tue Sep 07, 2021 6:17 pm
Full name: Alex S

Re: Repetition score issue when opponent things different.

Post by osvitashev »

OliverBr wrote: Sat Jul 12, 2025 10:38 pm
Pio wrote: Wed Jul 09, 2025 1:47 pm The way I handle it, is to give the side having the option to draw, a slight advantage score wise. In that way the leading side will always favour positions where it cannot loose and the loosing side will always have to try to get out of the trouble.
Yes, I know of this, but I am fear, this breaks evaluation symmetry. I have seen it, but on only a few engines. Please correct me if I am wrong. Of course this doesn't automatically mean it could be a good way to prevent this phenomen.
In my experience, evaluating draw as a score of 0 leads to trouble.
I remember asking another question mentioning evaluation symmetry on this forum and getting yelled at by people who said chess is inherently not a symmetrical game. If it was, white would not have a noticeable advantage in high level play.
Consider this: it is feasible for the game to begin from the normal starting position and end by triple repetition if both players just move their knights a bunch of times.
How should the two players go about evaluating this prospect? Should both of them see it as 0 because it's a draw? No! Because we know White can statistically achieve a better score by playing 1. e4...
Golden
Posts: 2
Joined: Sat Feb 24, 2024 5:21 am
Full name: Deshawn Mohan

Re: Repetition score issue when opponent things different.

Post by Golden »

OliverBr wrote: Sat Jul 12, 2025 11:07 pm
hgm wrote: Sat Jul 12, 2025 10:20 am It just failed to recognize the best continuation for black, counting on poor defense, and thus over-estimating its own score. It this case the poor defense happened to be going for the perpetual, but it could really have been anything else as well. It just overlooked black had better moves when he forced the perpetual.
Why play "57. Qc7" at all and not "56. Qd6"?
As said before: Analyzing the position alone, OliThink always plays "57. Qd6". The "57. Qc7" idea comes only when staring a couple of moves sooner, when OliThink was already 0.00 scoring the position and never left the 0.00

I have never seen this with other engines. How can this be avoided?
This could depend on how your move selection process works in your search. When you analyze the position by first setting the position directly, if your engine views both Qd6 and Qc7 as both 0, then depending on how you select the best move, most implementations would default to the one tried first which I'd guess in your case is likely Qd6. The reason why it can be different a couple moves sooner, is because now again depending on how your search is implemented, the order in which you sort your moves can be different due to the transposition table or any history heuristics/killers, etc. As an example, while analyzing the position a couple moves sooner, the transposition table could have saved as the best move Qc7, now when you finally arrive to the position, you try the ttMove first which is Qc7 and it scores 0. Now you try Qd6 but it too scores 0, so you default to playing Qc7 since that was tried first. Assuming the above is true, then the underlying issue is that Qd6 and Qc7 should not both be scored as 0. This can be due to many reasons but likely a lacking evaluation function or even too aggressively pruning.