Answers.Body: <p>The problem with an engine playing a drawn position with tablebases is that it has no concept of making life difficult for the opponent. All their moves are perfect in the sense that they don't turn a drawing position into a losing one -- not losing is guaranteed. But it has no concept of trying to win, and no way to decide between several moves that all lead to yet another drawn position, because in theory there <em>is</em> no difference.</p>
  
  <p>If you turn off the tablebases, you get the normal engine play. It won't be <em>perfect</em>, but still usually much better than humans, and it uses an evaluation function that rewards material advantage, passed pawns, active pieces, and so on. That's probably what you want.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-25T13:25:30.377Z
Answers.Text: But even without tablebase, the engine does not have the notion of "problem creation for the opponent" (in drawn positions), which is what OP is asking.
Answers.UserDisplayName: user1583209
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-25T13:28:13.807Z
Answers.Text: In practice that's the effect of the evaluation function though.
Answers.UserDisplayName: RemcoGerlich
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-25T13:38:46.173Z
Answers.Text: Are you saying the evaluation function includes a factor that describes how difficult the position is for a human player?
Answers.UserDisplayName: user1583209
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-25T13:47:16.907Z
Answers.Text: Yes, for instance it rewards material advantage and active pieces. It's harder for the opponent to play a pawn down than a pawn up, even though both may be a theoretical draw. It's the whole idea of an evaluation function -- we've found out that selecting moves this way leads to wins against humans often, so apparently it induces mistakes.
Answers.UserDisplayName: RemcoGerlich
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-25T14:49:47.230Z
Answers.Text: Yes sure, material advantage and piece activity etc are all objective factors which are taken into account in the evaluation function. But I (and perhaps OP as well) was wondering about something else. If the evaluation function gives equal score for various positions there could still be a difference between these positions for a not-perfect human player (e.g. because it is very tactical vs. obvious draw or because he would have to play very accurately vs. basically any move draws).
Answers.UserDisplayName: user1583209
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-25T14:55:59.930Z
Answers.Text: There is no specific part only to look for things that are hard for humans, or where accurate play is needed. Basically the evaluation function can only look at the specific position, not at further moves, it must use only things that can be quantified, and it has to be really really fast to calculate.
Answers.UserDisplayName: RemcoGerlich
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-26T07:57:11.993Z
Answers.Text: Yes this could help but I will have to measure pros and cons of this approach. It eliminates perfection while it doesn't guarantee engine will not find all those 0.00 far away repetitions. Harder workaround would be running multiPV with tablebases, use moves with same evaluation as filter and running some very stupid engine to pick the move.
Answers.UserDisplayName: hoacin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-25T12:54:59.660Z
Answers.LastActivityDate: 2017-01-25T12:54:59.660Z
Answers.UserDisplayName: RemcoGerlich
Answers.Body: <p>I think @RemocoGerlich is correct, and I'm here to add a real-life example. The point is that a chess engine would like to transpose a position into a known endgame.</p>
  
  <p>There is also a technical explanation from Syzygy's author in the reference (nobody understands tablebase better than him!).</p>
  
  <blockquote>
    <p>Reference: <a href="http://talkchess.com/forum/viewtopic.php?t=62837">http://talkchess.com/forum/viewtopic.php?t=62837</a></p>
  </blockquote>
  
  <p>Although black easily wins in the following position, Stockfish with 6-piece Syzygy would give the move:</p>
  
  <blockquote>
    <p>1...Qe3+ 2.Kd5 Qxd3+</p>
  </blockquote>
  
  <p><a href="https://i.sstatic.net/ii1Oc.png"><img src="https://i.sstatic.net/ii1Oc.png" alt="enter image description here"></a></p>
  
  <ul>
  <li>The reported moves appear to be random and absurd, but they're correct</li>
  <li>Stockfish would try to transpose to a known tablebase endgame as quickly as possible. While it does that, it'd play non-human moves</li>
  <li>If you turn tablebase off, Stockfish would do something else such as trying to checkmate the White king with the queen. Stockfish would play 1...Qc5 without tablebase, and that's also how a human would do.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-26T08:05:31.887Z
