Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
QM,
So, here is the problem:
It takes too long to figure out all the ways to play a game. I am thinking I need to lower the number of possible moves and limit how much time can be spent playing a single game. What do you think? Update: I can complete approximately 40,000 games every 5 seconds. What I have done is impose a 6 hit limit along with randomly shuffling the return of possible_hits() and limited each board to 40,0000 games. I have manually tested this against a handful of boards and it appears to give a pretty good approximation of the results if all of them had been played. I would prefer a C based version of this which could likely do far more per second but my C is rusty (was never very good) and I can't remember how to manage a dynamic array. Update 2: I turned the problem upside down and it became much easier. Instead of scoring how difficult the game was, I instead scored how easy the game was. I used a combined score of things like win to loss ratio, number of initial 1-hit moves to 1-hit wins, etc. The ones with the lowest score were the most difficult. Now I just need to code the actual game. Cheers - L~R In reply to Re^2: Challenge: Algorithm To Generate Bubble Blast 2 Puzzles With Difficulty
by Limbic~Region
|
|