ddugovic / Stockfish

Retired multi-variant fork of popular UCI chess engine; please use Fairy-Stockfish instead
https://github.com/ianfab/Fairy-Stockfish
GNU General Public License v3.0
132 stars 44 forks source link

Check allowed in Racing Kings #540

Closed ghost closed 6 years ago

ghost commented 6 years ago

Checks are allowed in Racing Kings but AFAIK there are no checks. Edit: s/Check/Checks

ddugovic commented 6 years ago

How do I reproduce this issue (preferably from a command line)?

ghost commented 6 years ago

I have used XBoard 4.9.1 with UCI2WB.

  1. Rg3 Nxf2
  2. Qa8+ [engine lost on time]
ddugovic commented 6 years ago

Stockfish rejects the illegal move h1a8 as evidenced by use of Stockfish on a command line (input commands are uci, setoption, position, and d):

$ ./stockfish
Stockfish 2018-09-01 64 BMI2 Multi-Variant by D. Dugovic, F. Fichter et al.
uci
id name Stockfish 2018-09-01 64 BMI2 Multi-Variant
id author D. Dugovic, F. Fichter et al.

option name Debug Log File type string default
option name Contempt type spin default 21 min -100 max 100
option name Analysis Contempt type combo default Both var Both var Off var White var Black
option name Threads type spin default 1 min 1 max 512
option name Hash type spin default 16 min 1 max 131072
option name Clear Hash type button
option name Ponder type check default false
option name MultiPV type spin default 1 min 1 max 500
option name Skill Level type spin default 20 min 0 max 20
option name Move Overhead type spin default 30 min 0 max 5000
option name Minimum Thinking Time type spin default 20 min 0 max 5000
option name Slow Mover type spin default 84 min 10 max 1000
option name nodestime type spin default 0 min 0 max 10000
option name UCI_Chess960 type check default false
option name UCI_Variant type combo default chess var chess var giveaway var atomic var crazyhouse var extinction var grid var horde var kingofthehill var losers var racingkings var 3check var twokings var suicide var bughouse var displacedgrid var loop var slippedgrid var twokingssymmetric
option name UCI_AnalyseMode type check default false
option name SyzygyPath type string default <empty>
option name SyzygyProbeDepth type spin default 1 min 1 max 100
option name Syzygy50MoveRule type check default true
option name SyzygyProbeLimit type spin default 7 min 0 max 7
uciok
setoption name UCI_Variant value racingkings
info string variant racingkings startpos 8/8/8/8/8/8/krbnNBRK/qrbnNBRQ w - - 0 1
position startpos moves g2g3 d1f2 h1a8
d

 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   | R |   |
 +---+---+---+---+---+---+---+---+
 | k | r | b | n | N | n |   | K |
 +---+---+---+---+---+---+---+---+
 | q | r | b |   | N | B | R | Q |
 +---+---+---+---+---+---+---+---+

Fen: 8/8/8/8/8/6R1/krbnNn1K/qrb1NBRQ w - - 0 2
Key: 85821E36ECFEF543
Checkers:
ianfab commented 6 years ago

@stas730 XBoard does not know the rules of racing kings, it just assumes that the user and the engine know the rules. If you make an illegal move, XBoard will pass it to Stockfish, Stockfish rejects it, which ultimately leads to Stockfish making an illegal move or losing on time.

ghost commented 6 years ago

Which GUI can I use to avoid it?

ddugovic commented 6 years ago

I'm not sure how best to obtain it for your OS, but I assume https://github.com/cutechess/cutechess (or http://lichess.org/setup/ai ) has a full rules implementation.