Number of Possible Chess Configurations

Jump to forum:
5th February 2009, 11:34pm
#41
by artfizz
South (GMT) +rT United Kingdom
Member Since: May 2008
Member Points: 3521
pest wrote:

Ah thank you. I hadn't realised. Must remember not to dabble in the clever stuff.


... but well worth counting - and non-trivial. Easy for someone to say: "about a few thousand; tops"; a lot harder to calculate precisely.

I wonder what the longest single move notation would be? 6 characters?

6th February 2009, 02:26am
#42
by RetGuvvie98
Manassas, VA United States
Member Since: Sep 2007
Member Points: 4000

Artfizz, would that be descriptive or algebraic ?  - or forsyth or some other notation format  (not in english?)  ?

    when you post a 'problem condition' for us to solve, you might want to establish "limiting parameters" or you may receive answers from all over the place.

6th February 2009, 02:59am
#43
by artfizz
South (GMT) +rT United Kingdom
Member Since: May 2008
Member Points: 3521
RetGuvvie98 wrote:

Artfizz, would that be descriptive or algebraic ?  - or forsyth or some other notation format  (not in english?)  ?

    when you post a 'problem condition' for us to solve, you might want to establish "limiting parameters" or you may receive answers from all over the place.


 The answers seem to be 'all over the place' without any help from me! There will be distinct solutions for ALL of the different notations (including CLIPCLOP). Short algebraic is probably the least complex to solve first.

Any advance on 6 characters?

6th February 2009, 05:53am
#44
by ichabod801
Maryland United States
Member Since: Dec 2008
Member Points: 846

Nf3xd4++

Knights at f3, f5, and b3 (one promoted from pawn), bishop at g2. Enemy king at c6, enemy whatever at d4. Double disambiguated knight takes d4 with double check. Eight characters. Seven if you disallow ++ for double check.

6th February 2009, 05:57am
#45
by RetGuvvie98
Manassas, VA United States
Member Since: Sep 2007
Member Points: 4000

what would constitute a "double disambiguated knight" ???  I don't think I have seen that term before.

or are you just making stuff up - tripping in fantasy land ?

6th February 2009, 06:11am
#46
by ichabod801
Maryland United States
Member Since: Dec 2008
Member Points: 846
RetGuvvie98 wrote:

what would constitute a "double disambiguated knight" ???  I don't think I have seen that term before.

or are you just making stuff up - tripping in fantasy land ?


 Any of the three knights in my example could capture d4, so you have to disambiguate which one does it. If the f3 knight is the one that captures, you can't use the f to disambiguate, because there are two f-file knights. Same for 3: there are two knights on the third rank. So you have to double disambiguate with f and 3: Nf3. And I quit tripping back in 1990.

More useless numbers I've calculated: there are 236,196 ways to choose a set of Chess men from a standard set, if that set must include at least the two kings.

6th February 2009, 06:49am
#47
by TheGrobe
Calgary Canada
Member Since: Nov 2007
Member Points: 4617

Don't know if it's already been referenced, but this is discussed at length here:

http://www.chess.com/forum/view/general/how-many-different-chess-positions-are-there?page=4

6th February 2009, 01:45pm
#48
by RetGuvvie98
Manassas, VA United States
Member Since: Sep 2007
Member Points: 4000

but you persist in posting useless numbers in a useless forum....   are you sure you stopped tripping??

6th February 2009, 03:29pm
#49
by ichabod801
Maryland United States
Member Since: Dec 2008
Member Points: 846
RetGuvvie98 wrote:

but you persist in posting useless numbers in a useless forum....   are you sure you stopped tripping??


Think about it. The 236,196 number I derived using generating functions. But those are too tedious to solve by hand, so I wrote a Python program to do it for me. So I wrote a computer program to solve a math problem about Chess. A geek trifecta. I'm not tripping, I'm just a geek.

BTW, I'm working on the total number of possible moves in algebraic notation. I'm up to 17,306, but that does not include disambiguated moves that are checks. And I just thought of an error in that which makes it an over count.

6th February 2009, 05:20pm
#50
by rickyk586
Rochester United States
Member Since: Feb 2009
Member Points: 5

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.

6th February 2009, 05:21pm
#51
by RetGuvvie98
Manassas, VA United States
Member Since: Sep 2007
Member Points: 4000

What kind of fish are you going for, rickyk586 ?

7th February 2009, 12:24am
#52
by Tiger-13
Sydney Australia
Member Since: Dec 2008
Member Points: 1277

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

7th February 2009, 01:49pm
#53
by rickyk586
Rochester United States
Member Since: Feb 2009
Member Points: 5
RetGuvvie98 wrote:

What kind of fish are you going for, rickyk586 ?


big ones!

7th February 2009, 03:32pm
#54
by RetGuvvie98
Manassas, VA United States
Member Since: Sep 2007
Member Points: 4000

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

8th February 2009, 05:07am
#55
by ichabod801
Maryland United States
Member Since: Dec 2008
Member Points: 846

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)

8th February 2009, 06:09am
#56
by RetGuvvie98
Manassas, VA United States
Member Since: Sep 2007
Member Points: 4000

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

8th February 2009, 10:52am
#57
by TheGrobe
Calgary Canada
Member Since: Nov 2007
Member Points: 4617

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

8th February 2009, 10:54am
#58
by RetGuvvie98
Manassas, VA United States
Member Since: Sep 2007
Member Points: 4000

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

8th February 2009, 11:05am
#59
by TheGrobe
Calgary Canada
Member Since: Nov 2007
Member Points: 4617

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

8th February 2009, 11:13am
#60
by TheGrobe
Calgary Canada
Member Since: Nov 2007
Member Points: 4617

Add your comment:

Join Chess.com for free to add your comment! Already a member? Then login now to comment.