Go Back   CodingForums.com > :: Computing & Sciences > Geek News and Humour

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-15-2003, 11:52 AM   PM User | #16
missing-score
Senior Coder


 
missing-score's Avatar
 
Join Date: Jan 2003
Location: UK
Posts: 2,194
Thanks: 0
Thanked 0 Times in 0 Posts
missing-score is on a distinguished road
Lol.

Next time I go onto a site where it asks for a mission, I can put: "To prove jkd wrong"
missing-score is offline   Reply With Quote
Old 04-15-2003, 11:53 AM   PM User | #17
krycek
Regular Coder

 
Join Date: Nov 2002
Location: Bristol, UK
Posts: 932
Thanks: 0
Thanked 0 Times in 0 Posts
krycek is an unknown quantity at this point
Quote:
Originally posted by mattover-matter
ok, im going to restate:

My question:
I wish to figure out how many valid positions in a chess game are possible (at one time)

My troubles:
1) two peices cannot be on the same square at one time
2) bishops cannot reach every square on the board
3) pawns cannot reach every square on the board (cannot move backwards)
4) Whenever a pawn reaches the end, It can choose a peice that is already dead (from his side) and revive it inplace of the pawn. You cannot have 2 queens, or 3 rooks.
5) Units cannot travel through (you must think back). A pawn cannot appear behind an enemy pawn for some reason (well, it is possible but not if the pawns have not killed anyone)

FYI:
1) There are 64 squares on a chessboard.
2) There are 8 pawns, 2 rooks, 2 knights, 2 bishops, 1 queen, 1 king per side(32 in total)
3) The dimensions for a chessboard are 8x8.
4) A knight CAN reach every position on the board.


Also, I asked at DR.math forum to see if anyone there knows a solution.


re: It would be interesting to know, but probably not fun to do

You are missing the point of this. Do you think I randomly pick things that have 0 relevency in anything I will ever do (don't take me literally)? I am doing this to learn, not to know. knowing is just a bonus. (note : what I just said applies to this problem, and this problem only [again, don't take me literally])
good luck.

start from the 'potential' figure I gave you (1008) and then take away whatever you want... but your question still lacks what I would call a 'point'... which means I'm probably still missing it!

Oh yeah and your rules 4 and 5 are technically incorrect. It's possible to have 8 queens, for example, and number 5 is to be laughed at What if someone simply decided NOT to take...? Perfectly legal.

