Answers.Body: <p>A bit late, but Miguel Ambrona recently developed an algorithm to assess whether a given position is a draw, or loss on timeout, under FIDE rules—in short, whether a checkmate is at all possible. <a href="https://github.com/miguel-ambrona/D3-Chess" rel="noreferrer">https://github.com/miguel-ambrona/D3-Chess</a></p>
  <p>He wrote a complete version which finds the correct answer on all positions, at the cost of unpredictable computation time, and a faster version which provides a conservative answer that is correct on nearly all realistic positions (only failing to assess a handful of games out of nearly a billion).</p>
  <p>There seems to be some interest in incorporating his code into Lichess: <a href="https://github.com/ornicar/lila/issues/9249" rel="noreferrer">https://github.com/ornicar/lila/issues/9249</a>. If done, this would make the adjucation on that site in line with FIDE rules, though it's unclear whether the computational cost of checking whether the position is a technical draw after every move is worth it. Given his fast and nearly perfect code takes only 3 microseconds on average to run, a good balance might be to check every ply using that algorithm, and check the <em>final</em> position using the complete checker. In any case, I think it's fascinating that such a performant algorithm can even be devised that works well on typical &quot;pathological&quot; positions like yours!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-27T11:03:39.567Z
Answers.Text: Couldn't they make it function like an OTB? The arbiter isn't checking every move, they're only checking when a claim is made.
  
  How does lichess handle 50-move and triple-repetition? Official rules require a claim to be made, they're not automatic like checkmate/stalemate. (Which is why the 75-move and fivefold-repetition rules happened.)
Answers.UserDisplayName: Roger Krueger
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-28T19:50:49.323Z
Answers.Text: I like that concept too. I don't play on Lichess all too often, but I believe triple repetitions are automatically claimed, while the 50 move rule is manually claimed (a little button shows up), and I'm assuming the 75 move rule automatically works.
Answers.UserDisplayName: Ovinus Real
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-23T19:07:54.203Z
Answers.LastActivityDate: 2021-09-23T19:07:54.203Z
Answers.UserDisplayName: Ovinus Real
Answers.Body: <blockquote>
  <p>Why this game does not end immediately as a draw by insufficient material?</p>
  </blockquote>
  <p>Two reasons.</p>
  <ol>
  <li>There is no rule regarding ‘insufficient material’. What there is is a draw due to a ‘dead position’. This is defined in article 5.2.2 of the <a href="https://handbook.fide.com/chapter/E012018" rel="noreferrer">FIDE Laws of Chess</a>:</li>
  </ol>
  <blockquote>
  <p>5.2.2    The game is drawn when a position has arisen in which neither player can checkmate the opponent’s king with any series of legal moves. The game is said to end in a ‘dead position’. This immediately ends the game, provided that the move producing the position was in accordance with Article 3 and Articles 4.2 – 4.7.</p>
  </blockquote>
  <ol start="2">
  <li>The game was not played over-the-board in a properly run tournament with a qualified arbiter. If it had you could have stopped the clocks and called the arbiter and claimed your draw.  The arbiter would then have checked that the last move was a legal one before declaring the game drawn.</li>
  </ol>
  <p>As it was played at Chess.com, you should really address your question to the platform concerned. These platforms are businesses and decisions as to what to implement are business decisions. Clearly in this case they decided that the benefit wasn't worth the cost. If you want to try and change this then you need to complain to them.</p>
  <blockquote>
  <p>As the game continues, is it possible that one side can win by timeout when he/she cannot theoretically checkmate?</p>
  </blockquote>
  <p>Not in a real game in a proper OTB tournament. Online anything is possible.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-28T23:07:43.363Z
Answers.LastActivityDate: 2021-08-29T14:44:54.940Z
Answers.LastEditDate: 2021-08-29T14:44:54.940Z
Answers.UserDisplayName: Brian Towers
Body: <p>I played an online game at chess.com and here is the endgame:</p>
  <pre><code> [fen &quot;8/8/1p2p2k/pP2P1p1/P1K3P1/8/8/8 b - - 0 1&quot;]
  </code></pre>
  <p>After white's last move a4, I thought the game ends immediately as a <em>draw by insufficient material</em> as checkmate is theoretically impossible. However, the game lasted 50 more moves before it ended as a <em>draw by 50 moves</em>.</p>
  <p>My questions:</p>
  <ol>
  <li>Why does this game not end immediately as a <em>draw by insufficient material</em>?</li>
  <li>As the game continues, is it possible that one side can win by timeout when he/she cannot theoretically checkmate? If this were a game without time increment and each player has only a few seconds, it will just be a competition of who can click the mouse faster and has faster ping.</li>
  </ol>
  
