Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 417873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:37:23+00:00 2026-05-12T18:37:23+00:00

For a mental exercise I decided to try and solve the bubble breaker game

  • 0

For a mental exercise I decided to try and solve the bubble breaker game found on many cell phones as well as an example here:Bubble Break Game

  • The random (N,M,C) board consists N rows x M columns with C colors
  • The goal is to get the highest score by picking the sequence of bubble groups that ultimately leads to the highest score
  • A bubble group is 2 or more bubbles of the same color that are adjacent to each other in either x or y direction. Diagonals do not count
  • When a group is picked, the bubbles disappear, any holes are filled with bubbles from above first, ie shift down, then any holes are filled by shifting right
  • A bubble group score = n * (n – 1) where n is the number of bubbles in the bubble group

The first algorithm is a simple exhaustive recursive algorithm which explores going through the board row by row and column by column picking bubble groups. Once the bubble group is picked, we create a new board and try to solve that board, recursively descending down

Some of the ideas I am using include normalized memoization. Once a board is solved we store the board and the best score in a memoization table.

I create a prototype in python which shows a (2,15,5) board takes 8859 boards to solve in about 3 seconds. A (3,15,5) board takes 12,384,726 boards in 50 minutes on a server. The solver rate is ~3k-4k boards/sec and gradually decreases as the memoization search takes longer. Memoization table grows to 5,692,482 boards, and hits 6,713,566 times.

What other approaches could yield high scores besides the exhaustive search?

I don’t seen any obvious way to divide and conquer. But trending towards larger and larger bubbles groups seems to be one approach

Thanks to David Locke for posting the paper link which talks above a window solver which uses a constant-depth lookahead heuristic.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:37:23+00:00Added an answer on May 12, 2026 at 6:37 pm

    According to this paper, determining if you can empty the board (which is related to the problem you want to solve) is NP-Complete. That doesn’t mean that you won’t be able to find a good algorithm, it just means that you likely won’t find an efficient one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running into a mental roadblock here and I'm hoping that I'm missing something
Trying a mental reset here: I tried to create a reliable, persistent stack with
This is a mental excercise that has been bothering me for a while. What
I need a mental process to design an OLAP database... Essentially for standard relational
I'm writing a Java Swing application using the Metal look-and-feel. Every time there is
For some school groupwork, I'm making a Generic Pizza Delivery Everything Management System, and
Recently, I finished reading K&R with its, almost all, exercises and examples. I was
This is similar to my previous efforts ( wordEnds and repeatEnd ): as a
As I understand it, when passing an object to a function that's larger than
I want to be good in Data Structures and Analysis esp. in Java. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.