user18950: For (endgame) training purposes, I would like to write a python program (using python chess) 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. 
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 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?

user12873: 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.

18950: <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>
 12873: <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>
