How to calculate Endgame DB’s
0. Duplicate every position, for W/B to move
1. Try every possible position of the pieces
- Mark as Win/0 if W has won in this position
- Mark as Loss/0 if W has lost in this position
- Leave other positions unmarked
2. Iterate until no new positions are marked
- 2a) Try every unmarked position of the pieces
- If W has move to Win/n, mark as Win/n+1
- If every W move is to Loss/n, mark as Loss/n+1
Of course W might have move to Loss/1, Loss/3, Loss/5. In this case n = 5