Hello!
Sometimes, with CuteChess, I have games ending by illegal move, and when I look into the PGN, I see that the engine seems to have played twice the same move consecutively. It happens with several engines, some engines of mine, and some other. Until now I didn't manage to understand what happens. Have someone else yet experienced the same thing?
In case my explanation wouldn't be clear enough, I attach the PGN of a game in which the problem happened.
Regards.
Roland
Engine playing twice the same move in a CuteChess tournament
Moderators: hgm, Rebel, chrisw
-
- Posts: 640
- Joined: Sat Jun 08, 2013 10:07 am
- Location: France
- Full name: Roland Chastain
Engine playing twice the same move in a CuteChess tournament
Qui trop embrasse mal étreint.
-
- Posts: 27796
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Engine playing twice the same move in a CuteChess tournament
This typically happens when the engine's search doesn't find any move to play at all (in other words, considers itself check- or stalemated), while the GUI disagrees (and thus has not declared game end already, but sets the engine thinking). Usually this means the engine has a move bug, and GUIs tend to be infallible. But it can also happen when legality testing or mate detection in the GUI has been switched off, and the opponent did not claim the game (which only CECP engines can do) after it delivered the death blow.
The root search then never saves anything as best move, so that the corresponding variable still holds the move of the previous turn (or perhaps that of the opponent, depending on how you have coded this).
The root search then never saves anything as best move, so that the corresponding variable still holds the move of the previous turn (or perhaps that of the opponent, depending on how you have coded this).
-
- Posts: 640
- Joined: Sat Jun 08, 2013 10:07 am
- Location: France
- Full name: Roland Chastain
Re: Engine playing twice the same move in a CuteChess tournament
@H.G.Muller
Thank you. I will search in those directions.
Thank you. I will search in those directions.
Qui trop embrasse mal étreint.
-
- Posts: 347
- Joined: Tue Nov 19, 2019 4:34 am
- Location: https://github.com/TerjeKir/weiss
- Full name: Terje Kirstihagen
Re: Engine playing twice the same move in a CuteChess tournament
Can also happen if the last moves before this were discarded for any reason (input buffer too small, incorrect validation of moves..), as the engine would think it was playing the same position again.
-
- Posts: 640
- Joined: Sat Jun 08, 2013 10:07 am
- Location: France
- Full name: Roland Chastain
Re: Engine playing twice the same move in a CuteChess tournament
Ah, yes, there is also that possibility. I didn't think of it. Thank you.
Last edited by Roland Chastain on Sun Oct 18, 2020 1:15 pm, edited 1 time in total.
Qui trop embrasse mal étreint.
-
- Posts: 2487
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: Engine playing twice the same move in a CuteChess tournament
That's why I maintain a validity flag after evaluating the "position" command (UCI). If the FEN or the move list is illegal, I write out the problem's cause with "info string error (problem description)". A subsequent "go" command will be answered with "bestmove 0000". Then it's easy to evaluate log files and see what went wrong.
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 3232
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: Engine playing twice the same move in a CuteChess tournament
Your engine has a bug, which I pointed out in another thread (about c-chess-cli). When receiving "position fen ... moves ...", it discards the moves. Have you fixed it ?Roland Chastain wrote: ↑Sun Oct 18, 2020 10:48 am Hello!
Sometimes, with CuteChess, I have games ending by illegal move, and when I look into the PGN, I see that the engine seems to have played twice the same move consecutively. It happens with several engines, some engines of mine, and some other. Until now I didn't manage to understand what happens. Have someone else yet experienced the same thing?
In case my explanation wouldn't be clear enough, I attach the PGN of a game in which the problem happened.
Regards.
Roland
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
-
- Posts: 640
- Joined: Sat Jun 08, 2013 10:07 am
- Location: France
- Full name: Roland Chastain
Re: Engine playing twice the same move in a CuteChess tournament
Yes, it's true, but I don't believe this be the same problem. For traditional chess, CuteChess uses "position startpos ..." syntax. And, in that case, the engine that seems to play illegal move is not mine (it's Iota 0.1).
And yes, I fixed the bug, but not yet released the new version.
Qui trop embrasse mal étreint.
-
- Posts: 640
- Joined: Sat Jun 08, 2013 10:07 am
- Location: France
- Full name: Roland Chastain
Re: Engine playing twice the same move in a CuteChess tournament
Good idea. I should do something like that.Ras wrote: ↑Sun Oct 18, 2020 12:51 pm That's why I maintain a validity flag after evaluating the "position" command (UCI). If the FEN or the move list is illegal, I write out the problem's cause with "info string error (problem description)". A subsequent "go" command will be answered with "bestmove 0000". Then it's easy to evaluate log files and see what went wrong.
Qui trop embrasse mal étreint.