Bowling Simulation and making it distrubuted

foxkm

Senior member
Dec 11, 2002
229
0
0
I had the crazy Idea to see how many iterations of bowling scores there are (its obvious there is 1 way to get a score of 0, 1 way to get a score of 300...) I have written a preliminary simulation which if you are interested, you can download HERE and play with.

Unfortunately, I have calculated that it will take a single 3200+ athlon PC almost 5000 years to complete this task running a 100% workload. I need to continue development on this so I can make it threaded as well as set up some sort of distrubuted network. Does anyone have any good suggestions which way to take this?

foxkm@586z.wox.org
 

foxkm

Senior member
Dec 11, 2002
229
0
0
P.S. for benchmark results (on my Athlon 3200+ PC3200DC Nforce2), with the Athlon Optimized Win32 binary, I was getting between 13.4 - 16.9 Million Game simulations per second. What is everyone else getting?
 

JonB

Platinum Member
Oct 10, 1999
2,126
13
81
www.granburychristmaslights.com
There's a guy in Akron, Ohio who has already bowled every possible game. During the process, he consumed 32,000 gallons of beer, 12 tons of nachos, 9,000 hot dogs (some with chili and onions) and hit on at least 300 women bowling in the next four lanes.


:)
 

BlackMountainCow

Diamond Member
May 28, 2003
5,759
0
0
well, the athlon optimized version keeps crashing on me foxkm ... dunno why. FaD, LM and D2OL run fine here ... :(
 

BlackMountainCow

Diamond Member
May 28, 2003
5,759
0
0
2500+ Barton @ 3200+ (rock solid), Xp pro, 1 GB TwinMOS Dual Chan 400 DDR, Shuttle AN35N-U mobo ...

When I open it, the windows just closes right away ...
 

foxkm

Senior member
Dec 11, 2002
229
0
0
Weird, are you running the .exe file? Try running dropping to CMD and running the _athlon.exe from a command promt. If it gives out errors, list them. I have other people running it on athlon's, including me, which are having no problem.

foxkm
 

Coolkid

Platinum Member
Mar 4, 2003
2,189
0
0
Workin ok here :)
This is the output im getting here:
- 1593590328 total games 9.5436e+006 games/sec YES
- 1662876864 total games 1.1168e+007 games/sec YES
- 1732163400 total games 1.1168e+007 games/sec YES
- 1801449936 total games 1.1168e+007 games/sec YES
- 1870736472 total games 1.1168e+007 games/sec YES
- 1940023008 total games 9.63116e+006 games/sec YES
- 2009309544 total games 1.34589e+007 games/sec YES
- 2078596080 total games 1.1168e+007 games/sec YES
- 2147882616 total games 1.1168e+007 games/sec YES
- 2217169152 total games 1.12881e+007 games/sec YES
- 2286455688 total games 1.12881e+007 games/sec YES
- 2355742224 total games 1.1168e+007 games/sec YES
- 2425028760 total games 1.34589e+007 games/sec YES
On a 2500+ @ 2.2ghz, 1GB 3200DC, A7N8X-Deluxe running WinXP Pro SP1.
How does that compare with your 13.4 - 16.9 Million Game simulations per second?
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,837
4,817
75
I haven't bowled much, so I have no idea how the scoring works. But to me this sounds like a relatively simple Combinatorics problem which should only take some brainpower to solve.
 

foxkm

