Answers.Body: <p>Ok, so say the engine plays a move with white and values the position as +0.50 (slightly better for white). So now the human plays as black, and blunders a bishop. The engine now values the position as +3.50, but you want to play a move as close as possible to +0.50, v. g. +0.60. Is it what you're looking for?</p>
  
  <p>In that case it seems the way to go is (from the POV of the engine); "the position after my last move was +0.50, so in the current position, if a move that improves that eval exists, I must play the one closest to +0.50. Otherwise (there isn't a move that improves my eval after my last move), play the best move available."
  If this is your idea, I guess this is doable, and for someone who develops their own chess engine probably shouldn't be hard to code.</p>
  
  <p>Maybe the idea can be improved. For example, if you blunder a bishop, probably it's a good idea the engine to grab the bishop than to play something really stupid.</p>
  
  <p>In any case, I think it's definitely doable, probably with some refinement. (For example, it's not the same blundering a bishop in one than losing a bishop after a 10 moves combination; in the first case, IMO, the engine should take the bishop, but in the second one it should chose a sub-optimal move).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-02T19:13:06.883Z
Answers.Text: This highlights the flaw in the proposal from OP - playing against such a computer, you could ram your queen into the pawn on A2, and the rook couldn't capture back, since +8 [winning the queen for a pawn] is further away from +0.5 than -6 [losing the rook and pawn for no compensation].
Answers.UserDisplayName: Grade 'Eh' Bacon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-02T23:22:13.610Z
Answers.Text: Thanks for the valid points and for improving the idea
Answers.UserDisplayName: Amir 
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-02T13:26:47.930Z
Answers.LastActivityDate: 2019-10-02T13:26:47.930Z
Answers.UserDisplayName: emdio
Body: <p>By default, engines return the strongest variation(s) they calculate. I was wondering if there is a way to tweak an open source chess engine to show a move from their MultiPV which is slightly better than or equal to your moves. Let's say the evaluation stays only +2 consistently through the game. Instead of the strongest move in a position, the engine is retuning back the move with +2. Is there a way to do this?</p>
  
  <p>[edit 3.10.2019] in case of a blunder (e.g. +3 jump in the engine evaluation, the engine can keep the difference and continue the game with +5 instead of +2). </p>
  
  <p>[edit 4.10.2019] I found that on <a href="https://lichess.org" rel="nofollow noreferrer">https://lichess.org</a> there are levels for SF. Right now,  level 5 corresponds to ca. 1700 elo, level 6 is 1900, level 7 is 2200. This satisfies my needs and closes my question. Thank you</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-01T19:43:30.407Z
Comments.Text: May I ask what the purpose of this is? Do not get me wrong but this sounds a bit like cheating advice as I currently do not see any other use case.
Comments.UserDisplayName: Fabian Fichter
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-01T21:47:12.130Z
Comments.Text: @FabianFichter The obvious use case is to tune the engine to be slightly better than the player so that he always gets a challenging game but one where he still has a chance and doesn't just get crushed.
Comments.UserDisplayName: Brian Towers
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-02T07:09:24.987Z
Comments.Text: @BrianTowers As it is described above, it however maintains the same advantage no matter the playing strength of the opponent (if I understand correctly), so playing well or not does not have impact on the result, which does not sound like a suitable opponent for training. Would be good to get a clarification from Amir.
Comments.UserDisplayName: Fabian Fichter
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-02T15:55:09.607Z
Comments.Text: If you'd like to tweak the SF just to play against it than I would highly reccomend
  the good old Chessmaster 9000 - a desktop chess software that has about 100 human-like levels. That way you can play against a certain opponent until you can beat him easily and then move on to the next one. Works great even on Windows 10.
