# How to use Mathematica to help me get highest score in every layout? [closed]

The game is hitting the headline in these day and everyone can click this link to play it.The game have a very simple rule like following:

Game Rule

• It will give you a initial layout when you click "重新开始".

Every layout have five color.

• When you click a rectangle adjoining(Up,Down,Left,Right) other $n$ rectangles each other except $n$ equal to 1,you will get $n*n$ scores,and these rectangles will eliminate simultaneously.

Such as you have a this initial layout

You click this rectangle arrow to point out

You'll get $5*5$ scores and eliminate these rectangle

$\rightarrow$

Or another exmaple

$\rightarrow$ $\rightarrow$ $\rightarrow$

• If a inteval between the columns appear,the right columns will move to left to patch it.

So how to use Mathematica to guide us to get highest score in every initial layout?

• @Kuba Red+Blue?No they cannot be added.Just a same color and they adjoining each other.Then you can get score.
– yode
Apr 27 '16 at 12:57
• I do not follow links to sites I don't know and trust. Question should be self-contained. Apr 27 '16 at 13:03
• @m_goldberg It surprised me.Have a such rule we cannot give a Chinese link but a American link in SE?Anyway I will give a specific directions for these game.
– yode
Apr 27 '16 at 13:09
• There are at least two questions here, both fairly complicated. One is about how to program the game and the other is about how to program a strategy for the game. Clearly the first must be answered before the second can be attempted. How about if you do the first part -- then others might be more interested in attempting the second. Apr 27 '16 at 13:56
• Yode, it seems to me that this is far too complicated a project for this format. As bill said, your question requires tons of work on the part of the responder. This is NOT just about implementing an existing strategy in Mathematica, but really about FINDING such a strategy first. Unless you can propose an algorithmic approach to be implemented and a test system on which to test it (e.g. a Mathematica implementation of that game), I don't think this is an appropriate question, and I am voting to close it. Apr 27 '16 at 15:05