cutechess / cutechess

Cute Chess is a graphical user interface, command-line interface and a library for playing chess.
GNU General Public License v3.0
603 stars 147 forks source link

cutechess gives wrong result #819

Closed gahtan-syarif closed 2 months ago

gahtan-syarif commented 2 months ago

this is the position: 8/6k1/3b4/8/2R5/5K2/8/8 w - - 0 1

i intentionally made it so that white loses on time in that position. in that scenario, according to fide and uscf rules, if you flag and your opponent has no legal set of moves that could checkmate you, the game ends in a draw. as can be seen, black there only has a king and a bishop and as such cannot win. in that situation, when white flags, it should have been declared as a draw. yet cutechess mistakenly declared it as a timeloss for white.

to help with the devs, the cases where flagging results in a draw is when the opponent has:

  1. a lone king
  2. a king + bishop OR knight
  3. a king + two bishops that exist in the same color square

cutechess already adjudicates point number 1 correctly as a draw, however, points number 2 and 3 is still wrong on cutechess side.

gahtan-syarif commented 2 months ago

this is my mistake, it seems there can be cases for points 2 and 3 where a mate can happen assuming the opponent massively blunders, closing this issue