# Wormeus and the Pink Lady Stickotaur

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.

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 😊

• 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).
– Deusovi
Mar 26 at 8:06
• Is this [no-computers]? Mar 27 at 4:13
• Yes, I have added a no-computers tag, otherwise finding a solution (without proving optimality) is too easy 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

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

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

Forth step:

Prepare for (potentially) outplaying the lady

Move count is 68 + 14 = 82

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

Sixth step:

Move count is 85 + 19 = 104

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

Edit:

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

• Amazing. Was this just trial and error, or how did you work it out? Mar 27 at 11:49
• @Vicky Pretty much trial & error with a bit of intuition, yeah :) 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)

d2DLDRDL2ULDl2u4r - and take the other exit out of that corner since we're heading left (64 moves)

udld4rlru2r2dr2du3l2 - exactly the same maneuvering here as in Lukas' answer (87 moves)

ULDu2LRRRD - but a slightly different finish since I didn't grab those three apples mentioned in his edit (105 moves total)

• Well done to Lukas Rotter for finding the important steps and Axiomatic System for finding a 105-move solution which I believe is optimal Mar 28 at 0:58
• 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! Mar 28 at 2:30
• I just noticed one of your diagrams is missing an apple at row 2 column 5, but apart from that it's correct :) Mar 28 at 7:07