See it for yourself

You and the machine start in the same place. Your job is to reach G, the goal.

You choose each of your moves. After every turn, the machine moves to whichever open square looks closest to G.

In Maze 1, the machine's rule works.

In Maze 2, the same rule leads straight into a trap. You can avoid it, but only by starting along a path that looks less direct.