Lunar Lockout is a single player puzzle game invented by Hiroshi Yamamoto in 1998 and initially called UFO. It was refined by Nob Yoshigahara and a commercial version has been introduced in 2000. The board for this game is a 5x5 grid on which robots can move. The goal is to move the Red robot (the one with a helmet) to the center. Robots can only move in four directions: Up, Left, Down and Right. Yet, once they start moving they cannot stop until being blocked by another robot. The borders of the board do not block robots: crossing a border is not allowed.
To play, select a starting position and try to find a solution.
The solver evaluates all the possible moves and, for each obtained position, repeats until a solution is found or no new moves can be made. The function that does this is called find_solution()
and is available in src/solver.jl. The file src/boardrobots.jl contains functions that handle the moves.
Instances can be read using read_board()
, the input of this function is a string and it outputs a board that can be used in find_solution()
. The string corresponds to five lines with spaces for representing a empty spots and a number for a robot:
1
for the Red2
for the Orange3
for the Green4
for the Purple5
for the Yellow6
for the Blue
The string
""" 2
3
4
5
1
"""
corresponds to
which is the first challenge of Lunar Lockout!
Instances from one move to be solved to fourteen moves are available in the archive generated_instances.tar.xz.
The challenge 39 is as follows:
The solution proposed in the game needs 15 moves. The solver showed that there exists many solutions that only need 13 moves. An example is given below.
Solution
1: Green - Right 2: Purple - Down 3: Red - Left 4: Orange - Down 5: Yellow - Down 6: Yellow - Right 7: Yellow - Up 8: Yellow - Left 9: Orange - Down 10: Orange - Right 11: Green - Down 12: Red - Up 13: Red - Right- Differentiate steps and moves as described by J. Rausch.
John Rausch - Computer Analysis of the UFO Puzzle - Link