# Elementals and Aliens

## Rules/Story

• You have been kidnapped and locked in the maze under the bathhouse you work at by 5 aliens: a Mercurian, Venusian, Martian, Jovian, and Saturnian.

• Currently, the aliens are spread through the maze, doing various tasks, with no-one patrolling the maze. They aren't moving or paying much attention to their surroundings.
• You can't pass any of the aliens' tiles without the right elemental.
• When you pass an alien with the right elemental, it is removed from the game and is no longer there.
• You know the layout of the maze, and that there are 5 elemental creatures in it the pyrausta, wobbling, creeper, automaton, and gnome.

• These are used as guards, and will follow and defend you once you have their attention.
• Currently, they have been set to guard some of the important storage rooms. None of the elementals move, and they will always be on their start tiles.
• You get each elemental by moving onto its tile.
• If your knowledge of alchemy is correct, then each elemental will kill one of the aliens:

• The pyrausta kills the Mercurian.
• The wobbling kills the Martian.
• The creeper kills the Saturnian.
• The automaton kills the Jovian.
• The gnome kills the Venusian.
• One complicating factor is the energy gates.

• When going through an energy gate, any elementals that you have are transformed and changed into another elemental. The transformation should go pyrausta > gnome > automaton > wobbling > creeper > pyrausta.
• When you use an energy gate, it becomes a wall and cannot be reused or gone through again.
• While you have been bound and gagged, you can still crawl along and attract the attention of the elementals if you're near enough. You can move one tile orthogonally, or left/right/up/down, per move.

## Map

Here is a map of the maze. The capital letters are the elementals, the lowercase letters are the aliens (Martian is t), @ is your starting position, % is the gates, = is the exit, and # is the paths that you may walk through.

       C
####j#=
m v
A############
%         #
###  W    t
G s####%###
#   P
@


## Puzzle

What is the fewest number of moves (going orthogonally from tile to tile) to get out of the maze? The goal is to reach the exit, without going through an alien without the right elemental or going through an energy gate twice.

• Aug 4 at 20:51
• Penpa Link Note that for simplicity, I have renamed the elementals to be the capital initial letters of their corresponding monsters for clarity. All the other notations are left unchanged (unless I made a mistake) Aug 5 at 12:19
• What is your definition of using an energy gate? Transforming an elemental or just passing through it? If I pass through an energy gate empty handed, does it still disactivate and get sealed off? Aug 8 at 20:11
• @Ankit Moving through a gate activates it, regardless of the elementals in your possession. Any such are transformed, according to the rule. Aug 8 at 20:32

An alternative map:

  5
####C#X
A B
3############
G         #
###  4    D
2 E####G###
#   1
S


Here, the elementals are numbered 1-5 in transformation order, and are paired to the aliens they slay in the usual way (A1, B2, C3, D4, E5); S, X, and G denote the start, the end, and the gates.
The starting point is now obvious:

The starting point is boxed in by D and E, and you can only grab elementals 4 and 1 before exiting the section between them. You can't slay D, because he's on the other side of the gate - 4 would become 5. So the only option is to grab 4, enter the gate, then turn around and slay E.

You are now carrying elemental 5, and are forced to pass through the next gate, which will turn it into 1 and let you kill A.* However, you must also kill C, and you have two options:
- Grab 2, and transform it in the second gate.
- Grab 3.
The former is a one-cell detour and the latter is two, so the first choice is the better one. All told, S-4-G-E-2-G-A-C-X takes 3+3+5+4+2+2+5+2 = 26 moves.

*[Edited to flesh out this reasoning more convincingly] After the forced moves leading to the second gate, the situation is as follows: Both gates are locked, you're carrying a used 1, and possibly a 3, and the level contains an available 3, a 5 behind A or B, and a 1 behind D (which you couldn't grab earlier due to backing out of the first gate). Since no more transformations are possible, the 1 behind D is unobtainable - since no 2's can be obtained, the only way forward must be the used 1.

• I didn't realize that elementals are reusable. If so then well done! Aug 9 at 2:53

This answer is currently incorrect due to me misreading the problem. I will update it asap.

30 moves

## The path

Step 1:

go to wobbling (1-3)

Step 2:

go to nearest energy gate and convert the wobbling to a creeper (4-6)

Step 3:

going back the way you came from, go to Saturnian and kill it with your creeper (7-11)

Step 4:

go to the gnome (12-15)

Step 5:

go to the nearest energy gate and convert the gnome to a pyrusta (16-17)

Step 6:

go to the automaton (18-20)

Step 7:

go to the mercurian and kill it with your pyrusta (21-23)

Step 8:

go to the jovian and kill it with your automaton (24-28)

Step 9:

go to exit (29-30)

• The gnome turns into an automaton, not a pyrausta Aug 8 at 19:55