Forums

Number of Possible Chess Configurations

Sort:
rickyk586

wow, this post has received more attention then I thought it would.  Thanks everyone.  One day this question will have an answer and I hope someone posts it here.

I'm going fishing.

RetGuvvie98

What kind of fish are you going for, rickyk586 ?

Tiger-13

holy s**t r we in a chess forum or in a maths forums?

rickyk586
RetGuvvie98 wrote:

What kind of fish are you going for, rickyk586 ?


big ones!

RetGuvvie98

Uhhhh   rickyk586, there seems to be an abundance of them on this site, you won't have to go far.

ichabod801

Okay, this is an attempt to count all the distinct algebraic notations of legal moves. I'm limiting algebraic notation as described by Wikipedia to exclude double checks. There may be some errors below, but I've tried to break down my calculations so that other interested obsessive compulsives can find them.

The one assumption that has not be closely examined is that any move that can be a check can also be a mate. Basically I'm assuming that any checkable king could be prevented from moving out of check by other pieces. I'm really hoping no one can provide a counter example.

Unambiguous Moves:

plain moves: 48 for pawns, 64 per piece type (48 + 64 x 5)*
plain captures: 84 for pawns, 64 per piece type (84 + 64 x 5)**
plain checks: 48 for pawns, 64 per piece type (48 + 64 x 4)***
plain check captures: 84 for pawns, 64 per piece type (84 + 64 x 4)
plain mates: 48 for pawns, 64 per piece type (48 + 64 x 4)
plain mate captures: 84 for pawns, 64 per piece type (84 + 64 x 4)

* any pawn move to first or eighth rank is a promotion, covered later

** plain pawn captures can only come from 48 squares, but from 36 of them they can capture two ways

*** kings cannot check directly, but they can reveal checks.

You might think that bishops moves into the corner cannot be checks, but they can be revealed checks.

pawn promotions: 16 per piece type except kings (16 x 4)
pawn promotion captures: 28 per piece type except kings (28 x 4)*
pawn promotion checks: 16 per piece type except kings (16 x 4)
pawn promotion check captures: 28 per piece type except kings (28 x 4)
pawn promotion mates: 16 per piece type except kings (16 x 4)
pawn promotion mate captures: 28 per piece type except kings (28 x 4)

* six squares on each rank capture two ways, two capture one way

castling: 2
castle captures: 0
castling with check: 2
caslting with mate: 2

Subtotal for Unambigous: 16 x 12 + 28 x 12 + 48 x 3 + 64 x 30 + 84 x 3 + 6 = 2,850

Single Disambiguation:

Pawns are already file disambiguated, and can't have rank disambiguation. Kings can't have disambiguation.

Rooks:

R at ax has to go to bx-gx, but x can be anything, so 48 for Ra. R at bx has to go to cx-gx (40 for Rb), R at cx can go to bx or dx-gx (48). So the total for file disambiguation would be 48 x 6 + 40 x 2. Double that to account for rank disambiguation. 48 x 12 + 40 x 4 = 736

Bishops:

a1: never needs a bishop disambiguation. b1 can have a or c-h. So the first rank can have 7 for six of the squares. 7 x 6 = 42
a2: can have the seven file disses, and two rank dis (b1 vs b3). So nine for all eight. So 8 x 9 = 72
a3: seven file, four rank. 11 x 8 = 88
a4: seven file, six rank. 13 x 8 = 104

Those four ranks times two for total: (42 + 72 + 88 + 104) x 2 = 612

Knights:

a1: none; b1: a or c; c1: a, b, d, or e; (0 + 2 + 4 + 4) x 2 = 20
2nd rank: same as first, plus all have two rank disses (1 and 3). 20 + 16 = 36
3rd and 4th ranks: same as first, plus all have four rank disses. (20 + 32) x 2 = 104

Those four times two for total: (20 + 36 + 104) x 2 = 320

Queens:

every square has eight file and eight rank disambiguations. 16 x 64 = 1024

Plain single disambiguation subtotal: 736 + 612 + 320 + 1024 = 2,692

All of the single disambiguations can be captures and checks and all combinations thereof. (2,692 x 5)

Single disambiguation subtotal: 2,692 x 6 = 16,152

Double Disambiguation:

Pawns, rooks, and kings do not require double disambiguation

Knights:

need a rectangle of four points such that a night on any point can attack the center. All four points are then a move. The rectangle is 3 x 5. You can have four going the five direction and six going the three direction, with two orientations. 4 x 6 x 2 x 4 = 192

Bishops:

similar, but they must be squares with sides (s) of three, five, or seven. There are (9 - s) ^ 2 of each size square. (49 + 25 + 9) * 4 = 332

Queens:

Queens I just wrote a computer program to do. It gave 3,968 double disambiguated queen moves. and 3,888 of those being checks.

Plain double disambiguation subtotal: 192 + 332 + 3,968 = 4,492


All of them can be captures (4,492)