Answers.Text: This Qe3+ is weird for human but it is something I accepted within my work, engine gets maximum points possible from the game and he can show us winning process in less obvious endgames like building a bridge and later probably Q vs R endgame as it will like to throw away rook at some point :) The real problem is Kd5 response. I like (don't mind) the part where engine knows he will play perfectly but dislike the one where he thinks the same about his opponent. The first creates a little alien games but the second makes them garbage.
Answers.UserDisplayName: hoacin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-26T08:08:07.573Z
Answers.Text: @hoacin I understand your point, but the whole point of an engine is to assume perfect opponent. That's how they are so strong! That's how alpha-beta work.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-27T00:38:31.953Z
Answers.Text: @StudentT That's not quite true (or at least that's not how I'd phrase it). The point of alpha-beta is that it optimizes the _worst-case result_; an opponent who plays at worse than perfect won't perform 'better' against such an engine, they'll produce a result worse than they would have if they were playing perfectly.
Answers.UserDisplayName: Steven Stadnicki
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-26T06:16:17.230Z
Answers.LastActivityDate: 2017-01-26T08:09:25.087Z
Answers.LastEditDate: 2017-01-26T08:09:25.087Z
Answers.UserDisplayName: SmallChess
Body: <p>I watched some Komodo endgame play and what he is capable of is just horrible. From nice advantage with pawn up and activity he gives up two pawns ending in some miracle fortress position. Who can blame him when he knows everything about the endgame (7 man position for example using 6man tablebase) in a few seconds, knowing it is 0.00 everywhere, but still, is this the best chess engines can do with technical endgames? I see no imagination in his endgame play, no problem creation for oponent, just random moves not making his position worse in theoretic terms. Clearly he would lose many points playing this way with any human being incapable of precise play. Playing another perfect oposition they don't lose anything but still not sure I like such a design.</p>
  
  <p>As far as I understnad engines, contempt has nothing to do with this problem, is there another setting that can help here?</p>
  
  <p>Edit: example position</p>
  
  <pre><code>2k5/7R/r5p1/3K4/3P4/7P/8/8 b - - 0 1
  
  1...g5 2.Ke4 Kd8 3.Ke5 Ra3 4.Rh6 Ke7 5.Rh8 Re3+ 6.Kd5 Kf6 7.Kc5 Kg7 8.Rh5 Kg6 9.Rh8 Kg7 10.Rb8 Rxh3 11.Rb2 g4 12.Rg2 g3 13.d5 Kf6 14.d6 Ke6 15.d7 *
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-25T11:28:54.420Z
Comments.Text: As far as I know, engines are (currently) optimized for best play and not to play for opponent blunders. What you ask, could be implemented by playing lines where the opponent has to make "only moves", but since few people enjoy playing against computers I guess there is not much of a market for it.
Comments.UserDisplayName: user1583209
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-25T11:49:06.333Z
Comments.Text: Please give us the game and then we talk. We need to make sure it's not you who is misjudging the position.
Comments.UserDisplayName: SmallChess
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-25T12:26:20.793Z
Comments.Text: Unfortunately I'm two days out without computer so I can't format game better, but posted some example game. Have a lot of such examples where I really don't like the engine play, quite serious percentage. Time control 2min+2sec using syzygy 6man.
Comments.UserDisplayName: hoacin
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-25T13:44:00.080Z
Comments.Text: Indeed a bit strange play, particularly letting out the king with 4. Rh6. Are your other examples also with 7 pieces? Perhaps if the engine cannot see a win it is happy to change to a 6man endgame where it can play perfectly? On the other hand it avoided a draw by 3-fold repetition....
Comments.UserDisplayName: user1583209
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-25T17:53:21.597Z
Comments.Text: You see the same phenomenon just in general play.  I get so frustrated when I have a good attack going and the computer starts playing randomly because it sees a mate-in-several.  It doesn't see any difference between losing on the next move or seven moves later - but I don't usually see the mate.
Comments.UserDisplayName: pokep
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-25T23:47:12.303Z
Comments.Text: Yeah all the problems are in 6-7 man positions. I think in 9+ pieces the play will be super again.
Comments.UserDisplayName: hoacin
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-26T06:17:22.463Z
Comments.Text: @hoacin Please look at my answer for 6-7 explanation.
Comments.UserDisplayName: SmallChess
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-27T00:40:58.843Z
Comments.Text: I'm downvoting this question, BTW, because I think there's a fairly interesting question here ('why do engines optimize for perfect play rather than for a 'normal' opponent?') but the current phrasing of it is just too opinionated.
Comments.UserDisplayName: Steven Stadnicki
Tags: <engines><endgame>
Title: Are chess engines too briliant to play good endgame?
ThreadText: # Are chess engines too briliant to play good endgame?
  
  (Asked by: username_0 on 2017-01-25)
  
  I watched some Komodo endgame play and what he is capable of is just horrible. From nice advantage with pawn up and activity he gives up two pawns ending in some miracle fortress position. Who can blame him when he knows everything about the endgame (7 man position for example using 6man tablebase) in a few seconds, knowing it is 0.00 everywhere, but still, is this the best chess engines can do with technical endgames? I see no imagination in his endgame play, no problem creation for oponent, just random moves not making his position worse in theoretic terms. Clearly he would lose many points playing this way with any human being incapable of precise play. Playing another perfect oposition they don't lose anything but still not sure I like such a design.
  
  As far as I understnad engines, contempt has nothing to do with this problem, is there another setting that can help here?
  
  Edit: example position
  
  ```
  2k5/7R/r5p1/3K4/3P4/7P/8/8 b - - 0 1
  
  1...g5 2.Ke4 Kd8 3.Ke5 Ra3 4.Rh6 Ke7 5.Rh8 Re3+ 6.Kd5 Kf6 7.Kc5 Kg7 8.Rh5 Kg6 9.Rh8 Kg7 10.Rb8 Rxh3 11.Rb2 g4 12.Rg2 g3 13.d5 Kf6 14.d6 Ke6 15.d7 *
  
  ```
  
  **Tags:** engines, endgame
  
  > **Comments:**
  > **username_1**: As far as I know, engines are (currently) optimized for best play and not to play for opponent blunders. What you ask, could be implemented by playing lines where the opponent has to make "only moves", but since few people enjoy playing against computers I guess there is not much of a market for it.  
  > **username_2**: Please give us the game and then we talk. We need to make sure it's not you who is misjudging the position.  
  > **username_0**: Unfortunately I'm two days out without computer so I can't format game better, but posted some example game. Have a lot of such examples where I really don't like the engine play, quite serious percentage. Time control 2min+2sec using syzygy 6man.  
  > **username_1**: Indeed a bit strange play, particularly letting out the king with 4. Rh6. Are your other examples also with 7 pieces? Perhaps if the engine cannot see a win it is happy to change to a 6man endgame where it can play perfectly? On the other hand it avoided a draw by 3-fold repetition....  
  > **username_3**: You see the same phenomenon just in general play.  I get so frustrated when I have a good attack going and the computer starts playing randomly because it sees a mate-in-several.  It doesn't see any difference between losing on the next move or seven moves later - but I don't usually see the mate.  
  > **username_0**: Yeah all the problems are in 6-7 man positions. I think in 9+ pieces the play will be super again.  
  > **username_2**: @username_0 Please look at my answer for 6-7 explanation.  
  > **username_4**: I'm downvoting this question, BTW, because I think there's a fairly interesting question here ('why do engines optimize for perfect play rather than for a 'normal' opponent?') but the current phrasing of it is just too opinionated.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_5 on 2017-01-25. Score: 6
  
  The problem with an engine playing a drawn position with tablebases is that it has no concept of making life difficult for the opponent. All their moves are perfect in the sense that they don't turn a drawing position into a losing one -- not losing is guaranteed. But it has no concept of trying to win, and no way to decide between several moves that all lead to yet another drawn position, because in theory there *is* no difference.
  
  If you turn off the tablebases, you get the normal engine play. It won't be *perfect*, but still usually much better than humans, and it uses an evaluation function that rewards material advantage, passed pawns, active pieces, and so on. That's probably what you want.
  
  > **Comments:**
  > **username_1**: But even without tablebase, the engine does not have the notion of "problem creation for the opponent" (in drawn positions), which is what OP is asking.  
  > **username_5**: In practice that's the effect of the evaluation function though.  
  > **username_1**: Are you saying the evaluation function includes a factor that describes how difficult the position is for a human player?  
  > **username_5**: Yes, for instance it rewards material advantage and active pieces. It's harder for the opponent to play a pawn down than a pawn up, even though both may be a theoretical draw. It's the whole idea of an evaluation function -- we've found out that selecting moves this way leads to wins against humans often, so apparently it induces mistakes.  
  > **username_1**: Yes sure, material advantage and piece activity etc are all objective factors which are taken into account in the evaluation function. But I (and perhaps OP as well) was wondering about something else. If the evaluation function gives equal score for various positions there could still be a difference between these positions for a not-perfect human player (e.g. because it is very tactical vs. obvious draw or because he would have to play very accurately vs. basically any move draws).  
  > **username_5**: There is no specific part only to look for things that are hard for humans, or where accurate play is needed. Basically the evaluation function can only look at the specific position, not at further moves, it must use only things that can be quantified, and it has to be really really fast to calculate.  
  > **username_0**: Yes this could help but I will have to measure pros and cons of this approach. It eliminates perfection while it doesn't guarantee engine will not find all those 0.00 far away repetitions. Harder workaround would be running multiPV with tablebases, use moves with same evaluation as filter and running some very stupid engine to pick the move.  
  
  ---
  
  ### Answer by username_2 on 2017-01-26. Score: 6
  
  I think @RemocoGerlich is correct, and I'm here to add a real-life example. The point is that a chess engine would like to transpose a position into a known endgame.
  
  There is also a technical explanation from Syzygy's author in the reference (nobody understands tablebase better than him!).
  
  > Reference: <http://talkchess.com/forum/viewtopic.php?t=62837>
  
  Although black easily wins in the following position, Stockfish with 6-piece Syzygy would give the move:
  
  > 1...Qe3+ 2.Kd5 Qxd3+
  
  [![enter image description here](https://i.sstatic.net/ii1Oc.png)](https://i.sstatic.net/ii1Oc.png)
  
  * The reported moves appear to be random and absurd, but they're correct
  * Stockfish would try to transpose to a known tablebase endgame as quickly as possible. While it does that, it'd play non-human moves
  * If you turn tablebase off, Stockfish would do something else such as trying to checkmate the White king with the queen. Stockfish would play 1...Qc5 without tablebase, and that's also how a human would do.
  
  > **Comments:**
  > **username_0**: This Qe3+ is weird for human but it is something I accepted within my work, engine gets maximum points possible from the game and he can show us winning process in less obvious endgames like building a bridge and later probably Q vs R endgame as it will like to throw away rook at some point :) The real problem is Kd5 response. I like (don't mind) the part where engine knows he will play perfectly but dislike the one where he thinks the same about his opponent. The first creates a little alien games but the second makes them garbage.  
  > **username_2**: @username_0 I understand your point, but the whole point of an engine is to assume perfect opponent. That's how they are so strong! That's how alpha-beta work.  
  > **username_4**: @StudentT That's not quite true (or at least that's not how I'd phrase it). The point of alpha-beta is that it optimizes the _worst-case result_; an opponent who plays at worse than perfect won't perform 'better' against such an engine, they'll produce a result worse than they would have if they were playing perfectly.  
  
  ---
  
  