|P is for Practical|
Challenge: Algorithm To Generate Bubble Blast 2 Puzzles With Difficultyby Limbic~Region (Chancellor)
|on Aug 30, 2013 at 01:10 UTC||Need Help??|
Limbic~Region has asked for the
wisdom of the Perl Monks concerning the following question:
I am going to write a clone of an Android game called Bubble Blast 2 in Scratch. The game board is initialized on a 5x6 grid. Each point on the grid, there can be one of 5 possible states:
I want to be able to generate puzzles of increasing difficulty but can't seem to land on an algorithm that feels right. I think it ends up being some relationship between:
Perhaps it may be better to reduce the number of ways to lose rather than maximize the number of ways to win. Imagine a board with a single 1-hit bubble. There is only 1 way to win but 0 ways to lose.
Your challenge, should you choose to accept it is to create an algorithm that can generate a user defined number of boards that span the spectrum of difficulty (easiest being there is no way to lose and hardest being there is only 1 way to win and it requires all of your available hits). I believe that the maximum number of available hits I have ever seen a game board initialized with is 7 or 8 which should greatly reduce the number of possible game boards.
Cheers - L~R