Is the number of legal chess positions odd or even? Two positions are not the same if they differ in castling rights (i.e. whether K or R have actually moved) or en passant capability (i.e. whether the move can actually be made) or who has the move.

The number of times position has been repeated is not part of the definition of position for obvious reasons; nor is the number of moves since last capture or pawn move.

I don’t have the answer myself. This is hard but doable with a bit of programming I think.

EDIT: The answer so far and the comments are clearly heading along the right lines, although not always correct yet: terrific work. I want to give multiple +1s! I will summarize the key points to help focus the work. Pairing mirrored positions is essential i.e. those which allow triangulation. I term positions which have no mirror image “vampires” :-) Any vampire (except for the starting position) must be immediate offspring of a vampire, so it’s maybe easiest to just focus on them.

Someone touched on castling, which is very important. We can partition the vampires into 16 different clans. The head of each clan is an "initial game array" position (i.e. with 32 pieces on apparently original squares) but with specific castling rights disabled (by some initial dance of rooks and knight taking 2n.0 moves).

In a clan, if a castling right remains, then that implies that the rook's pawn can safely capture off the file, the f-pawn can move forward a single square or capture or (on the kingside) the bishop can be captured, without allowing triangulation. If the right is lost then the rook's pawn can only move forward a single square, and the bishops cannot be captured.

En passant is less important but amazingly there are vampire en passant positions. For example:

r1bqkb1r/2pppppp/8/1pP5/8/8/PPPPP1PP/R1BQKB1R w KQkq b6 0 12

where White retains at least one castling right, Black has at least queenside castling rights and White can capture e.p.

  • 2
    @user1583209 the mirror image of the initial position isn't exactly legal (or at least the OP should clarify whether it is) - it cannot be reached from the starting position.
    – Glorfindel
    Commented Mar 30, 2020 at 7:38
  • 1
    @Glorfindel: Good point. Is this (and similar positions where queen/king could not have moved) the only exception? Commented Mar 30, 2020 at 7:42
  • 1
    @bot I think the approach would be to count the positions that cannot be reached legally with the opposite color on the move. For example, you can reach the equivalent of 1. e3 with 1. Nf3 e6 2. Ng1 Bd6 3. Nf3 Be7 4. Ng1 Bf8, so there are an even number of legal positions from that point. Of white's 20 opening options, only the four knight moves, a3, f3, and h3 have unreachable equivalents with black. I think it could still be very difficult, though.
    – D Krueger
    Commented Mar 30, 2020 at 11:18
  • 1
    @Laska There is some strange interaction between castling and parity which I can't quite see how to count effectively yet. Take for instance the position after 1. Nf3 Nf6 2. Ne5 Ng8 3. Ng6 Nf6 4. Nxf8 Ng8. This position cannot be "mirrored" (inversion about horizontal axis + colour inversion) because of the side to move, despite a piece being captured -- you can't reach the "mirror" position while preserving white kingside castling rights.
    – Remellion
    Commented Mar 31, 2020 at 14:53
  • 1
    If I have to rely on humanly identifying matrices like the one I posted to do a census of the clans, then I wouldn't call that "effective". :P Too easy to miss an idea or wrongly identify a corner case.
    – Remellion
    Commented Mar 31, 2020 at 16:19

1 Answer 1



For each position, we can produce 1 "pair" position using the following cases and vice versa.

Lets break down the game to the following cases:

Case 1) Whenever we can use triangulation to produce a pair position with the same pieces in the mirrored positions between the rows 4 and 5 with the opponent to move.

For example:

enter image description here

1. c3 (1. d3) (1. b3 Nc6 2. Ba3)

1. Nc3 b6 2. Nb1 Bb7 3. Nc3 Ba6

Case 2) Every position where triangulation cannot be done.

Every position can have a pair position with or without castling done for white.

By moving the white knight on g1 and then the white rook to g1 and then back to h1, the castling rights are lost.

eg. Starting with the following set of moves

[FEN ""]
1. Nf3 Nf6 2. Rg1 Ng8 3. Rh1 Nf6 4. Ng1 Ng8

we produce the start position without castling rights for white, all positions after that until we can use Case (1) can be with and without castling rights for white.

The initial position falls to Case (2).


PS: Updated the answer, so the comments till Jan 7th 2024 are for the old answer

  • 6
    1. Nf3 Nf6 2. Ng1 Nd5 3. Nf3 Nf4 4. Ng1 Nd3+ I don't think you can mirror this with Black to move, as there's no way to lose the tempo.
    – D M
    Commented Mar 30, 2020 at 20:57
  • 3
    Also just 1. Nf3 Nf6. Like the start position, it's its own mirror image.
    – academic
    Commented Mar 30, 2020 at 22:27
  • 2
    I am confused you have "switching colors", "mirrored horizontally" and "corresponding positions". Could you make the difference more clear, specifically when counting, do you count the color-switched or the mirrored positions? Commented Mar 31, 2020 at 8:01
  • 4
    It's not true that non-mirrored positions can only involve knight moves. You can also push rook pawns a single square, and move the rooks a single square forward or sideways. Since this does not give a rook enough freedom to move more than a single square, no triangulation can happen. Commented Mar 31, 2020 at 9:29
  • 2
    Triangulation section is wrong. The moves a3, h3, ...a6, and ...h6 also preserve the parity of the position.
    – Remellion
    Commented Mar 31, 2020 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.