Comments.UserDisplayName: ThinkTank
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-02T19:13:50.920Z
Comments.Text: I don't think this would work as you're intending; see the answer below and my comment.
Comments.UserDisplayName: Grade 'Eh' Bacon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-02T23:27:37.753Z
Comments.Text: Thank you Fabian and Brian for the comments. Brian described my intention/use case very well but I agree with you Fabian that such thing could be used to cheat too which is stupid use of time. The problem is chess engines are insanely good and the gap between their moves and lets say mine is extremely high. How can we minimize this gap (next to improving my chess knowledge naturally)? How can we use engines to help us, tailored to our level? The idea is improved in the first reply below. Please check it out. I will try the chessmaster ThinkTank. Thanks
Comments.UserDisplayName: Amir 
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-04T19:50:46.913Z
Comments.Text: @FabianFichter Thank you
Comments.UserDisplayName: Amir 
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-04T19:51:05.463Z
Comments.Text: @BrianTowers Thank you
Comments.UserDisplayName: Amir 
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-04T19:52:08.643Z
Comments.Text: @ThinkTank SF on lichess (web and app) has different levels which does the job
Comments.UserDisplayName: Amir 
Tags: <engines><learning><software><stockfish><open-source>
Title: How to tweak a chess engine like SF to return a variation which is only slightly better than your moves?
ThreadText: # How to tweak a chess engine like SF to return a variation which is only slightly better than your moves?
  
  (Asked by: username_0 on 2019-10-01)
  
  By default, engines return the strongest variation(s) they calculate. I was wondering if there is a way to tweak an open source chess engine to show a move from their MultiPV which is slightly better than or equal to your moves. Let's say the evaluation stays only +2 consistently through the game. Instead of the strongest move in a position, the engine is retuning back the move with +2. Is there a way to do this?
  
  [edit 3.10.2019] in case of a blunder (e.g. +3 jump in the engine evaluation, the engine can keep the difference and continue the game with +5 instead of +2).
  
  [edit 4.10.2019] I found that on <https://lichess.org> there are levels for SF. Right now, level 5 corresponds to ca. 1700 elo, level 6 is 1900, level 7 is 2200. This satisfies my needs and closes my question. Thank you
  
  **Tags:** engines, learning, software, stockfish, open-source
  
  > **Comments:**
  > **username_1**: May I ask what the purpose of this is? Do not get me wrong but this sounds a bit like cheating advice as I currently do not see any other use case.  
  > **username_2**: @username_1 The obvious use case is to tune the engine to be slightly better than the player so that he always gets a challenging game but one where he still has a chance and doesn't just get crushed.  
  > **username_1**: @username_2 As it is described above, it however maintains the same advantage no matter the playing strength of the opponent (if I understand correctly), so playing well or not does not have impact on the result, which does not sound like a suitable opponent for training. Would be good to get a clarification from username_0.  
  > **username_3**: If you'd like to tweak the SF just to play against it than I would highly reccomend the good old Chessmaster 9000 - a desktop chess software that has about 100 human-like levels. That way you can play against a certain opponent until you can beat him easily and then move on to the next one. Works great even on Windows 10.  
  > **username_4**: I don't think this would work as you're intending; see the answer below and my comment.  
  > **username_0**: Thank you username_1 and username_2 for the comments. username_2 described my intention/use case very well but I agree with you username_1 that such thing could be used to cheat too which is stupid use of time. The problem is chess engines are insanely good and the gap between their moves and lets say mine is extremely high. How can we minimize this gap (next to improving my chess knowledge naturally)? How can we use engines to help us, tailored to our level? The idea is improved in the first reply below. Please check it out. I will try the chessmaster username_3. Thanks  
  > **username_0**: @username_1 Thank you  
  > **username_0**: @username_2 Thank you  
  > **username_0**: @username_3 SF on lichess (web and app) has different levels which does the job  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_5 on 2019-10-02. Score: 2
  
  Ok, so say the engine plays a move with white and values the position as +0.50 (slightly better for white). So now the human plays as black, and blunders a bishop. The engine now values the position as +3.50, but you want to play a move as close as possible to +0.50, v. g. +0.60. Is it what you're looking for?
  
  In that case it seems the way to go is (from the POV of the engine); "the position after my last move was +0.50, so in the current position, if a move that improves that eval exists, I must play the one closest to +0.50. Otherwise (there isn't a move that improves my eval after my last move), play the best move available."
  If this is your idea, I guess this is doable, and for someone who develops their own chess engine probably shouldn't be hard to code.
  
  Maybe the idea can be improved. For example, if you blunder a bishop, probably it's a good idea the engine to grab the bishop than to play something really stupid.
  
  In any case, I think it's definitely doable, probably with some refinement. (For example, it's not the same blundering a bishop in one than losing a bishop after a 10 moves combination; in the first case, IMO, the engine should take the bishop, but in the second one it should chose a sub-optimal move).
  
  > **Comments:**
  > **username_4**: This highlights the flaw in the proposal from OP - playing against such a computer, you could ram your queen into the pawn on A2, and the rook couldn't capture back, since +8 [winning the queen for a pawn] is further away from +0.5 than -6 [losing the rook and pawn for no compensation].  
  > **username_0**: Thanks for the valid points and for improving the idea  
  
  ---
  
  