Wormeus lives in a labyrinth containing lots of apples. His main ambition in life is to eat as many apples as possible but his nemesis, the evil Pink Lady Stickotaur, has other ideas – if you pardon the terrible cliché!

Wormeus can move up, right, left or down one space and so can the Pink Lady Stickotaur. Neither can move through walls. Wormeus can also eat an apple if it occupies the same square as the apple. After Wormeus makes a move, the Pink Lady Stickotaur takes two turns. The Pink Lady Stickotaur will always move towards Wormeus (unless blocked by a wall), and will favour moving horizontally over moving vertically if both options are available. If she lands on the same square as Wormeus, the latter dies a horrible squishy death.

Wormeus can also delay, granting the Pink Lady Stickotaur two extra turns. Under the right circumstances, this can be advantageous.

Wormeus wins if he can eat all the apples and loses if he dies a horrible squishy death. If neither side can make progress the game is drawn.

Your task is to help Wormeus eat all the apples. enter image description here

As you may have guessed, this puzzle is based on the well-known Theseus And The Minotaur mazes by the American computer programmer and game inventor Robert Abbott (1933-2018). If you are not familiar with these mazes, I recommend you do some homework before trying this puzzle 😊

Further Clarifications:

  • Eating an apple costs a turn. Wormeus cannot automatically eat after moving to a square containing an apple.
  • Eating an apple is never mandatory just because Wormeus occupies the same square as an apple. Wormeus may prefer to move, especially with the Pink Lady Stickotaur in hot pursuit.
  • Wormeus cannot “half-delay” and grant the Pink Lady Stickotaur exactly one extra turn.
  • If Wormeus eats the last apple the Pink Lady Stickotaur cannot use two extra turns to salvage a “draw by mutual checkmate” if you will!

EDIT: Deusovi suggests I remove the optimality criterion since finding even a non--optimal solution isn't entirely trivial. If this puzzle is too easy then I can always pretend it was a warm-up and have an excuse to post similar mazes in future 😊

  • 2
    $\begingroup$ Is there a "nice" way to provably optimize the solution? If not, this seems like it would be more of a programming challenge / "golfing" challenge than a puzzle. I'd recommend removing the optimality mention, and just asking for a way that it can be done at all (because if this is like other Theseus mazes, that's a challenge in itself). $\endgroup$ – Deusovi Mar 26 at 8:06
  • $\begingroup$ Is this [no-computers]? $\endgroup$ – bobble Mar 27 at 4:13
  • $\begingroup$ Yes, I have added a no-computers tag, otherwise finding a solution (without proving optimality) is too easy $\endgroup$ – happystar Mar 27 at 4:59

With the new edit removing the optimization constraint, I'll give it a shot. I am not sure if my solution conforms 100% with the rules, since there are some parts that seem real cheaty but nonetheless obey the rules in my eyes.

First step:

Worm goes right. Lady will move left and up. Worm goes down. Lady will move left only, because moving vertically would actually increase the absolute (eucledian) distance from 1 cell to √2 cells. Worm eats. Lady stays. Worm goes left. Lady stays. Worm eats. Worm goes down. Lady goes down. Worm eats.

The move count at this point is 1 + 3*2 = 7

enter image description here

Second step:

At this point the lady is stuck as long as we stay on row 3 or lower (meaning further down). This means we can eat all apples on these rows (except the one cell where the lady is) without any unwanted initiatives from the lady

Move count is 7 + (21*2 + 2) = 51

enter image description here

Third step:

Worm goes and snacks the two apples on the last column. Doesn't matter when it eats the lower apple, it will always lead the lady to go to r2c5. She's stuck again and we can apply the same principle as before. We can eat the three shown apples.

Move count is 51 + (5*2 + 7) = 68

enter image description here

Forth step:

Prepare for (potentially) outplaying the lady

Move count is 68 + 14 = 82

enter image description here

Fifth step:

Worm goes up. Lady will go up and left. Worm goes down. Lady goes 2x left because according to the rules she always prefers horizontal movement if hor/ver moves decrease the distance the same amount. Now the worm goes to the left. And, again due to her preference for horizontal movement, she will actually go left instead of squishing us. Going left/down in this spot both decrease the absolute distance from √2 to 1 cell. Therefore, both moves are of equal value in her eyes, and she will go with the horizontal one, leaving us a chance to survive.

Move count is 82 + 3 = 85

enter image description here

Sixth step:

Worm goes all the way down, then moves right. Lady will move right and down. Worm goes back left, lady will move left and down. Worm goes back right, lady will move 2x down. Worm goes up, leaving the lady in her current spot at r5c1. Worm goes up, lady goes up. Worm continues to the right for a few cells, then moves down, making the lady move back to r5c1. Worm goes right for 2 cells, then moves down, making the lady move down and right. Worm goes up, lady goes 2x right. Worm goes up, lady goes 2x right. Worm goes up, lady goes 2x up. Worm goes right, lady moves 1x left due to her horizontal preference again.

Move count is 85 + 19 = 104

enter image description here

Seventh (last) step:

At this point the lady is stuck again. We can eat the remaining apples without any incidents.

The total move count is 104 + (5*2 + 5) = 119

enter image description here


With the last stop where the lady is stuck, you can actually opt out of eating the 3 apples on step #3, decreasing the total move count a bit

  • 1
    $\begingroup$ Amazing. Was this just trial and error, or how did you work it out? $\endgroup$ – Vicky Mar 27 at 11:49
  • 1
    $\begingroup$ @Vicky Pretty much trial & error with a bit of intuition, yeah :) $\endgroup$ – Lukas Rotter Mar 27 at 11:57

105-move solution similar to Lukas', check his answer for the reasoning behind the major steps:

lowercase letters are moves, uppercase letters are moves followed by eats, bold sections indicate where the path differs
rDLD4RU3dR2UrRU2 - we'll save the bottom-right apples for the return trip (35 moves)
enter image description here
d2DLDRDL2ULDl2u4r - and take the other exit out of that corner since we're heading left (64 moves)
enter image description here
udld4rlru2r2dr2du3l2 - exactly the same maneuvering here as in Lukas' answer (87 moves)
enter image description here
ULDu2LRRRD - but a slightly different finish since I didn't grab those three apples mentioned in his edit (105 moves total)
enter image description here

  • 1
    $\begingroup$ Well done to Lukas Rotter for finding the important steps and Axiomatic System for finding a 105-move solution which I believe is optimal $\endgroup$ – happystar Mar 28 at 0:58
  • $\begingroup$ Thanks! I could've been earlier but I interpreted the rules incorrectly so my experimentation led me to believe that the important Lady-baiting moves weren't possible. Looking forward to more mazes! $\endgroup$ – AxiomaticSystem Mar 28 at 2:30
  • $\begingroup$ I just noticed one of your diagrams is missing an apple at row 2 column 5, but apart from that it's correct :) $\endgroup$ – happystar Mar 28 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.