Tags: <online-chess><draw><time-control><dead-position>
Title: Why does this game not end as a draw by insufficient material?
ThreadText: # Why does this game not end as a draw by insufficient material?
  
  (Asked by: username_0 on 2021-08-28)
  
  I played an online game at chess.com and here is the endgame:
   [fen "8/8/1p2p2k/pP2P1p1/P1K3P1/8/8/8 b - - 0 1"]
  
  After white's last move a4, I thought the game ends immediately as a draw by insufficient material as checkmate is theoretically impossible. However, the game lasted 50 more moves before it ended as a draw by 50 moves.
  My questions:
  
  Why does this game not end immediately as a draw by insufficient material?
  As the game continues, is it possible that one side can win by timeout when he/she cannot theoretically checkmate? If this were a game without time increment and each player has only a few seconds, it will just be a competition of who can click the mouse faster and has faster ping.
  
  **Tags:** online-chess, draw, time-control, dead-position
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2021-08-28. Score: 12 | Accepted answer
  
  > Why this game does not end immediately as a draw by insufficient material?
  
  Two reasons.
  
  1. There is no rule regarding ‘insufficient material’. What there is is a draw due to a ‘dead position’. This is defined in article 5.2.2 of the [FIDE Laws of Chess](https://handbook.fide.com/chapter/E012018):
  
  > 5.2.2 The game is drawn when a position has arisen in which neither player can checkmate the opponent’s king with any series of legal moves. The game is said to end in a ‘dead position’. This immediately ends the game, provided that the move producing the position was in accordance with Article 3 and Articles 4.2 – 4.7.
  
  2. The game was not played over-the-board in a properly run tournament with a qualified arbiter. If it had you could have stopped the clocks and called the arbiter and claimed your draw. The arbiter would then have checked that the last move was a legal one before declaring the game drawn.
  
  As it was played at Chess.com, you should really address your question to the platform concerned. These platforms are businesses and decisions as to what to implement are business decisions. Clearly in this case they decided that the benefit wasn't worth the cost. If you want to try and change this then you need to complain to them.
  
  > As the game continues, is it possible that one side can win by timeout when he/she cannot theoretically checkmate?
  
  Not in a real game in a proper OTB tournament. Online anything is possible.
  
  
  ---
  
  ### Answer by username_1 on 2021-09-23. Score: 5
  
  A bit late, but Miguel Ambrona recently developed an algorithm to assess whether a given position is a draw, or loss on timeout, under FIDE rules—in short, whether a checkmate is at all possible. <https://github.com/miguel-ambrona/D3-Chess>
  
  He wrote a complete version which finds the correct answer on all positions, at the cost of unpredictable computation time, and a faster version which provides a conservative answer that is correct on nearly all realistic positions (only failing to assess a handful of games out of nearly a billion).
  
  There seems to be some interest in incorporating his code into Lichess: <https://github.com/ornicar/lila/issues/9249>. If done, this would make the adjucation on that site in line with FIDE rules, though it's unclear whether the computational cost of checking whether the position is a technical draw after every move is worth it. Given his fast and nearly perfect code takes only 3 microseconds on average to run, a good balance might be to check every ply using that algorithm, and check the *final* position using the complete checker. In any case, I think it's fascinating that such a performant algorithm can even be devised that works well on typical "pathological" positions like yours!
  
  > **Comments:**
  > **username_2**: Couldn't they make it function like an OTB? The arbiter isn't checking every move, they're only checking when a claim is made.  How does lichess handle 50-move and triple-repetition? Official rules require a claim to be made, they're not automatic like checkmate/stalemate. (Which is why the 75-move and fivefold-repetition rules happened.)  
  > **username_1**: I like that concept too. I don't play on Lichess all too often, but I believe triple repetitions are automatically claimed, while the 50 move rule is manually claimed (a little button shows up), and I'm assuming the 75 move rule automatically works.  
  
  ---
  
  