Body: <p>When both players know the optimal move tree, the outcome is fixed if they play top moves. But in practical play, certain moves can still be more useful, based on psychological or <a href="https://en.m.wikipedia.org/wiki/Chess_tactic" rel="nofollow noreferrer">tactical reasons</a> rather than strict optimality.</p>
  <p><strong>The Question</strong>: <strong>In a losing position, what is the best practical defense ?</strong></p>
  <p>Most engines rank moves based on <a href="https://www.chessprogramming.org/Mate_Distance_Pruning" rel="nofollow noreferrer"><em>distance to mate</em> (DTM)</a>, assuming longer paths are better. But some long paths are easier for opponents to find, while shorter paths may actually be harder.</p>
  <hr />
  <h3>Contextual Factors in Move Selection</h3>
  <ol>
  <li><p><strong>Human Factors</strong>: Against a human, complex or ambiguous moves can increase the chance of opponent mistakes. Moves could be evaluated by both theoretical merit and likelihood of causing difficulty.</p>
  </li>
  <li><p><strong><a href="https://blog.gtowizard.com/exploitative-dynamics/" rel="nofollow noreferrer">Optimal and Exploitative Play</a> Combined</strong>: This approach balances the theoretically best defensive move (like DTM or <a href="https://www.chessprogramming.org/Centipawns" rel="nofollow noreferrer">centipawns</a>) with moves that make practical play harder for the opponent. These moves may not worsen the result but increase the chance for opponent errors, mixing optimality with exploitative strategy.</p>
  </li>
  </ol>
  <hr />
  <h3>Thoughts on a Mathematical Approach</h3>
  <h4>Some ideas to construct the evaluation function</h4>
  <ol>
  <li><p><strong>Blunder Probability</strong>: Rank each move by the estimated likelihood of opponent error, using data on human mistakes in complex positions.</p>
  </li>
  <li><p><strong>Entropy Metrics</strong>:</p>
  </li>
  </ol>
  <ul>
  <li><strong>Depth of Threat</strong>: Number of moves an opponent must calculate for a winning line.</li>
  <li><strong>Branching Factor</strong>: Moves with many legal responses could demand more thought.</li>
  <li><strong>Position Stability</strong>: Moves with large evaluation swings depending on the opponent’s response may add uncertainty.</li>
  </ul>
  <hr />
  <h3>Example from Carlsen-Nepomniachtchi, Game 6 (2021)</h3>
  <pre><code>[Title &quot;&quot;]
  [Fen &quot;4k3/8/8/4PR2/5P2/6N1/q5K1/8 w - - 1 130&quot;]
  </code></pre>
  <p>In this <a href="https://lichess.org/broadcast/world-chess-championship-2021/game-6/h7a3P5YF/6OeqL6Ge#258" rel="nofollow noreferrer">position</a>, White’s move Kh3 is theoretically drawn if Black replies with Qb1! But Black missed Qb1, and White was suddenly winning.
  Note that the computer top move is not the one played by Carlsen, as he was pushing for the win.</p>
  <hr />
  <p>Any insights or mathematical approaches to refining this evaluation would be highly appreciated!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-11-04T12:42:18.610Z
