All,
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: You are also given a certain number of hits/touches to clear the board. When a bubble has no more hits, it explodes and sends shrapnel at 0, 90, 180 and 270 degrees on Cartesian coordinate system. When shrapnel hits another bubble its trajectory is stopped but the hit count of the bubble it collided with is reduced by 1 and if that bubble reaches 0 it in turn explodes creating a chain reaction.

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


In reply to Challenge: Algorithm To Generate Bubble Blast 2 Puzzles With Difficulty by Limbic~Region

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.