Answers.Body: <p>Your engine doesn't need to offer a draw. This is the responsibility for GUI. A good GUI should stop the game for 50 moves or three-repetition.</p>
  
  <p>If you want to run game matches, try: <a href="https://github.com/cutechess/cutechess" rel="nofollow noreferrer">https://github.com/cutechess/cutechess</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-07T22:53:36.250Z
Answers.Text: So if I am playing another engine and using a GUI just to adapt my engine to FICS protocol on for example freechess.org the GUI will just automatically claim a draw after 50 move or three repetition rule on behalf of my engine?
Answers.UserDisplayName: mclaassen
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-07T23:00:25.257Z
Answers.Text: @mclaassen Which GUI do you want to use? The FICS server will certainly know 50 move draw and  three repetition rule.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-07T23:05:10.483Z
Answers.Text: Xboard. From what I understand though the 50 move and three repetition rules just give players the option to claim a draw, it is not an automatic draw. So if both engines do not have any way to claim a draw, what happens?
Answers.UserDisplayName: mclaassen
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-07T23:05:50.777Z
Answers.Text: @mclaassen I believe they are automatic drawing. It's like stalemate.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-07T22:48:45.807Z
Answers.LastActivityDate: 2017-12-07T22:48:45.807Z
Answers.UserDisplayName: SmallChess
Answers.Body: <p>Drawing is usually done by the hosting application / GUI. Stockfish even has a nasty bug producing totally ridiculous moves if you play on after move 50. BTW, UCI does not specify offering a draw, this is only provided by the Winboard protocol.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-08T08:53:27.490Z
Answers.LastActivityDate: 2017-12-08T08:53:27.490Z
Answers.UserDisplayName: Jens
Body: <p>I'm working on an engine that implements the UCI protocol that is intended to play against other engines. Since the UCI protocol has no commands for offering or accepting draws, how does this work when games run into the 50-move or threefold repetition rules? Do engines just never offer a draw?  Then, would it not be possible for the game to just never end because there is no way to force a mate and neither engine will offer a draw?</p>
  
Tags: <engines><draw><uci><50-move-rule><threefold-repetition>
Title: How do UCI chess engines handle the 50-move or threefold repetition rules when playing against other engines?
ThreadText: # How do UCI chess engines handle the 50-move or threefold repetition rules when playing against other engines?
  
  (Asked by: username_0 on 2017-12-07)
  
  I'm working on an engine that implements the UCI protocol that is intended to play against other engines. Since the UCI protocol has no commands for offering or accepting draws, how does this work when games run into the 50-move or threefold repetition rules? Do engines just never offer a draw? Then, would it not be possible for the game to just never end because there is no way to force a mate and neither engine will offer a draw?
  
  **Tags:** engines, draw, uci, 50-move-rule, threefold-repetition
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-12-07. Score: 3
  
  Your engine doesn't need to offer a draw. This is the responsibility for GUI. A good GUI should stop the game for 50 moves or three-repetition.
  
  If you want to run game matches, try: <https://github.com/cutechess/cutechess>
  
  > **Comments:**
  > **username_0**: So if I am playing another engine and using a GUI just to adapt my engine to FICS protocol on for example freechess.org the GUI will just automatically claim a draw after 50 move or three repetition rule on behalf of my engine?  
  > **username_1**: @username_0 Which GUI do you want to use? The FICS server will certainly know 50 move draw and  three repetition rule.  
  > **username_0**: Xboard. From what I understand though the 50 move and three repetition rules just give players the option to claim a draw, it is not an automatic draw. So if both engines do not have any way to claim a draw, what happens?  
  > **username_1**: @username_0 I believe they are automatic drawing. It's like stalemate.  
  
  ---
  
  ### Answer by username_2 on 2017-12-08. Score: 3
  
  Drawing is usually done by the hosting application / GUI. Stockfish even has a nasty bug producing totally ridiculous moves if you play on after move 50. BTW, UCI does not specify offering a draw, this is only provided by the Winboard protocol.
  
  
  ---
  
  