How many different chess positions are there?

Sort:
SciFiChess

How Many Different Chess Positions Are There?

I computed the exact number of different chess positions (including illegal positions) on my blog. The number of legal positions is not known, but there are estimates, and it is much smaller than the total number of positions.

tygxc

1.5361222e+39 but most of these are irrelevant large army vs. small army
relevant maybe 1.e+38

johntromp

There are approximately 4.5x10^44 legal chess positions:

https://github.com/tromp/ChessPositionRanking

tygxc

#303
That is absolutely correct, but most of these are either illegal or not sensible like with 3 light square bishops.

daviditis

Wow I'm watching my brain completely fly out of ballpark right now. I am knew to this type of chess. (Timed these ways) But I have never seen what he called # BATTLE POSITION NUMBER

7 CUSTOM. CAN ANYONE TELL ME WHERE I MIGHT FIND A PIC. OF THIS?

johntromp

Based on determining legality of 1 million uniformly random chosen positions, the latest estimate, accurate to 2 digits, is 4.8 x 10^44 legal chess positions: https://github.com/tromp/ChessPositionRanking

MARattigan

@SciFiChess

You talk about diagrams rather than positions. For each diagram there are other attributes, e.g. side to move.

@johntromp

I believe you estimate the number of positions under FIDE's (current) basic rules (i.e. no 50/75 move rule or 3/5-fold repetition rules) which is very useful in analysing basic rules chess.

Have you thought about estimating the number of positions with the 50/75 move rule and/or 3/5-fold repetition rules included?

The effect of just the 50/75 move rules would, I think, be to multiply the number of positions (so far as forward play is concerned) by something very close to 150, but the effect of the 3/5-fold repetition rules is harder to estimate. A position, for forward play purposes, would be described by an equivalence class of PGNs starting from a ply count 0 FEN, where two PGNs are equivalent if they result in the same preceding positions (in some order) each with the same repetition count.

(Obviously an upper bound around 4.8 x 10^44 x 5^(4.8 x 10^44) and just as obviously that upper bound is absurdly high. The equivalence class would also define the ply count, so there is no need for a further factor of 150 if both 75 move and 5-fold repetition rules are considered.)

boddythepoddy

my guess is 10^122

MARattigan

I would say that is just as obviously absurdly low if you're referring to the number of positions under FIDE competition rules mentioned in my preceding post.

If you're referring to OP's question, the answer depends on whether the game is played under basic or competition rules. I would guess your guess is safely between the figures for each. 

MARattigan
johntromp wrote:

Based on determining legality of 1 million uniformly random chosen positions, the latest estimate, accurate to 2 digits, is 4.8 x 10^44 legal chess positions: https://github.com/tromp/ChessPositionRanking

You determined that by the rawbats program.

What criteria did it use? I don't believe the problem of fully determining the legality of a position has been solved

Or do you know of a location for rawbats documentation?

Romans_5_8_and_8_5

10^43

Kyler65

MANY

SciFiChess

@MARattigan:

On my blog I compute the total number of different chess positions, including illegal positions. I also compute the total number of different positions with all 32 standard chessmen on the board, including illegal positions. Computers are not yet powerful enough to compute the exact number of legal positions. Since some of the positions are illegal, there is no reason to consider castling or en passant privileges. You can call these chess positions or chess diagrams.

How Many Different Chess Positions Are There?

How many different positions are there with 32 chessmen on the board?

MARattigan

@SciFiChess

Well you actually compute numbers of board layouts or diagrams

A position would normally be understood to need at least a side to move. (For example, if you look here, you can see that is included in @johntromp's figures.)

A full specification of a position would at least determine what play is possible from the position. That would correspond with a FEN for chess under basic rules, which currently include no n-move rule or n-fold repetition rule (though the ply count field is redundant) or under competition rules a PGN from a setup position defined by a FEN with ply count 0 (or from the starting position).

Strictly speaking the pieces touched by the player having the move should also be included but that can be ignored for most purposes.

The above specifications can't describe all illegal positions. For example the board layout section of a FEN couldn't accomodate this illegal position.

                               White to play

ChessSBM

Is the color of text black for me only, or is it for someone else too?

MARattigan

Comes out off white for me in desktop Windows/Chrome.

A temporary fix would be to select the text, when it should become readable.

tygxc

#306
This paper arrives at 10^37 positions without promotions to pieces not yet taken.

https://arxiv.org/pdf/2112.09386.pdf

The methodology is a bit different:
they exclude adjacent kings and same color bishop pairs from the start.

Two other minor issues:
1) For every position with black to move, there is a corresponding position with white to move by up/down symmetry.
2) For every position with lost castling rights, there is a corresponding mirror image position by left/right symmetry.
So the effective number is almost a factor 4 lower.

From the paper 10^37 positions with no promotions to pieces not yet captured, leads to about 10^38 positions including such with 3 or 4 queens.

From these maybe 10^32 can be reached by a proof game with > 50% accuracy.

SciFiChess

I am a Super Admin in the Math and Chess Club. My blog posts about the number of chess positions are exercises in combinatorics as well as the mathematics of chess. Mathematicians have studied chess extensively in game theory. Also, my posts specify that no more than one chessman is allowed on a square.

When dealing with illegal "positions", the definition of "position" is more general than when only using legal "positions". Diagrams and board layouts are acceptable terms as well. The concept of a legal position depends on the rules being used. There are some legal positions in crazyhouse that are illegal in chess960 and standard chess. Some legal positions in chess960 are illegal in standard chess.

MARattigan

@SciFiChess

There is no definition of "position" in the FIDE laws. The term is used but the English meaning must be assumed.

That, I would suggest, would be something like 

3. a situation, especially as it affects one's power to act.

i.e. the most appropriate alternative meaning shown when I query the term in Bing.

Although the FIDE laws contain no explicit definition, the term is used in e.g.

5.2.2
The game is drawn when a position has arisen in which neither player can checkmate the opponent’s king with any series of legal moves. The game is said to end in a ‘dead position’. This immediately ends the game, provided that the move producing the position was in accordance with Article 3 and Articles 4.2 – 4.7.

This implies that it should be possible to determine from the position whether neither player can checkmate the opponent’s king with any series of legal moves.

If this diagram arises then it is not possible to determine from the diagram alone whether art. 5.2.2 applies.

That is why it is necessary to distinguish positions and diagrams. A diagram is just one attribute of a position.

@tromp's figures are currently the best figures relating to legal positions (but only for games played under FIDE basic rules - or strictly speaking those rules with some necessary corrections).

tygxc

#319

"There is no definition of "position" in the FIDE laws."
There is a definition:
9.2.2
Positions are considered the same if and only if the same player has the move, pieces of the same kind and colour occupy the same squares and the possible moves of all the pieces of both players are the same. Thus positions are not the same if:
9.2.2.1
at the start of the sequence a pawn could have been captured en passant
9.2.2.2
a king had castling rights with a rook that has not been moved, but forfeited these after moving. The castling rights are lost only after the king or rook is moved.
https://handbook.fide.com/chapter/E012018