0

I am planning to make a Bubblet game in Java, because I simply love the game.

What can be used as a heuristic for the game? I will make it 30x30 or bigger, and I cannot figure out how to make the computer play the game efficiently...

Can you suggest some idea? Thanks

Moeb
  • 10,527
  • 31
  • 84
  • 110
  • Have you, for a starter, considered looking at the source of the game you link to? Source-Link is at the end of that page. Or do I misunderstand what you want. Are you talking about letting a "bot" playing such a game – jitter Oct 11 '09 at 07:34
  • [sorry, couldn't reply to this earlier] yes, I want a bot to play the game and to play it in the most efficient way. – Moeb Oct 15 '09 at 08:07
  • i want it to be this way: i present a 30x30 puzzle to the computer and my algorithm will tell me the position of the next move so that I can get the maximum possible score at the end of the game **[the maximum possible score for that configuration]** – Moeb Oct 15 '09 at 08:10

1 Answers1

0

I'd try a combination of dynamic programming and parallel programming:

For each dot, hold a score, count itself and the scores of the 4-connected neighbors before it (up and left) (that are already available due to the dynamic programming).

This can be done in parallel in a diagonal line of progress, thus improving performance.

Danny Varod
  • 17,324
  • 5
  • 69
  • 111
  • *[sorry, couldn't reply to this earlier]* **Can you please elaborate how you would implement the dynamic programming part?** the best way I think is actually brute-force [a tree] and I need some method to clip the tree[obviously we cannot use brute force]. I do not understand how you say this can be done. *[i want it to be this way: i present a 30x30 puzzle to the computer and my algorithm will tell me the position of the next move so that I can get the maximum possible score at the end of the game [the maximum possible score for that configuration]]* – Moeb Oct 15 '09 at 08:13
  • For some reason the game won't load for me now, however from what I recall: Use a matrix as the data-structure and calculate a score for each cell, based on the score of the cell above and to the left of it. Iterate diagonally from the top-left corner to the bottom-right corner, calculating all cells in diagonal before proceeding to next diagnol. – Danny Varod Oct 17 '09 at 00:37