Comments.Text: In a real game (especially in a team match or the last round of a tournament) another consideration is what are you trying to get out of the game? Are you trying to "not lose", i.e. a draw is enough, or is it win or nothing?
Comments.UserDisplayName: Ian Bush
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-11-04T17:06:38.413Z
Comments.Text: Do engines really rank higher DTM as better? Surely they prefer lower DTM
Comments.UserDisplayName: Laska
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-11-04T19:00:55.430Z
Comments.Text: @Laska, for the defensive side I believe they do prefer higher DTM, while the attacking side conversely wants the shortest path
Comments.UserDisplayName: Jean
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-11-04T19:07:11.307Z
Comments.Text: ok yes got you.
Comments.UserDisplayName: Laska
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-11-05T09:29:23.833Z
Comments.Text: I fear this question is *mathematically* straightforward (shortest DTM under 50 move rule...which AFAIK hasn't been implemented yet) but against a human, all bets are off. Whole books have been written on that theme, e.g. Smerdon's Complete Chess Swindler.
Comments.UserDisplayName: Hauke Reddmann
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-11-05T10:09:53.550Z
Comments.Text: The use case is to create or improve engines and I don’t feel that the math has really be written yet. I’m looking for ways to automatically evaluate this “swindle” factor. Another example : in a R vs B endgame, you might as well give up the Rook and call it a draw, but you could also increase the pressure and force the opponent to make smart moves. I would like to find a way to quantify all that.
Comments.UserDisplayName: Jean
Tags: <engines><evaluation><mathematics><defense><trap>
Title: Defensive ressources in losing positions
ThreadText: # Defensive ressources in losing positions
  
  (Asked by: username_0 on 2024-11-04)
  
  When both players know the optimal move tree, the outcome is fixed if they play top moves. But in practical play, certain moves can still be more useful, based on psychological or tactical reasons rather than strict optimality.
  The Question: In a losing position, what is the best practical defense ?
  Most engines rank moves based on distance to mate (DTM), assuming longer paths are better. But some long paths are easier for opponents to find, while shorter paths may actually be harder.
  
  Contextual Factors in Move Selection
  
  Human Factors: Against a human, complex or ambiguous moves can increase the chance of opponent mistakes. Moves could be evaluated by both theoretical merit and likelihood of causing difficulty.
  
  Optimal and Exploitative Play Combined: This approach balances the theoretically best defensive move (like DTM or centipawns) with moves that make practical play harder for the opponent. These moves may not worsen the result but increase the chance for opponent errors, mixing optimality with exploitative strategy.
  
  
  
  Thoughts on a Mathematical Approach
  Some ideas to construct the evaluation function
  
  Blunder Probability: Rank each move by the estimated likelihood of opponent error, using data on human mistakes in complex positions.
  
  Entropy Metrics:
  
  
  
  Depth of Threat: Number of moves an opponent must calculate for a winning line.
  Branching Factor: Moves with many legal responses could demand more thought.
  Position Stability: Moves with large evaluation swings depending on the opponent’s response may add uncertainty.
  
  
  Example from Carlsen-Nepomniachtchi, Game 6 (2021)
  [Title ""]
  [Fen "4k3/8/8/4PR2/5P2/6N1/q5K1/8 w - - 1 130"]
  
  In this position, White’s move Kh3 is theoretically drawn if Black replies with Qb1! But Black missed Qb1, and White was suddenly winning.
  Note that the computer top move is not the one played by Carlsen, as he was pushing for the win.
  
  Any insights or mathematical approaches to refining this evaluation would be highly appreciated!
  
  **Tags:** engines, evaluation, mathematics, defense, trap
  
  > **Comments:**
  > **username_1**: In a real game (especially in a team match or the last round of a tournament) another consideration is what are you trying to get out of the game? Are you trying to "not lose", i.e. a draw is enough, or is it win or nothing?  
  > **username_2**: Do engines really rank higher DTM as better? Surely they prefer lower DTM  
  > **username_0**: @username_2, for the defensive side I believe they do prefer higher DTM, while the attacking side conversely wants the shortest path  
  > **username_2**: ok yes got you.  
  > **username_3**: I fear this question is *mathematically* straightforward (shortest DTM under 50 move rule...which AFAIK hasn't been implemented yet) but against a human, all bets are off. Whole books have been written on that theme, e.g. Smerdon's Complete Chess Swindler.  
  > **username_0**: The use case is to create or improve engines and I don’t feel that the math has really be written yet. I’m looking for ways to automatically evaluate this “swindle” factor. Another example : in a R vs B endgame, you might as well give up the Rook and call it a draw, but you could also increase the pressure and force the opponent to make smart moves. I would like to find a way to quantify all that.  
  
  ---
  
  ## 0 answers
  
  