What is adjudicated auto-draw?
When testing Xiangqi engines, the only ways to adjudicate a draw are repetition and the 60-move rule, so drawn games can get very long. Testers may therefore use auto-draw measures to speed up testing, but the impact on results must be considered.
Common auto-draw rules include "only Advisors and Elephants remain on the board" or "both engines' scores stay within ±n for x consecutive moves". The latter can affect the actual result, in varying degrees, because in engine testing a game that stays balanced for a long time can still be lost in the late stage.
To keep results rigorous, the Pikafish team's auto-draw on its testing platform guarantees that the current position can never be decided.
Currently, the auto-draw on the Pikafish testing platform mainly looks at the material combination. The only material combinations in which a decisive result is impossible are:
- 1 Cannon vs 1 Advisor and n Elephants
- 1 Cannon and n Elephants vs n Elephants
- 1 Cannon vs 1 Cannon
(Note: time losses are not considered; since neither side can be forced into a rule violation, repetition violations are not considered either; n ranges from 0 to 2.)
There are also some material combinations in which, for either side to win, the longest line of best play must end in a checkmate or stalemate after just one move. The engine on GitHub has built-in board handling for these combinations, so the engine can never lose a drawn position in them. These can also be auto-drawn.
How to check
When it is your turn to move, you only need to consider whether the move you are about to play can be answered by an immediate checkmate or stalemate. If not, that move cannot lose. If so, pick a different move, and it is impossible for every move to be answered by an immediate checkmate or stalemate.
- 1 Cannon vs 2 Advisors and n Elephants
- 1 Cannon and more than 0 Elephants vs 1 Advisor and n Elephants
- 1 Cannon and n Elephants vs 1 Cannon and n Elephants (with the total number of Elephants on both sides greater than 0)
