Answers.Body: <p>Alpha-beta engines, in many endgame positions, will quickly find a mate and therefore will pick the move which prolongs the mate for the longest.</p>
  
  <p>Engines which use Monte Carlo Tree Search, however, pick the line with the greatest winning/drawing chances. For example, <a href="https://github.com/LeelaChessZero/lc0" rel="noreferrer">Lc0</a>, a neural network engine which uses MCTS, suggests Kg8 as you wanted in your position:</p>
  
  <pre><code>8/6k1/6P1/7K/6P1/8/8/8 b - - 0 1
  
  1...Kg8 2.Kh6 Kh8 3.Kg5 Kg7 4.Kf5 Kg8 5.Kf6 Kf8
  </code></pre>
  
  <p>Lc0 does not play endgames as well as alpha-beta engines, but it tends to play them in a much more human manner.</p>
  
  <p>I would also suggest taking a look at Komodo 12 MCTS, which may also exhibit this type of behaviour.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-09T20:00:38.253Z
Answers.Text: Indeed, I've treid Lc0 with weights 36089 and it plays those endgames much better than any other engine I've tried (and I've tried dozens more in between).
  On the other hand, it does not know how to mate with KQ-Q. So it might not be the best engine for endgame training. 
  Nevertheless, my original question has been answered.
Answers.UserDisplayName: Wickie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-10T01:40:00.863Z
Answers.Text: @Wickie what is KQ-Q?
Answers.UserDisplayName: Pedro A
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-10T20:36:28.583Z
Answers.Text: @Pedro  KQ-Q is a mistake by my side. I meant KQ-K. King and Queen against King.
Answers.UserDisplayName: Wickie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-10T21:52:46.717Z
Answers.Text: @Wickie Oh, I see. But not knowing how to mate KQ-K is a serious problem, no? Is it safe to practice anything against such an engine?
Answers.UserDisplayName: Pedro A
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-14T16:22:54.740Z
Answers.Text: @Pedro you are right. And Lc0 does have a lot more deficiencies in endgame play. It is not suitable. I have reopened the question.
Answers.UserDisplayName: Wickie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-14T21:50:20.200Z
Answers.Text: What are you even talking about? Leela can mate 100% of the time with a KQ vs K. It's been able to do this for over a year: https://docs.google.com/spreadsheets/d/1uY7fplZzeXi8H52LK0L6Do2oYgF1v5VW3K_AjNS8l0M/edit#gid=417465572
Answers.UserDisplayName: NoseKnowsAll
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-16T13:23:55.370Z
Answers.Text: @NoseKnowsAll  Yeah, it evetually can mate with KQ-K, if you have the nerves to wait for 30 moves or longer.        At least with my configuration (no graphics card, 1 sec movetime, core duo cpu 2.4 GHz), all the nets I have tried play horribly in the endgame. I'm getting stomach cramps by looking at them.        I have tried 36089 and dkappes distilled networks 11258-48x5, 11258-64x6 and 11258-80x7.
Answers.UserDisplayName: Wickie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-09T10:33:14.420Z
Answers.LastActivityDate: 2019-03-09T10:33:14.420Z
Answers.UserDisplayName: konsolas
Answers.Body: <p>Freechess.org has a bot called endgamebot you can play against.</p>
  
  <p>It knows up to 6-man endgames.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-15T17:39:20.747Z
Answers.Text: But does it play human-like, which is the OP's question?
Answers.UserDisplayName: Glorfindel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-16T00:05:03.920Z
Answers.Text: @Glorfindel: Yes.
Answers.UserDisplayName: Jossie Calderon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-16T13:28:33.630Z
Answers.Text: @ Jossie Calderon: I would like to try that out. I have got a fics account and BabasChess. How can I train a certain position with this bot? (_help bot_   or   _help endgamebot_ has no results.)
Answers.UserDisplayName: Wickie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-16T13:53:19.753Z
Answers.Text: @ Jossie Calderon:  I have found it myself: _tell endgamebot help_
Answers.UserDisplayName: Wickie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-17T12:29:34.477Z
Answers.Text: @Wickie did this answer your question?
Answers.UserDisplayName: Jossie Calderon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-18T14:57:58.520Z
Answers.Text: @ Jossie Calderon: It does not :-( After 1. Kh6, Kg8 opens the possibility for white's mistake g5 with draw. The endgamebot does play Ke7 there, the typical fleeing to the center.
Answers.UserDisplayName: Wickie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-21T14:51:55.950Z
Answers.Text: @Wickie: 1.Kh6 Kg8 2.g7 is not hard to find. It will eventually go 2...Kf7 3.Kg7 Ke7 anyway. So you are looking for an engine that plays worse.
Answers.UserDisplayName: Jossie Calderon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-03T13:19:52.107Z
Answers.Text: anything to add here? https://chess.stackexchange.com/questions/35641/practical-endgame-resources-whats-next-after-josh-waitzkins-series-in-chess
Answers.UserDisplayName: BCLC
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-15T17:06:05.070Z
Answers.LastActivityDate: 2019-03-15T17:06:05.070Z
Answers.UserDisplayName: Jossie Calderon
Answers.Body: <p>It depend which chess engine LC is using, nowadays engines play very similarly to human type moves, download stockfish 9 and attach it LC you will what he is playing. 
  There is also one important point, sometimes training app uses built in moves to play with, so make sure engine is playing and not just replying moves from notation</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-18T14:34:37.590Z
Answers.Text: I've tried many engines in LC, all show the behaviour of the fleeing king. Aside of Leela or Lc0 which has other deficiencies.
Answers.UserDisplayName: Wickie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-16T14:49:09.637Z
Answers.LastActivityDate: 2019-03-16T14:49:09.637Z
Answers.UserDisplayName: Jackal
Body: <p>I am doing endgame training with LucasChess (LC), but the problem is not really related to LC, but to chess engines in general. </p>
  
  <p>I have this problem: See picture. When I move  Kh6 in this position, the engine in LC moves Ke8. Probably this is the move with which white needs the most moves until mate.<a href="https://i.sstatic.net/YilI8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/YilI8.png" alt="position: w:Kh5, Pg6, Pg4, b:Kf8, white to move"></a></p>
  
  <p>But it is also the move which makes things easy for white.  It would be harder for white if black would move Kg8, trying to block the pawn until it is no longer possible and maybe provoking a stalemate.
  Instead of blocking, black flees in direction  to the center.</p>
  
  <p>I assume the engine sees that with fleeing to the center it is maybe a mate in 20 and without fleeing and trying to block it is maybe a mate in 16. So it makes the "optimal" move with which the distance to mate is the longest.</p>
  
  <p>But this is not the best human like move.  Because it makes it easier for white to queen its pawn. It clears all possibilities for white to make mistakes and in this way it takes away an important part of the training effect.</p>
  
  <p>I have seen this behaviour in nearly all pawn endings, not only this one; and also in other endings.  </p>
  
  <p>All engines I've tried show this behaviour.  (Komodo, Stockfish, Gull, Gaviota, Fruit)</p>
  
  <p>So my question is: Do you know a free engine or some settings for an engine which plays endgames human-like, trying to block pawns as long as possible instead of fleeing with the king to the center?</p>
  
  <p><strong>Update:</strong> konsolas found an engine (Leela or Lc0) which treats the given position well and so at first I accepted his answer as <em>the</em> answer. 
  In between I've tested Lc0 more and came to the conclusion that it is absolutely not usable for endgame training, because it plays most endings catastrophically. When accepting the answer, I couldn't even imagine any engine playing endgames so bad. </p>
  
  <p>So I want to clarify my question: Do you know a free engine or some settings for an engine which, with movetime 1s or below, without needing a graphics card, plays endgames human-like, trying to block pawns as long as possible instead of fleeing with the king to the center? </p>
  
  <p>Lc0  with current nets or dkappe's distilled nets do not qualify, because these play most endgames horribly and absolutely non-human-like on a PC without graphics card. And from all what I've read a graphics card even won't help for its endgame play. </p>
  
  <p><strong>Update 2:</strong>
  I'd like to clarify that it is not only the position above, but a lot of others, too. Engines play the move which makes distance to mate biggest, assuming perfect play of the opponent.  Example 8/8/8/6K1/8/8/3Q2kp/8 b - - 4 9, see second picture. 
  Engines play  Kf3, which makes it very easy for W.    What B should play is Kg1, and now it's much harder for W to win. W then needs to know or find that he has to allow B to queen.<a href="https://i.sstatic.net/QPSdH.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/QPSdH.png" alt="8/8/8/6K1/8/8/3Q2kp/8 b - - 4 9"></a> </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-08T21:41:33.107Z
Comments.Text: The same problem occurs sometimes when practicing tactics on lichess.  Often, the engine will not play the most testing defence as with best play it is inferior to a defence that is easy to refute.
Comments.UserDisplayName: Qudit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-15T17:06:51.683Z
Comments.Text: No offense...But 1.Kh6 Kg8 2.g7 is pretty straightforward.
Comments.UserDisplayName: Jossie Calderon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-18T14:48:10.250Z
Comments.Text: @ Jossie C.: Yes, if you know the type of position, if you know a draw is lurking behind the corner.   But in the similar pos, (5k2/8/6P1/7K/6P1/8/8/8 w - - 2 2)  after 1.Kh6,  Kg8 opens the possibility for White to make the mistake g5? with draw.        If you know the position well, you won't make the mistake. ...But then you also don't need to train this type of postion.      But if you like to train this position and you won't ever run into this draw during training, you have not learned much.   Worse still. then you have learned that there is nothing to be aware about here.
Comments.UserDisplayName: Wickie
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-18T15:02:48.000Z
Comments.Text: Addendum: (5k2/8/6P1/7K/6P1/8/8/8 w - - 2 2) is not a similar pos, it is my original pos.
Comments.UserDisplayName: Wickie
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-26T10:15:13.850Z
Comments.Text: One way to 'solve' this problem is to force the computer to stop searching at a depth just slightly more than your own effective search depth. That way, it will be unlikely to miss something you can see, but will also not make a move for a reason only it can see.
Comments.UserDisplayName: user21820
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-26T10:30:35.380Z
Comments.Text: But your last example seems flawed. Kf3 is stupid, but if B plays Kg1, then W can mate in 4, so that's not a good move either. [Stockfish 10 plays Kg3](https://lichess.org/analysis/standard/8/8/8/6K1/8/8/3Q2kp/8_b_-_-_4_9), which seems best.
Comments.UserDisplayName: user21820
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-08T14:43:38.833Z
Comments.Text: ah so actually humans might be better better than computers in this regard? a computer might play something that needs more moves, regardless of how hard the moves are to think of, while a human will play something that may require less moves but is harder to think of, i.e. is objectively correct? it sounds like your question is like the humble or polite version of something arrogant or entitled like 'where can i find a damn good computer (in the sense of evaluating moves in qualitative difficulty, rather than quantitative difficulty, for opponent )?' ?
Comments.UserDisplayName: BCLC
Tags: <engines><endgame><training>
Title: Human-like engine for endgame training
ThreadText: # Human-like engine for endgame training
  
  (Asked by: username_0 on 2019-03-08)
  
  I am doing endgame training with LucasChess (LC), but the problem is not really related to LC, but to chess engines in general.
  
  I have this problem: See picture. When I move Kh6 in this position, the engine in LC moves Ke8. Probably this is the move with which white needs the most moves until mate.[![position: w:Kh5, Pg6, Pg4, b:Kf8, white to move](https://i.sstatic.net/YilI8.png)](https://i.sstatic.net/YilI8.png)
  
  But it is also the move which makes things easy for white. It would be harder for white if black would move Kg8, trying to block the pawn until it is no longer possible and maybe provoking a stalemate.
  Instead of blocking, black flees in direction to the center.
  
  I assume the engine sees that with fleeing to the center it is maybe a mate in 20 and without fleeing and trying to block it is maybe a mate in 16. So it makes the "optimal" move with which the distance to mate is the longest.
  
  But this is not the best human like move. Because it makes it easier for white to queen its pawn. It clears all possibilities for white to make mistakes and in this way it takes away an important part of the training effect.
  
  I have seen this behaviour in nearly all pawn endings, not only this one; and also in other endings.
  
  All engines I've tried show this behaviour. (Komodo, Stockfish, Gull, Gaviota, Fruit)
  
  So my question is: Do you know a free engine or some settings for an engine which plays endgames human-like, trying to block pawns as long as possible instead of fleeing with the king to the center?
  
  **Update:** username_5 found an engine (Leela or Lc0) which treats the given position well and so at first I accepted his answer as *the* answer.
  In between I've tested Lc0 more and came to the conclusion that it is absolutely not usable for endgame training, because it plays most endings catastrophically. When accepting the answer, I couldn't even imagine any engine playing endgames so bad.
  
  So I want to clarify my question: Do you know a free engine or some settings for an engine which, with movetime 1s or below, without needing a graphics card, plays endgames human-like, trying to block pawns as long as possible instead of fleeing with the king to the center?
  
  Lc0 with current nets or dkappe's distilled nets do not qualify, because these play most endgames horribly and absolutely non-human-like on a PC without graphics card. And from all what I've read a graphics card even won't help for its endgame play.
  
  **Update 2:**
  I'd like to clarify that it is not only the position above, but a lot of others, too. Engines play the move which makes distance to mate biggest, assuming perfect play of the opponent. Example 8/8/8/6K1/8/8/3Q2kp/8 b - - 4 9, see second picture.
  Engines play Kf3, which makes it very easy for W. What B should play is Kg1, and now it's much harder for W to win. W then needs to know or find that he has to allow B to queen.[![8/8/8/6K1/8/8/3Q2kp/8 b - - 4 9](https://i.sstatic.net/QPSdH.png)](https://i.sstatic.net/QPSdH.png)
  
  **Tags:** engines, endgame, training
  
  > **Comments:**
  > **username_1**: The same problem occurs sometimes when practicing tactics on lichess.  Often, the engine will not play the most testing defence as with best play it is inferior to a defence that is easy to refute.  
  > **username_2**: No offense...But 1.Kh6 Kg8 2.g7 is pretty straightforward.  
  > **username_0**: @ Jossie C.: Yes, if you know the type of position, if you know a draw is lurking behind the corner.   But in the similar pos, (5k2/8/6P1/7K/6P1/8/8/8 w - - 2 2)  after 1.Kh6,  Kg8 opens the possibility for White to make the mistake g5? with draw.        If you know the position well, you won't make the mistake. ...But then you also don't need to train this type of postion.      But if you like to train this position and you won't ever run into this draw during training, you have not learned much.   Worse still. then you have learned that there is nothing to be aware about here.  
  > **username_0**: Addendum: (5k2/8/6P1/7K/6P1/8/8/8 w - - 2 2) is not a similar pos, it is my original pos.  
  > **username_3**: One way to 'solve' this problem is to force the computer to stop searching at a depth just slightly more than your own effective search depth. That way, it will be unlikely to miss something you can see, but will also not make a move for a reason only it can see.  
  > **username_3**: But your last example seems flawed. Kf3 is stupid, but if B plays Kg1, then W can mate in 4, so that's not a good move either. [Stockfish 10 plays Kg3](https://lichess.org/analysis/standard/8/8/8/6K1/8/8/3Q2kp/8_b_-_-_4_9), which seems best.  
  > **username_4**: ah so actually humans might be better better than computers in this regard? a computer might play something that needs more moves, regardless of how hard the moves are to think of, while a human will play something that may require less moves but is harder to think of, i.e. is objectively correct? it sounds like your question is like the humble or polite version of something arrogant or entitled like 'where can i find a damn good computer (in the sense of evaluating moves in qualitative difficulty, rather than quantitative difficulty, for opponent )?' ?  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_5 on 2019-03-09. Score: 6
  
  Alpha-beta engines, in many endgame positions, will quickly find a mate and therefore will pick the move which prolongs the mate for the longest.
  Engines which use Monte Carlo Tree Search, however, pick the line with the greatest winning/drawing chances. For example, Lc0, a neural network engine which uses MCTS, suggests Kg8 as you wanted in your position:
  8/6k1/6P1/7K/6P1/8/8/8 b - - 0 1
  
  1...Kg8 2.Kh6 Kh8 3.Kg5 Kg7 4.Kf5 Kg8 5.Kf6 Kf8
  
  Lc0 does not play endgames as well as alpha-beta engines, but it tends to play them in a much more human manner.
  I would also suggest taking a look at Komodo 12 MCTS, which may also exhibit this type of behaviour.
  
  > **Comments:**
  > **username_0**: Indeed, I've treid Lc0 with weights 36089 and it plays those endgames much better than any other engine I've tried (and I've tried dozens more in between). On the other hand, it does not know how to mate with KQ-Q. So it might not be the best engine for endgame training.  Nevertheless, my original question has been answered.  
  > **username_6**: @username_0 what is KQ-Q?  
  > **username_0**: @Pedro  KQ-Q is a mistake by my side. I meant KQ-K. King and Queen against King.  
  > **username_6**: @username_0 Oh, I see. But not knowing how to mate KQ-K is a serious problem, no? Is it safe to practice anything against such an engine?  
  > **username_0**: @Pedro you are right. And Lc0 does have a lot more deficiencies in endgame play. It is not suitable. I have reopened the question.  
  > **username_7**: What are you even talking about? Leela can mate 100% of the time with a KQ vs K. It's been able to do this for over a year: https://docs.google.com/spreadsheets/d/1uY7fplZzeXi8H52LK0L6Do2oYgF1v5VW3K_AjNS8l0M/edit#gid=417465572  
  > **username_0**: @username_7  Yeah, it evetually can mate with KQ-K, if you have the nerves to wait for 30 moves or longer.        At least with my configuration (no graphics card, 1 sec movetime, core duo cpu 2.4 GHz), all the nets I have tried play horribly in the endgame. I'm getting stomach cramps by looking at them.        I have tried 36089 and dkappes distilled networks 11258-48x5, 11258-64x6 and 11258-80x7.  
  
  ---
  
  ### Answer by username_2 on 2019-03-15. Score: 1
  
  Freechess.org has a bot called endgamebot you can play against.
  
  It knows up to 6-man endgames.
  
  > **Comments:**
  > **username_8**: But does it play human-like, which is the OP's question?  
  > **username_2**: @username_8: Yes.  
  > **username_0**: @ username_2: I would like to try that out. I have got a fics account and BabasChess. How can I train a certain position with this bot? (_help bot_   or   _help endgamebot_ has no results.)  
  > **username_0**: @ username_2:  I have found it myself: _tell endgamebot help_  
  > **username_2**: @username_0 did this answer your question?  
  > **username_0**: @ username_2: It does not :-( After 1. Kh6, Kg8 opens the possibility for white's mistake g5 with draw. The endgamebot does play Ke7 there, the typical fleeing to the center.  
  > **username_2**: @username_0: 1.Kh6 Kg8 2.g7 is not hard to find. It will eventually go 2...Kf7 3.Kg7 Ke7 anyway. So you are looking for an engine that plays worse.  
  > **username_4**: anything to add here? https://chess.stackexchange.com/questions/35641/practical-endgame-resources-whats-next-after-josh-waitzkins-series-in-chess  
  
  ---
  
  ### Answer by username_9 on 2019-03-16. Score: 0
  
  It depend which chess engine LC is using, nowadays engines play very similarly to human type moves, download stockfish 9 and attach it LC you will what he is playing.
  There is also one important point, sometimes training app uses built in moves to play with, so make sure engine is playing and not just replying moves from notation
  
  > **Comments:**
  > **username_0**: I've tried many engines in LC, all show the behaviour of the fleeing king. Aside of Leela or Lc0 which has other deficiencies.  
  
  ---
  
  