# The Hand of God

This puzzle is dedicated to the great Diego Maradona.

Maradona has the ball and is going for an amazing run. He must get around all his opponents and score the ball into the goals (gray cells). At each turn he can do the following:

• Move into one of 8 neighboring empty cells.
• Move into the neighboring cell with the ball. This will push the ball into its neighboring cell in the same direction, provided that it is empty. If the ball's neighboring cell is not empty then the move cannot occur. For example, currently Maradona cannot move up.

Maradona cannot move outside the grid and his opponents do not move (they are too slow to react!). What is the least number of turns required for Maradona to score?

• Would you call this an [optimization] problem? Dec 9, 2020 at 1:57
• probably not as there are not that many possibilities and they can be all checked by hand Dec 9, 2020 at 2:02
• Sokoban and I don't see any reference to the "hand"... Dec 9, 2020 at 8:47
• en.wikipedia.org/wiki/The_hand_of_God Dec 9, 2020 at 8:59

## 3 Answers

I can find

four paths with 12 moves

where the paths are (describing the ball's movement in NSEW; Maradona's moves are implied between direction changes, where he has to move without moving the ball)

W - N - NW - N - NE - NE - NE (five direction changes with +1 move each),
W - N - NW - N - N - N - NE (same as above),
W - N - N - NE - NE - NE - NW (four direction changes but NE-NW requires +2 moves), and
W - N - N - NE - NE - NW - NW.

I observed that

Maradona can't pass through the right side, so the only possible paths are through the left side of group of 3 defenders, or through the middle by moving NE.

Also

the starting move must be moving the ball in W direction, and six more moves are needed to move the ball forward, and we can't avoid having at least four direction changes. I don't have a nice proof that 12 moves is the minimum, but for all paths I tried so far, paths with four direction changes (turns) all required a turn with +2 moves, and the others required five turns.

• well done for finding all solutions Dec 9, 2020 at 9:00
• Why do these cost 12? Dec 9, 2020 at 12:14
• A turn is a movement of Maradonna, not a change of direction of the ball. Dec 9, 2020 at 13:18
• NW counts as 2? Dec 9, 2020 at 13:19
• For those that prefer visuals, here is a map of the four equally optimal ball paths (Maradona's path not included). Dec 9, 2020 at 13:53

If I undersood the rules correctly, 9 turns.

1. Goes W alone
2. Goes NE with the ball
3. Goes NE with the ball
4. Goes N with the ball
5. Goes E alone
6. Goes N with the ball
7. Goes N with the ball
8. Goes E alone
9. Goes NW with the ball - scoring move.
• A turn is a movement of Maradonna, not a change of direction of the ball. Dec 9, 2020 at 13:19
• You can't go N with the ball at turn 4 since the ball is at NE direction, not N. You can move the ball only by moving into the ball. Dec 9, 2020 at 13:30

It's 6 moves. NW NW N N N NE

All moves are with the ball.

The other answers are spending moves making maradona move without the ball but it don't see the point. There's nothing specifying maradona can't move diagonally, while the ball also moves diagonally. He can move into 8 neighboring cells and the ball can do the same.

Edit: Observing that maradona can "Move into the neighboring cell with the ball. This will push the ball into its neighboring cell in the same direction, provided that it is empty." This means that maradona can move NW on first move, and the ball also moves NW

• No he must move into the cell that contains the ball. Dec 10, 2020 at 11:41