::] krycek [::
__________________
ithium | SOAPI | SDP | PTPScript manual
"ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."
krycek is offline   Reply With Quote
Old 04-15-2003, 03:08 PM   PM User | #18
mattover-matter
Banned

 
Join Date: Mar 2003
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
mattover-matter is an unknown quantity at this point
I think you mean number of possible games. I mean number of posible positionings
mattover-matter is offline   Reply With Quote
Old 04-15-2003, 07:11 PM   PM User | #19
jkd
Senior Coder

 
jkd's Avatar
 
Join Date: May 2002
Location: metro DC
Posts: 3,163
Thanks: 1
Thanked 18 Times in 18 Posts
jkd will become famous soon enough
Possible positions is still enormous. With *just* two kings on the board, you have something like this:

A king on interior: 36*55 (9 squares opponent can't be in)
A king on side: 24*59 (5 squares opponent can't be in)
A king on a corner: 4*61 (3 squares opponent can't be in).

Which sums to 3640. As soon as you throw any more pieces onto the board, it becomes ridiculously enormous.

Notice 64*63 is 4032, which could be considered an upper limit for the calculation. A difference of 392 may seem significant right now, but as we get into billions of combinations, the only feasible way to calculate the number is to look at upper limits.
__________________
jasonkarldavis.com
jkd is offline   Reply With Quote
Old 04-15-2003, 07:55 PM   PM User | #20
krycek
Regular Coder

 
Join Date: Nov 2002
Location: Bristol, UK
Posts: 932
Thanks: 0
Thanked 0 Times in 0 Posts
krycek is an unknown quantity at this point
ahhhhhh now I get what he is trying to do!

the question is, why?

oh well!

::] krycek [::
__________________
ithium | SOAPI | SDP | PTPScript manual
"ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."
krycek is offline   Reply With Quote
Old 04-15-2003, 07:59 PM   PM User | #21
krycek
Regular Coder

 
Join Date: Nov 2002
Location: Bristol, UK
Posts: 932
Thanks: 0
Thanked 0 Times in 0 Posts
krycek is an unknown quantity at this point
By the way, I worked it out, mattover-matter.

The answer is,

4.5e+53 (I cannot write superscript on here can I? Ah well, I will leave it like that)

Any more accuracy, and that's up to you to work out...

::] krycek [::
__________________
ithium | SOAPI | SDP | PTPScript manual
"ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."
krycek is offline   Reply With Quote
Old 04-15-2003, 08:11 PM   PM User | #22
mattover-matter
Banned

 
Join Date: Mar 2003
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
mattover-matter is an unknown quantity at this point
re: why?
I am trying to learn
Hey, Can you kinda put that in stupider terms, I thought e was for calculating the growth in percentages...but I learned that on my own (not at school, don't give them the credit for my intelligence ). Kryckeck, can you please attempt to explain how you figured that out? I'm 13 so you guys are a wee bit ahead of me My math class is still on ratios and proportions (for 9 weeks now ) WOW, jkd I guess....my next mission will be to prove you wrong. I was getting 64*32 = 2??? I guess you proved me wrong.

5[sup]2[/sup]*[sub]Y[/sub]

like that kryckeck?

[ s u b ] [ / s u b ] [ s u p ] [ / s u p ]

nope, i guess these avatarless forums are jes' weird
mattover-matter is offline   Reply With Quote
Old 04-15-2003, 09:08 PM   PM User | #23
scroots
Senior Coder

 
Join Date: Jun 2002
Location: UK
Posts: 1,137
Thanks: 0
Thanked 0 Times in 0 Posts
scroots is an unknown quantity at this point
Macintosh

you say calculating the possible positions to move too at any one time in a game.
do you mean you want to calaculate the possible positions to move too at one ponit and later recalculate at another time. or just calculate them once?

would it be an idea that some produces a chessboard overview so that when calculating all the possible moves everyone is working on the same game board.

Depending on positions depends on the possible moves.

scroots
__________________
Spammers next time you spam me consider the implications:
(1) that you will be persuaded by me(in a legitimate mannor)
(2)It is worthless to you, when i have finished

Last edited by scroots; 04-15-2003 at 09:21 PM..
scroots is offline   Reply With Quote
Old 04-15-2003, 09:08 PM   PM User | #24
jkd
Senior Coder

 
jkd's Avatar
 
Join Date: May 2002
Location: metro DC
Posts: 3,163
Thanks: 1
Thanked 18 Times in 18 Posts
jkd will become famous soon enough
Quote:
Originally posted by mattover-matter
I thought e was for calculating the growth in percentages...but I learned that on my own (not at school, don't give them the credit for my intelligence ).
That's not e as in lim n-> infinity (1+1/n)^n, it is e as in the scientific notation shortcut.

4.5e+53 = 4.5 * 10^53

Which isn't actually the right answer either... it should be significantly larger than that.
__________________
jasonkarldavis.com
jkd is offline   Reply With Quote
Old 04-15-2003, 09:44 PM   PM User | #25
mattover-matter
Banned

 
Join Date: Mar 2003
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
mattover-matter is an unknown quantity at this point
but..number of grains of sand on earth??? That is like....
for (i=0;i++;200{document.write(",999")}
mattover-matter is offline   Reply With Quote
Old 04-15-2003, 10:03 PM   PM User | #26
krycek
Regular Coder

 
Join Date: Nov 2002
Location: Bristol, UK
Posts: 932
Thanks: 0
Thanked 0 Times in 0 Posts
krycek is an unknown quantity at this point
Quote:
Originally posted by jkd
That's not e as in lim n-> infinity (1+1/n)^n, it is e as in the scientific notation shortcut.

4.5e+53 = 4.5 * 10^53

Which isn't actually the right answer either... it should be significantly larger than that.
I'll take your word for it... as you know, it was just a quick estimate

I still think that 450,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 is big enough!

::] krycek [::
__________________
ithium | SOAPI | SDP | PTPScript manual
"ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."
krycek is offline   Reply With Quote
Old 04-18-2003, 02:08 AM   PM User | #27
bcarl314
Mega-ultimate member


 
Join Date: Jun 2002
Location: Winona, MN - The land of 10,000 lakes
Posts: 1,855
Thanks: 1
Thanked 45 Times in 42 Posts
bcarl314 will become famous soon enough
Quote:
Originally posted by mattover-matter
ok, im going to restate:

My question:
I wish to figure out how many valid positions in a chess game are possible (at one time)

My troubles:
1) two peices cannot be on the same square at one time
2) bishops cannot reach every square on the board
3) pawns cannot reach every square on the board (cannot move backwards)
4) Whenever a pawn reaches the end, It can choose a peice that is already dead (from his side) and revive it inplace of the pawn. You cannot have 2 queens, or 3 rooks.
5) Units cannot travel through (you must think back). A pawn cannot appear behind an enemy pawn for some reason (well, it is possible but not if the pawns have not killed anyone)

FYI:
1) There are 64 squares on a chessboard.
2) There are 8 pawns, 2 rooks, 2 knights, 2 bishops, 1 queen, 1 king per side(32 in total)
3) The dimensions for a chessboard are 8x8.
4) A knight CAN reach every position on the board.