All of the knight ones can be checks (king is in the other corner). All of the bishop ones can be checks, unless the bishop is moving from the corner (because there can be no discovered check). In that case it can only be a check if it is a capture. There are 12 double disambiguated bishop moves from the corner. The computer says that 80 of the double disambiguated queen moves do not result in a new square attacked, and queen moves cannot result in discovered checks.

Double disambiguation check subtotal: 192 + 320 + 3,888 = 4,400

All the checks can be check captures, mates, and mate captures

Double disambiguation subtotal: 4,492 x 2 + 4,400 x 4 = 26,584


Grand Total: 2,850 + 16,152 + 26,584 = 45,586

Expanding this count to include double checks is left as an exercise for the reader.

(corrections to the original count provided by TheGrobe)

RetGuvvie98

but, will knowing that or even getting it right help in any way to make life better for anyone, even the person who figures it out correctly?

Wink

TheGrobe

ichabod801, pawns can't move to the first or second rank so there are 5 pawn moves, not including promotion, per pawn not 6.

RetGuvvie98

TheGrobe, don't worry about it, his mind is disambiguated.

TheGrobe

It looked like a lot of time went into it -- I can't help but pull at the threads a little.

TheGrobe

Some more fun (?) chess math can be found here:

http://blog.chess.com/kurtgodden/the-longest-possible-chess-game-revisited

ichabod801
TheGrobe wrote:

ichabod801, pawns can't move to the first or second rank so there are 5 pawn moves, not including promotion, per pawn not 6.


No, black pawns can move to the second rank, but not the seventh. White pawns can move to the seventh rank but not the second. So "b2" and "b7" are both valid pawn moves, even if they are each only valid for one color.

TheGrobe

Ahh -- gotcha.  I notice you also mention that kings can't check, but they can reveal a check (and also a mate) and so should have been included.

ichabod801
TheGrobe wrote:

Ahh -- gotcha.  I notice you also mention that kings can't check, but they can reveal a check (and also a mate) and so should have been included.


Good point. I corrected the orignial post. That adds 256 moves, bringing the total up to 45,586

pvmike

There are 168024 possible legal positions with just a King and pawn vs. king endgame

Niven42

Just do a Google or Wiki search for Shannon Number:

http://en.wikipedia.org/wiki/Shannon_number

ichabod801
pvmike wrote:

There are 168024 possible legal positions with just a King and pawn vs. king endgame


Are you sure? I'm getting 334,496. If you assume the pawn is one color or the other (say, white), I get 167,248. So I guess you're doing that, and not accounting for the fact that a pawn that hasn't moved yet cannot cause check.

jhuschstp
joetheplumber wrote:
elcabesa wrote:

you are right

so a better solution is sum of all combination with 32 pieces + 32 *sum of all combination with 31 pieces + 32^2 *sum of allcombination with 30 pieces etc.. +32^31 sumof all combination with 1 pieces

wow

64!/32! +32 *64!/33!+ 32^2*64/34!+.. +32^31*64!

= 64!/32!* (1+32/33+32^2/(33*34) + 32^3/(33*34*35)+....+ 32^31/(33*34*35*...*64))

=4.8e53*(1+0.97+0.91+0,83+0.74+0.65+0,57+...)

=(circa) 5e54

I hope

the number is far from perfect.. but it's near other approximation


yes, but in all fairness there really are only 12 pieces, since all but king and queen have another.


I think the two bishops are pretty different from each other.

Nytik
jhuschstp wrote:
joetheplumber wrote:
elcabesa wrote:

you are right

so a better solution is sum of all combination with 32 pieces + 32 *sum of all combination with 31 pieces + 32^2 *sum of allcombination with 30 pieces etc.. +32^31 sumof all combination with 1 pieces

wow

64!/32! +32 *64!/33!+ 32^2*64/34!+.. +32^31*64!

= 64!/32!* (1+32/33+32^2/(33*34) + 32^3/(33*34*35)+....+ 32^31/(33*34*35*...*64))

=4.8e53*(1+0.97+0.91+0,83+0.74+0.65+0,57+...)

=(circa) 5e54

I hope

the number is far from perfect.. but it's near other approximation


yes, but in all fairness there really are only 12 pieces, since all but king and queen have another.


I think the two bishops are pretty different from each other.


Yes, but the point is that a bishop on 'square A' is the same as a bishop on 'square A'.

GuyOnTheCouch

"Kasner and Newman estimate that the total of possible moves in a game of chess is 10 to the power of (10 to the 50th). This is a figure for which we have no name. It is composed first by taking a one with fifty zeros after it, thus: 100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 and then multiplying ten by itself that many times. An ordinary 200 page book accommodates 330,000 letters and numerals; three such volumes would provide space for about a million numerals. To write the number 10 to the 10th to the 50th power would take 30,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 volumes: all this space being required merely to write down the numeral indicating all the different moves in a chess game."

oO yeah surprised me to.