views:

63

answers:

1

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

A: 

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
*[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]]*
Amoeba
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