Senior member
Dec 11, 2002
229
0
0
Originally posted by: Coolkid
Workin ok here :)
This is the output im getting here:
- 1593590328 total games 9.5436e+006 games/sec YES
- 1662876864 total games 1.1168e+007 games/sec YES
- 1732163400 total games 1.1168e+007 games/sec YES
- 1801449936 total games 1.1168e+007 games/sec YES
- 1870736472 total games 1.1168e+007 games/sec YES
- 1940023008 total games 9.63116e+006 games/sec YES
- 2009309544 total games 1.34589e+007 games/sec YES
- 2078596080 total games 1.1168e+007 games/sec YES
- 2147882616 total games 1.1168e+007 games/sec YES
- 2217169152 total games 1.12881e+007 games/sec YES
- 2286455688 total games 1.12881e+007 games/sec YES
- 2355742224 total games 1.1168e+007 games/sec YES
- 2425028760 total games 1.34589e+007 games/sec YES
On a 2500+ @ 2.2ghz, 1GB 3200DC, A7N8X-Deluxe running WinXP Pro SP1.
How does that compare with your 13.4 - 16.9 Million Game simulations per second?

Well, thats about right, On my 3200+ I am getting constant 1.34589e+007's which just multipy that number by 7 to give you 13.4 Million Games/Second
 

MoFunk

Diamond Member
Dec 6, 2000
4,058
0
0
Originally posted by: JonB
There's a guy in Akron, Ohio who has already bowled every possible game. During the process, he consumed 32,000 gallons of beer, 12 tons of nachos, 9,000 hot dogs (some with chili and onions) and hit on at least 300 women bowling in the next four lanes.


:)

LMAO!!!!
 

kloostec

Senior member
Sep 19, 2003
272
0
76
Running your precompiled linux binary...

- 485005752 total games 1.49971e+07 games/sec YES
- 554292288 total games 1.49971e+07 games/sec YES
- 623578824 total games 1.49971e+07 games/sec YES
- 692865360 total games 1.49971e+07 games/sec YES
- 762151896 total games 1.31224e+07 games/sec YES
- 831438432 total games 1.49971e+07 games/sec YES
- 900724968 total games 1.31224e+07 games/sec YES
- 970011504 total games 1.49971e+07 games/sec YES

I can't get a binary I compile myself to run nearly as fast (maximum 1.1xe+07 games/sec) for some reason...

Mobile Athlon XP 2500+ @ 2333MHz, 1024 MB DDR333, KT400 chipset (shhh).
 

dringdahl

Senior member
Jun 8, 2004
386
0
0
Im getting this from a Xeon 3.06 1mb Cache Box.

- 1524303792 total games 1.74966e+07 games/sec YES
- 1593590328 total games 1.74966e+07 games/sec YES
- 1662876864 total games 1.74966e+07 games/sec YES
- 1732163400 total games 1.74966e+07 games/sec YES
- 1801449936 total games 1.74966e+07 games/sec YES
- 1870736472 total games 1.74966e+07 games/sec YES
 

silverpig

Lifer
Jul 29, 2001
27,703
12
81
Just tried it out.

XP 2500+ @ 3200+
1 GB dual channel ram

In windows I got about 11 million games/sec
In linux using the precompiled binary I got 15 million games/sec
In linux using my own compiled version I got 9 million games/sec
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,837
4,817
75
Originally posted by: silverpig
Couldn't you do this mathematically much faster? :)
You'd think that. I thought that (see above), and I still do to some degree. But you need to understand the complexity of bowling scoring. See this tutorial on bowling scoring for more.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,837
4,817
75
Eureka! I have solved it!

This program is a fully dynamic programming solution, and solves the entire problem in only .03 seconds:

- 5726805883325784576 total games 1.90894e+20 games/sec YES

I tested it by comparing smaller games (e.g. 3 sets) against programs I'd tested against Kyle's program. The full solution is:
 

kmmatney

Diamond Member
Jun 19, 2000
4,363
1
81
OK, maybe I'm not thinking straight, but I can't see how you get this one:

1 20

I would think there are only 10 games that will get you a score of 1.

Edit - Nevermind. You can get the 1 pin on either the first or second ball, making 20 ways to do it.
 

foxkm

Senior member
Dec 11, 2002
229
0
0
Well holy cow. I can't believe someone else put time to program this besides me. I'll have to go over the algorythm used in this method. Thanks much Ken!!!

Kyle