On each corner of a square is a quarter. Your task is to have all four quarter heads-up or tails-up at the end of a turn.

You are blindfolded at the start, and you do not know which are heads-up and which are tails-up. Each turn, you may flip however many of them you want and then ask if you are done (and no, you cannot tell, by touch, whether it is heads- or tails-up). The square is then rotated a random, undisclosed number of quarter spins (multiple of 90 degrees), and you may take another turn.

Minimize the maximum number of turns required to be assured you will complete the task.

There are only 4 distinct arrangements of coins, ignoring rotation and head-tail symmetry (in other words, interchanging T and H below is considered the same arrangement). They are (reading clockwise around the square):

(A) HHHT (1 different than the rest)

(B) HHTT (2 of each with matching coins adjacent)

(C) HTHT (2 of each with matching coins diagonally opposite)

(D) HHHH (solved)

Consider the following 3 "moves":

(1) Flip one coin.

(2) Flip two adjacent coins.

(3) Flip two diagonally opposite coins.

The puzzle can be solved in 7 steps, maximum, as follows:

3,2,3,1,3,2,3

Proof:

Let's assume we're in state B or C. Then the move sequence 3,2,3 will solve it because: If we're in state C, move 3 solves it immediately, but leaves state B in state B. We proceed with move 2, which moves us to state C, then 3 again which solves it.

If we started in state A, moves 2 and 3 each leave us in state A, so by the 4th move we're still in A. The fourth move, 1, moves us into either state B or state C, and moves 3-2-3 will reach state D as described above.