Answers.Body: <p>In Lichess, you have 2 separate features: computer analysis and endgame tablebases. Scores are always shown using the computer analysis feature, but at the endgame you can also see the tablebases features, available for 6-men endings I think. If you open this component, you will see each winning/drawing/losing move together with their DTZ (distance to zeroing the 50-moves rule) and DTM (distance to mate).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-14T07:41:12.813Z
Answers.LastActivityDate: 2020-09-14T07:41:12.813Z
Answers.UserDisplayName: Jaume Agulles
Answers.Body: <p>Unless you explicitly hard-code these endgames, or provide the computer with endgame tablebases, they will apply what they've always done throughout the game: search lines and return the static eval (which is basically the evaluation function of the engine, evaluated on the final position). The static eval isn't smart enough to realize that this game is a draw - keep in mind the static eval is supposed to work for all positions, so it's not surprising that it doesn't return a completely accurate score for this one. Accordingly the computer flatlines at -0.50, until the 50-move rule helps it prune to a draw.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-14T20:13:51.837Z
Answers.Text: But isn't the 50 move rule reflected in the evaluation? I've seen Lichess evaluations giving a 0 score for positions that lead to a three-fold repetition for the losing side. And if it doesn't account for the 50 move rule, wouldn't the engine find that perfect play for the losing side would be to force a 3-fold repetition?
Answers.UserDisplayName: Wins94
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-14T23:59:41.557Z
Answers.Text: @Wins94 yes, but depth 50 is a *very* high depth to search. If you gave the same position to Lichess but increased the half-move counter (i.e. if you increase the second-last number in the FEN) then you should see the eval reach 0.00 eventually. Try setting that number at 40, for example.
Answers.UserDisplayName: Allure
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-16T05:26:49.147Z
Answers.Text: You're right! It evaluated it to 0.00 once I edited the half-move counter. Genius!
Answers.UserDisplayName: Wins94
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-13T21:24:39.807Z
Answers.LastActivityDate: 2020-09-13T21:24:39.807Z
Answers.UserDisplayName: Allure
Body: <p>Why is it that Lichess, and other engines for that matter, give a non-zero evaluation score on an endgame position that should be either a draw or a win for one of the sides (given perfect play)? For example, the position below returns an evaluation score of -0.5 when there doesn't seem to be enough material for black to achieve a victory.</p>
  <pre><code>[FEN &quot;6r1/8/8/8/3k1K2/R2b4/8/8 w - - 0 1&quot;]
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-13T21:21:38.210Z
Comments.Text: I could be wrong, -.5 is nearly equal, with only a slight advantage to black (certainly not an entire bishop’s worth). That said, it’s possible to mate with a rook and king, so if black can exchange the rook for the bishop...
Comments.UserDisplayName: D. Ben Knoble
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-27T20:41:18.713Z
Comments.Text: [Tablebase link](https://syzygy-tables.info/?fen=6r1/8/8/8/3k1K2/R2b4/8/8_w_-_-_0_1) for this position for future visitors.
Comments.UserDisplayName: SecretAgentMan
Tags: <engines><draw><evaluation><lichess>
Title: Lichess endgame evaluation
ThreadText: # Lichess endgame evaluation
  
  (Asked by: username_0 on 2020-09-13)
  
  Why is it that Lichess, and other engines for that matter, give a non-zero evaluation score on an endgame position that should be either a draw or a win for one of the sides (given perfect play)? For example, the position below returns an evaluation score of -0.5 when there doesn't seem to be enough material for black to achieve a victory.
  [FEN "6r1/8/8/8/3k1K2/R2b4/8/8 w - - 0 1"]
  
  **Tags:** engines, draw, evaluation, lichess
  
  > **Comments:**
  > **username_1**: I could be wrong, -.5 is nearly equal, with only a slight advantage to black (certainly not an entire bishop’s worth). That said, it’s possible to mate with a rook and king, so if black can exchange the rook for the bishop...  
  > **username_2**: [Tablebase link](https://syzygy-tables.info/?fen=6r1/8/8/8/3k1K2/R2b4/8/8_w_-_-_0_1) for this position for future visitors.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_4 on 2020-09-13. Score: 10 | Accepted answer
  
  Unless you explicitly hard-code these endgames, or provide the computer with endgame tablebases, they will apply what they've always done throughout the game: search lines and return the static eval (which is basically the evaluation function of the engine, evaluated on the final position). The static eval isn't smart enough to realize that this game is a draw - keep in mind the static eval is supposed to work for all positions, so it's not surprising that it doesn't return a completely accurate score for this one. Accordingly the computer flatlines at -0.50, until the 50-move rule helps it prune to a draw.
  
  > **Comments:**
  > **username_0**: But isn't the 50 move rule reflected in the evaluation? I've seen Lichess evaluations giving a 0 score for positions that lead to a three-fold repetition for the losing side. And if it doesn't account for the 50 move rule, wouldn't the engine find that perfect play for the losing side would be to force a 3-fold repetition?  
  > **username_4**: @username_0 yes, but depth 50 is a *very* high depth to search. If you gave the same position to Lichess but increased the half-move counter (i.e. if you increase the second-last number in the FEN) then you should see the eval reach 0.00 eventually. Try setting that number at 40, for example.  
  > **username_0**: You're right! It evaluated it to 0.00 once I edited the half-move counter. Genius!  
  
  ---
  
  ### Answer by username_3 on 2020-09-14. Score: 6
  
  In Lichess, you have 2 separate features: computer analysis and endgame tablebases. Scores are always shown using the computer analysis feature, but at the endgame you can also see the tablebases features, available for 6-men endings I think. If you open this component, you will see each winning/drawing/losing move together with their DTZ (distance to zeroing the 50-moves rule) and DTM (distance to mate).
  
  
  ---
  
  