Skip to content

Conversation

@Disservin
Copy link
Owner

@Disservin Disservin commented May 10, 2024

fixes the issue where

[Variant "From Position"]
[FEN "6k1/1p2p1rp/rP1pR3/2pP1pP1/p1P2P1P/R5K1/8/8 b - - 0 1"]

1... h5 2. Rh6 Rh7 3. Re6 Rg7 4. Rh6 Rh7 5. Re6 Rg7

is correctly adjudicated as a threefold repetition.

@gahtan-syarif
Copy link
Contributor

is this pr not ready?

@gahtan-syarif
Copy link
Contributor

It seems cutechess has went ahead and implemented this cutechess/cutechess@b57c702

@Disservin
Copy link
Owner Author

@ArcheCadia, @gahtan-syarif I am still a bit unsure about this..
while we check the engines pv we also check if the game is over

void Match::verifyPvLines(const Player& us) {

also taking the 3fold repetition into account
if (board.isRepetition()) return {GameResultReason::THREEFOLD_REPETITION, GameResult::DRAW};

with the change fastchess will notice (correctly) that the game already ended, most engines do not implement this correctly and as such will get illegal pv warnings after this merge.. I guess it is technically correct, just thinking about the consequences of this.. does Stockfish do this even correctly or should we skip the repetition check for the pv line?

@Disservin Disservin force-pushed the exact-ep-handling branch from ee9998d to 5d19da0 Compare June 7, 2025 10:30
@gahtan-syarif
Copy link
Contributor

Personally i think its a good idea to let engine authors know through the illegal pv warning. Its an edge case thats not taken into account in a lot of engines because they are not aware... so by doing this it will give them a heads up to implement correct ep square handling on pinned positions

@Disservin Disservin merged commit f3efcc6 into master Jun 8, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants