# Square Spin #1: Sun and Moon

## Defining Square Spin

Lets play a game!

The aim of this game is to transform one image into another using the least amount of moves possible. Here is what a move consists of:

1. You get to pick a square of any size in the grid.
2. You then get to rotate the square around its midpoint as much as you want as long as it fits back into the grid.
3. This is where your move terminates and the resulting image can no longer be modified unless you take another turn.

Here is an example of two valid moves

## Problem #1: Sun and Moon

I'm a little tired after defining the game and it's too bright outside for me to have a nap, can you make it nighttime for me?

Get a 7x7 grid to work with here

Hint 1

What is the main difference between the sun and moon? Is it possible to 'fix' this in a few moves?

Hint 2

Your approach to hint 1 should leave you with a straightforward path to the answer. It will be clear that the answer is only a few moves away and the pieces should fall into place!

• Let me know if this type of puzzle already exists
Commented Apr 12, 2019 at 12:15
• Would of been nice to use black background if you used yellow lines and red. Commented Apr 12, 2019 at 12:49
• When making similar drawings I always use black background because all colors are significantly more visible like that. The alternative is uglier (white background and ugly darker colors). Commented Apr 12, 2019 at 12:53
• @Overmind I recreated the images using your colour scheme and they do look more appealing however against the backdrop of this website it looked a little off. I also have plans to add complications to this puzzle type and that colour scheme may get in the way of that. I've found that adding a black border to the yellow is slightly better, anyway, thanks for the feedback!
Commented Apr 12, 2019 at 14:05
• Various types of gray are also good for sites with white background. They were pretty much a good solution for old forums/boards. Commented Apr 15, 2019 at 5:11

6 (and this is the first time I've run into not hitting the character minimum on an answer)

• Yes it is this amount of moves. What was your process for finding this solution because the hint was referring to an easier route...
Commented Jul 2, 2019 at 16:30
• The hint was just a rephrasing of the question, and I'm not actually mad about it because I wouldn't have seen this question without it. It became obvious that the checkboard pattern wasn't easy to work with, so using turns that made them into lines was most beneficial... like your hint suggested I suppose. Commented Jul 2, 2019 at 16:35
• @Adam does my solution not look like yours? Do you know this is optimal? I was half-expecting you to say that I could still do better. Commented Jul 2, 2019 at 16:51
• It is interesting how this solution is very similar to the intended one in many ways but there is one small difference at move (2). I see the parallels between them. I know it is optimal by logical deduction from the intended solution, I would be shocked if it is possible to do better!
Commented Jul 2, 2019 at 16:55

7?

• Wow, an interesting approach....but (miraculously) there is still a better solution out there! There is a certain logic to this puzzle...
Commented Jun 28, 2019 at 9:18
• I wasn't sure about that, but I've got several more solutions of this length too :p Commented Jun 28, 2019 at 13:46

It can be done in

8 moves.

You start by noting

that the problem has a symmetry. You can split this up into 4 different pieces, where each piece contains 4 colored parts,

as shown in:

Perform these moves on the sun, you can get to the situation:

This action rotates the lower left 2 by 2 block,

to become:

The second move rotates the 2 by 2 block of column 2 and 3 and row 2 and 3 of the selected blue zone.

You now obtain

Repeating this for the next zones will get you to obtain the moon in 8 steps, starting from the sun.

• Good job! However it's possible to do it in less moves believe it or not!
Commented Apr 12, 2019 at 12:44
• I thought so, @Adam. ;) I'll think about it! Commented Apr 12, 2019 at 12:46

Alternative solution with 8 steps:

Rotate the highlighted regions, first the left figure, then the right.

• Great! It is still possible to do better though