Answers.Body: <p>Two squares A and B such that after the attacker (player going for the win) moves to square A the defender <em>must</em> move to square B to hold the position (at least for the moment).</p>
  
  <p>This doesn't say that the attacker won't still win the game down the road (with objective play from both sides). But to prevent an immediate win the defender must go to B after the attacker goes to A.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-20T23:37:07.307Z
Answers.Text: If I understand you correctly, your definition is equivalent to mine, except you use a larger domain of scores, e.g., one that includes the depth-to-mate (DTM). Then, the defender "holding the position for the moment" corresponds to ensuring a longer DTM.
Answers.UserDisplayName: Kasper Dokter
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-21T00:00:18.697Z
Answers.Text: Basically. If the attacker moves on a corresponding square A after the defender moves on B, this implies the attacker will win. Meanwhile if the defender moves on B after the attacker moves on A, no result is immediately implied. The defender just has chances to hold. It may be the case that there's another pair of corresponding squares C and D, with an additional C next to the first C. This means the attacker can win by just going to this pair of C's, regardless of the current situation on A and B.
Answers.UserDisplayName: Inertial Ignorance
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-21T00:06:56.073Z
Answers.Text: I do understand the intuitive meaning of corresponding squares. I am looking for a formal definition that I can use in my computer program to construct these squares.
Answers.UserDisplayName: Kasper Dokter
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-21T00:20:55.927Z
Answers.Text: The attacker moving second on a pair of CS logically implies a loss for the defender. Anything else has no direct implication. So in your program you could use this to tell the computer when to evaluate that the defender is lost. If the defender moves second on a pair of CS, get the computer to keep searching ahead.
Answers.UserDisplayName: Inertial Ignorance
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-20T18:27:08.357Z
Answers.LastActivityDate: 2019-04-20T18:27:08.357Z
Answers.UserDisplayName: Inertial Ignorance
Body: <p>For (endgame) training purposes, I would like to write a python program (using <a href="https://python-chess.readthedocs.io/en/latest/" rel="noreferrer">python chess</a>) that generates all pairs of corresponding squares in a pawn endgame. Following the definition from Dvoretsky's Endgame Manual, I define corresponding squares as squares of <a href="https://en.wikipedia.org/wiki/Zugzwang" rel="noreferrer">reciprocal zugzwang</a>. 
  This definition, however, does not seem to formalize corresponding squares.</p>
  
  <p>Suppose we have access to a scoring function s that returns, for any position p, a score s(p) from a totally ordered domain S of scores.
  The maximal score means that White wins, and the minimal score means that Black wins.
  The simplest scoring domain is the ordered set {-1,0,1}, where -1 is a win for Black, 0 is a draw, and 1 is a win for White.</p>
  
  <p>Given such a scoring function, I now define <strong>a reciprocal zugzwang</strong> as a position p such that s(p_w) &lt; s(p_b), where p_w and p_b are the positions derived from p wherein White resp. Black is to move.
  This definition states that White would prefer to Black to move, and vice versa.</p>
  
  <p>However, this definition of reciprocal zugzwang does not yield the usual notion of corresponding squares. For example, consider the <a href="https://syzygy-tables.info/?fen=8/2k5/p1P5/P1K5/8/8/8/8_w_-_-_0_1" rel="noreferrer">Fahrni - Alapin</a> position. 
  If Black is to move, White can win easily. 
  White is to move can secure a win by means of triangulation.
  Nevertheless, Dvoretsky claims that the kings are placed on corresponding squares.</p>
  
  <p>What would be a sensible formal definition of corresponding squares?</p>
  
Tags: <pawn-endgame><zugzwang>
Title: Formal definition of corresponding squares
ThreadText: # Formal definition of corresponding squares
  
  (Asked by: username_0 on 2019-04-20)
  
  For (endgame) training purposes, I would like to write a python program (using [python chess](https://python-chess.readthedocs.io/en/latest/)) that generates all pairs of corresponding squares in a pawn endgame. Following the definition from Dvoretsky's Endgame Manual, I define corresponding squares as squares of [reciprocal zugzwang](https://en.wikipedia.org/wiki/Zugzwang).
  This definition, however, does not seem to formalize corresponding squares.
  
  Suppose we have access to a scoring function s that returns, for any position p, a score s(p) from a totally ordered domain S of scores.
  The maximal score means that White wins, and the minimal score means that Black wins.
  The simplest scoring domain is the ordered set {-1,0,1}, where -1 is a win for Black, 0 is a draw, and 1 is a win for White.
  
  Given such a scoring function, I now define **a reciprocal zugzwang** as a position p such that s(p\_w) < s(p\_b), where p\_w and p\_b are the positions derived from p wherein White resp. Black is to move.
  This definition states that White would prefer to Black to move, and vice versa.
  
  However, this definition of reciprocal zugzwang does not yield the usual notion of corresponding squares. For example, consider the [Fahrni - Alapin](https://syzygy-tables.info/?fen=8/2k5/p1P5/P1K5/8/8/8/8_w_-_-_0_1) position.
  If Black is to move, White can win easily.
  White is to move can secure a win by means of triangulation.
  Nevertheless, Dvoretsky claims that the kings are placed on corresponding squares.
  
  What would be a sensible formal definition of corresponding squares?
  
  **Tags:** pawn-endgame, zugzwang
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-04-20. Score: 1
  
  Two squares A and B such that after the attacker (player going for the win) moves to square A the defender *must* move to square B to hold the position (at least for the moment).
  
  This doesn't say that the attacker won't still win the game down the road (with objective play from both sides). But to prevent an immediate win the defender must go to B after the attacker goes to A.
  
  > **Comments:**
  > **username_0**: If I understand you correctly, your definition is equivalent to mine, except you use a larger domain of scores, e.g., one that includes the depth-to-mate (DTM). Then, the defender "holding the position for the moment" corresponds to ensuring a longer DTM.  
  > **username_1**: Basically. If the attacker moves on a corresponding square A after the defender moves on B, this implies the attacker will win. Meanwhile if the defender moves on B after the attacker moves on A, no result is immediately implied. The defender just has chances to hold. It may be the case that there's another pair of corresponding squares C and D, with an additional C next to the first C. This means the attacker can win by just going to this pair of C's, regardless of the current situation on A and B.  
  > **username_0**: I do understand the intuitive meaning of corresponding squares. I am looking for a formal definition that I can use in my computer program to construct these squares.  
  > **username_1**: The attacker moving second on a pair of CS logically implies a loss for the defender. Anything else has no direct implication. So in your program you could use this to tell the computer when to evaluate that the defender is lost. If the defender moves second on a pair of CS, get the computer to keep searching ahead.  
  
  ---
  
  