
Capturing the king without royal-power does not forfeits castling rights, i.e capturing the king on f1/f8 does not mean king on e1/e8 is unable to castle either sides.
[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "New game"]
[Black "?"]
[Result "*"]
[Variant "illegal"]
[SetUp "1"]
[FEN "rnbqkknr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKKNR w - - 0 1"]
[PlyCount "39"]
{[#] Training} 1. d2-d4 d7-d5 2. Nb1-c3 Ng8-f6 3. Bc1-g5 Nf6-e4 4. Nc3-e4 d5-e4
[Event "?"]
[Site "CuteChess 1.0.0 | i7-5960X 4.1GHz 8-Core"]
[Date "2017.11.17"]
[Round "?"]
[White "stockfish_x64_bmi2"]
[Black "stockfish_x64_bmi2"]
[Result "0-1"]
[PlyCount "38"]
[Termination "illegal move"]
[TimeControl "180+2"]
[Variant "twokingssymmetric"]
On ICC you're able to castle if the non-royal king get captured earlier in the game. Confirmed by testing 3min ago of this writing.
@Nordlandia So if I understand correctly, Stockfish conforms to the ICC rules, but this is inconsistent with how it is implemented in cutechess, right?
Yes, It is related to cutechess rules. So no worries 馃憣
I find it impressive that the bug occurred on the very first test game.
The first game was set up without castling rights. At least cutechess is correct here. The second game shows a bug in cutechess.
@alwey cutechess does not allow castling if the f1/f8 king get captured.
Tested twokings and twokingssymmetric.
This is a bug - my bad. I already found the cause. BTW castling rights will be removed if one of the kings moves. But this is ok. We already talked about this.
@alwey this _nuance_ was probably forgotten on the day of implementing twokings rules.
I guess this was no accident, but the server maintainers of ICC simply announced as rules what had been implemented.
@Nordlandia Why are there two PGNs? It looks like both are the same game but with different PGN headers. If Stockfish castled in a game started from an FEN without castling rights (first game), there would be a bug. However, the header looks strange, so maybe the FEN stated there was not really used.
@ianfab Chessbase 14 allow illegal setup positions, for example make diagram for variant chess. Fritz gui do not. Of course TwoKings is not supported by Chessbase/Fritz so the FEN string show up for unusual setup position.
It appears that Stockfish respects the castling rights in the input FEN and doesn't illegally castle?
Stockfish 181117 64 BMI2 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott
setoption name UCI_Variant value twokings
info string variant twokings startpos rnbqkknr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKKNR w KQkq - 0 1
position fen rnbqkknr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKKNR w - - 0 1 moves g1f3 g8f6 g2g3 g7g6 f1g2 f8g7 e1g1
d
+---+---+---+---+---+---+---+---+
| r | n | b | q | k | | | r |
+---+---+---+---+---+---+---+---+
| p | p | p | p | p | p | k | p |
+---+---+---+---+---+---+---+---+
| | | | | | n | p | |
+---+---+---+---+---+---+---+---+
| | | | | | | | |
+---+---+---+---+---+---+---+---+
| | | | | | | | |
+---+---+---+---+---+---+---+---+
| | | | | | N | P | |
+---+---+---+---+---+---+---+---+
| P | P | P | P | P | P | K | P |
+---+---+---+---+---+---+---+---+
| R | N | B | Q | K | | | R |
+---+---+---+---+---+---+---+---+
Fen: rnbqk2r/ppppppkp/5np1/8/8/5NP1/PPPPPPKP/RNBQK2R w - - 2 4
Key: 2E2DD879FD75EF92
Checkers:
CuteChess solved this bug.
@Nordlandia great work!
Please, re-open this issue.
I need to know from @ianfab and @alwey if I must compile an updated cutechess-cli for fishtest after this commit https://github.com/cutechess/cutechess/commit/c31ff038280ff202dd320da11f66986e7baf5ef0
@ppigazzini I think it is not that urgent as it does not lead to crashes, but "only" to incorrect adjudication of games, and we currently anyway do not have a two kings test running. Updated compiles would nevertheless be nice if you find the time. I have to keep in mind to also rename the symmetric two kings variant in the fishtest code as soon as cutechess is updated.
@ppigazzini: The change is an improvement for Two Kings Chess, but only makes a difference in rare cases. But my patch may increase the instabilty of the Giveaway variant in cutechess because there is a hidden bug in it. I used some workarounds to minimise its effect. Now one of these guards has been removed. The problem: cutechess may give false positives for illegal moves in Giveaway when castling is allowed.
So am not really happy with either older or newer version.
I can attack the root cause of the problem with Giveaway chess only after an upgrade of my linux platform. In the next days I may try to install the newer version in parallel to my current platform.
@ianfab new builds updated at today development version tested in fishtest with my workers (ubuntu, windows 10, WSL), here the PR https://github.com/ianfab/FishCooking/pull/6
@alwey let me know when you will have a version that make you happy
@ppigazzini :
let me know when you will have a version that make you happy
promised
@ppigazzini Thanks, I have merged the PR. I also increased the version number in fishtest to force the workers to download the new binaries.
Most helpful comment
Yes, It is related to cutechess rules. So no worries 馃憣
I find it impressive that the bug occurred on the very first test game.