If the only point of the values is to have red and blue equal, then this rule is irrelevant as the other square suffers an equal penalty. This should simplify things quite a bit.EDIT: After thinking about it more, I'm pretty sure the only thing that matters is edge vs corner vs middle; the rest of the positioning balances out.EDIT2: Based on this, a solution is impossible for the following example "random" starting position:

It is symmetric, any map where the isn't at least one field where it and its mirror have the same color can just be mirrored (and that applies horizontally and vertically). And if two halfs are mirrors of each other the result must be correct. It is rather easy to make a layout with many solutions based on that:

Now you can exchange any b from the left 2x2 block with any r from the right 2x2 block and you get another valid solution, 4 from just exchanging one, 6 if you exchange two, exchanging three is just exchanging two and mirroring so 4 again, and four is just mirroring. There are many with many solutions.

Thank you very much for your comments.The puzzle is derived from a game I designed recently.Is an abstract 2 players game with few rules (2 exactly).To avoid mirroring effect there is another variant of the puzzle where the tiles are numbered :For each color :2 have a multiplier 12 have a multiplier 22 ....................32 ....................4

So we pick randomly 4 from each color (example : red 1,2,1,4 blue 2,2,3,3) and we place them randomly on the grid.The same rules apply (8 red 8 blue and sum red=sum blue at the end when the board is full).My question remain the same : can an average human being solve it using logic and clicking on the color chosen and the cell chosen? I assume that a program does the computation of the scores blue and red in real time.I suppose that yes human being could solve it. Easily or with big headache I do not know.More or less difficult than Sudoku for example?

The puzzle is that basic one. The goal was to present the principle and the main mechanism.A grid 6x6 will be maybe hard (with multipliers 1,2,3,4,5,6) for human being and even for a computer (with AI).

Goahead52 wrote:Thank you very much for your comments.The puzzle is derived from a game I designed recently.Is an abstract 2 players game with few rules (2 exactly).To avoid mirroring effect there is another variant of the puzzle where the tiles are numbered :For each color :2 have a multiplier 12 have a multiplier 22 ....................32 ....................4

So we pick randomly 4 from each color (example : red 1,2,1,4 blue 2,2,3,3) and we place them randomly on the grid.

This is interesting, but from the perspective of red score = blue score adding +4 to adjacent red tiles is equivalent to -4 to adjacent blue tiles, so positions of the same type (corner/edge/middle) remain interchangeable. Still, the multipliers probably at least make it possible to make up for unbalanced corners with an unbalanced middle, increasing possibilities greatly.

I agree that you will probably have unsolvable configuration.But if you start by filling a grid 4x4 (with multipliers and colors) such as : sum blue=sum red red and 8 blue 8 red) using a program player will need to solve a puzzle which have ONLY one solution.There an "infinite" (I mean huge number) number of configurations admitting only one solution.In a grid 6x6 which is the one I recommend for expert levels it will be harder then Sudoku for example.My goal is to give to any programmer the way to produce his own puzzle using some algorithm and to try to solve it using his brain.

I will post the 2-players abstract game using this mechanism.I can assure you that it is deeper than go game and chess game combined.It is played on hexhex board (37 to 179 hexes).37 hexes is for beginners.

The official scores of it are red: -13 blue: -13 if I added it up correctly.In order to narrow down the possibilities I had to guess the first two tile placements. After that the remaining six were obvious. Clearly there are simple variations where you switch two edges or similar, but I wonder if a different guess would have led to a truly different solution.EDIT: After thinking about it more, I believe there are no meaningfully different solutions, and the puzzle could have been solved without guesswork.

Thank you for your comments.Finally after thinking I decided to change the puzzle by renaming it :"Target".I generate randomly a grid 4x4 filled with 8 blue and 8 red with its multipliers (1,2,3,4).I compute the score of the blue and the score of the red :sum red = a sum blue = b

I publish randomly 4 blue tiles and 4 red tiles and the puzzle will then have as goal to find the 4 remaining red tiles + the 4 blue tiles such as their sums sum red = a and sum red = bIn such case it is highly likely that there is only one solution.We could anyway choose carefully the 8 non published such as there is only one solution by computing all the possibilities.This kind of solitaire puzzle could be generated by a program such as the player does not know the solution.You wake up you take your coffee you run your program and then you have a puzzle burning-brain to solve.You could train on 4x4 and then face 6x6 grid or 8x8 grid and so on.Good luck

Instead of having 2 different sums (one for red and one for blue) we consider only one sum which is obtained by adding the red sum to the opposite of the blue sum, the target we aim for being 0. A red square will add its multiplier to this sum for every adjacent square of his, regardless of its color, while a bluesquare will add -(its multiplier).So there are only 3 relevant zones: corner(with 3 adjacent squares), edge(with 5 adjacent squares) and middle(with 8 adjacent squares).If a=the sum of the multipliers of the corner squares(blue multipliers have negative value) after the table has been completed, b=same for the edge squares, c=same for the middle squares, we have this system:

and because b is integer it means a can be divided by 3.For the case with no multipliers and a 2nx2n grid the only possible values for a are:{-4,-2,0,2,4}. Since only 0 can be divided by 3 this means a will always be 0 in any solution, therefore b and c will also be 0.So for the general case without multipliers all you have to do is make sure the number of blue squares is equal to the number of red squares for any of the 3 zones. If you can't do this there are no solutions.

The positive numbers represent the blue tiles with their multipliers The negative numbers represent the red tiles with their multipliers.

If we sum them :Blue = -5 (minus 5)Red = -3 (minus)

So a=-5 and b=-3 are the target we have just to remove from the board 4 negative values and 4 positive values.Now The player then will have to find the removed values such as sum blue =-5 and sum red =-3Depending on which 4 negative and 4 positive value the scores of blue and red will be different.

As an example :

? 3 ? ?-2 4 ? -4? -4 -1 41 ? ? ?

Sum blue = -11Sum red =-5

The player needs to fill the squares with "?" by their color and their multipliers.