Also, I asked at DR.math forum to see if anyone there knows a solution.


re: It would be interesting to know, but probably not fun to do

You are missing the point of this. Do you think I randomly pick things that have 0 relevency in anything I will ever do (don't take me literally)? I am doing this to learn, not to know. knowing is just a bonus. (note : what I just said applies to this problem, and this problem only [again, don't take me literally])
Heres a possible hint:

try to define the possible move at a given point in the game as an equation. Obviously, the total moves available to a player at any given moment changes based on the position of all the pieces on the board at that moment. For example, when you start the game there are 20 possible moves, each pawn can move 1 or 2 spaces, and 2 knights can move to 2 different spaces each. so we get something like

total moves = total pawns * 2 possible moves + total knights * 2 possible moves or 8 * 2 + 2 * 2 or 16 + 4 = 20.

Now, once you move a pawn, you total possible moves for the next turn increase based on the provious move. So everything is now dependant on the first move. This means you should be able to express the second move as a function of the first move. Hope this helps.

Good luck. I think this could be an SA article if you figure it out. (SA = Scientific American)
bcarl314 is offline   Reply With Quote
Old 04-18-2003, 05:44 AM   PM User | #28
mattover-matter
Banned

 
Join Date: Mar 2003
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
mattover-matter is an unknown quantity at this point
i think you guys were trying to calculate the possible games(entire game) which is infinite.
mattover-matter is offline   Reply With Quote
Old 04-18-2003, 09:23 AM   PM User | #29
missing-score
Senior Coder


 
missing-score's Avatar
 
Join Date: Jan 2003
Location: UK
Posts: 2,194
Thanks: 0
Thanked 0 Times in 0 Posts
missing-score is on a distinguished road
No, Not infinate. A hell of alot, but not infinate.
missing-score is offline   Reply With Quote
Old 04-19-2003, 12:57 AM   PM User | #30
mattover-matter
Banned

 
Join Date: Mar 2003
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
mattover-matter is an unknown quantity at this point
Yes, infinite. Moves can be retraced over and over
mattover-matter is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:18 AM.


Advertisement
Log in to turn off these ads.