Ghost

Your only helper is a recording of your own earlier attempt, replayed beside you as you go. Every run is kept and comes back for the next one, so the ghost you are racing is yourself, a minute ago.

How to play

The gate stays open only while somebody is standing on the plate, and there is only ever one of you — hence two runs.

  1. Run one: walk to the plate Take the shortest sensible route and STOP there. The ghost will hold the plate from that moment on.
  2. Rewind Press the button. You return to the start; the ghost begins replaying.
  3. Run two: take the gate Wait until the ghost has reached the plate, then walk through the open gate to the flag.
Full instructions

In depth

Cooperating with your own recording to crack the vault

Ghost is a puzzle about planning two runs through a maze. You walk it once, rewind, and then a ghost of your first run replays beside you. This guide explains the mechanics, the controls, and how to plan both runs so nothing is wasted.

Screenshot: How to play Ghost
How to play Ghost as it appears when the page opens.

The two searches that decide a vault's par

A vault starts as random rubble and then has to survive a set of tests. Walls are scattered first. On a Small board each square has a 14 in 100 chance of being a wall, Medium uses 16 in 100 and Large uses 18 in 100. Over a whole board that averages about five walls on the 6 by 6, near eight on the 7 by 7 and near twelve on the 8 by 8.

The open squares are then shuffled, and the first three off the pile become your start, the flag and the plate. Two quick tests come next. A board with fewer than six open squares is dropped. So is one where the flag sits less than three steps from the start.

Now the part that makes the puzzle a puzzle. The gate has to be a square that genuinely cuts the flag off, or a second pair of hands would never be needed. Hoping a random square does that almost never pays off, so the builder tests candidates one by one. It marks a square as a wall and asks whether the flag can still be reached. Squares that seal the flag away go on a short list. The builder stops as soon as it has four of them and picks one of the four at random. An empty list means the board is dropped.

Two step counts follow, both from a flood search that spreads outwards one square at a time. The first is the walk from the start to the plate with the gate treated as a wall. Call that number L. It is your whole first run, and a board where L is under two is dropped. The second search covers run two, and it carries a clock. Stepping onto the gate square is refused while the clock reads less than L, because L is the moment the ghost arrives at the plate and holds it. Par is the two numbers added together.

That second search does not need to know every moment separately. Before L the gate is shut and after L it is open for good, so it folds all the later moments into one state per square. It also abandons any route past 80 steps. The finished vault is kept only if par comes out between 6 and 50. Below 6 it is not worth playing and above 50 it is a slog, so the builder throws it away and starts over, up to 300 times. Your allowance is par plus the slack for the size: 6 spare steps on Small and Medium, and 5 on Large.

  • Fewer than six open squares on the board: dropped.
  • Flag under three steps from the start: dropped.
  • No square anywhere that seals the flag off: dropped.
  • Plate under two steps from the start with the gate shut: dropped.
  • No run two that reaches the flag at all: dropped.
  • Par under 6 or over 50: dropped, and the builder shuffles a fresh set of walls.

A small vault counted out, and the one step the count gets wrong

Here is a board the builder could hand you on Small, with the rows numbered 1 to 6 from the top and the columns 1 to 6 from the left. Column four is a solid line of walls apart from a single hole at row three, and that hole is the gate. Your start is row 1, column 1. The flag is row 1, column 6. The plate is row 6, column 1. That is five walls, which is what a 6 by 6 board averages.

Walk it with the gate open and the flag is 9 steps away. Brick the gate up and the flag cannot be reached at all, so the gate passes the cut test. The plate is 5 steps straight down column one, and none of those squares is walled, so L is 5. The run two search then goes 5 steps to the gate and 4 more to the flag, which is 9. Par is 5 plus 9, or 14. The allowance is 14 plus 6, so you get 20 steps for both runs.

In play it does not come out at 14, and the reason is worth knowing. The gate test runs before the ghost takes its step, so it reads the ghost's position from your previous move. The ghost is only on the plate once you have made L moves, which means the gate first lets you in on move 6, not move 5. On this board move 6 is impossible. The only square on your side that touches the gate is row 3, column 3, and it is 4 steps from the start. Add a square's row and column together and every step flips that total between odd and even. Row 3 column 3 adds to 6, an even number, exactly like your start, so you can only stand there after an even number of moves. Entering the gate from it therefore lands on move 5, 7 or 9. Move 5 is refused, so 7 is the real answer.

So the honest count is 4 steps across to row 3 column 3, one step off and one step back to burn a move, then the gate on move 7, then 4 more to the flag. Run two is 11 and the true best total is 16, two above the 14 the game prints. You still finish comfortably, because the allowance is 20. The message at the end will tell you the shortest was 14, and on a board like this that is a step or two optimistic.

  • Par can read low. It happens when the fastest route reaches the gate exactly on step L. Running the game's own two rules over a few hundred vaults, roughly one board in four came out that way, and the real best was two steps above the printed par.
  • The clock is measured in your steps, not in seconds. The ghost only moves when you move, so you can stare at the board as long as you like. There is no wait move though. You cannot stay on your square, so killing one step means stepping off and back, and that costs two.
  • You can open the gate for yourself. The test also passes if you are standing on the plate, and it runs before you leave it. If the plate happens to sit right beside the gate, you can hold it and step through in the same move, with no ghost involved.
  • One rewind, no undo. The rewind button only works during run one, and there is no way back once you have used it.
  • Reaching the flag with your last step still wins. The finish test runs before the out of steps test, so spending step 20 of 20 on the flag is a win, not a loss.
  • One best score covers all three sizes. It is filed under the game's name alone, not the name plus the vault size, so a tidy Small run sets the bar your Large runs are then measured against. Lower is better and it is shown as a plain step count.
  • The builder can run out of patience. If all 300 attempts fail it prints a par of 12 and hands over the last board it built, which may not be solvable. Wall counts this low make that very unlikely, but it is what the code does.

The puzzle in a nutshell

A vault is laid out as a grid of squares. Some squares are walls. Somewhere on the grid is a plate, a gate, and a flag. The gate blocks the only route to the flag. The gate opens only while somebody is standing on the plate. There is only one of you.

You get two runs. Everything you do on the first run is recorded. When you press Rewind, you go back to the start and a ghost sets off from the same square, repeating your first run step for step. When its recording ends, it stands still wherever it stopped. If the ghost is standing on the plate, the gate opens and you can walk through it to the flag on your second run.

How the two runs work together

The first run is not an attempt to reach the flag. It is you writing instructions for a helper who cannot think for itself. Walk to the plate and stop. That is it. The ghost will follow those exact steps later and hold the plate while you take a different path to the gate.

The second run is the real attempt. You start back at the beginning. The ghost starts at the same time, replaying your recorded steps. It reaches the plate on exactly the step you did during run one. Until then the gate is shut. Once the ghost arrives at the plate, the gate swings open and stays open for the rest of the run.

Both runs draw from the same step budget. A longer first run leaves fewer steps for the second. This is the core tension: you want the first run as short as possible so the ghost reaches the plate quickly and you have room to manoeuvre.

Controls for moving and rewinding

Use the arrow keys or WASD to move one square at a time. On a phone or tablet, tap the square you want to move to. You can only move to squares that share a side with your current square and are not walls.

The Rewind and run again button ends run one and starts run two. Press it when you are standing on the plate. A dropdown labelled Vault lets you pick Small, Medium, or Large, which sets the grid to 6, 7, or 8 squares across. Press New game for a fresh vault at the chosen size.

The stats bar shows which run you are on, whether the gate is open or shut, and how many steps you have left. The gate status updates in real time as the ghost moves.

Why timing is everything

The ghost reaches the plate on exactly the same step number you did during run one. If you took ten steps to get to the plate, the gate opens on step ten of run two. Not step nine. Not step one. Step ten.

This means you may need to wait near the gate during run two. If the path from the start to the gate is shorter than the path from the start to the plate, you will arrive at the gate before it opens. Every step you spend waiting is a step from your budget. Plan so you arrive at the gate on the same step the ghost reaches the plate, or just after.

If you took too long on run one, you might not have enough steps left for run two at all. A wandering first run punishes you twice: it wastes steps and it delays the gate.

Planning run one

Before you move, look at the board. Find the plate, the gate, and the flag. Work out the shortest path from your start square to the plate. Count the steps in your head. Now work out the shortest path from the start to the gate and then to the flag.

Your first run should follow the shortest route to the plate and then stop. Do not explore. Do not loop. Every extra step is a step the ghost will also take, delaying when it arrives at the plate and eating into your budget.

A common temptation is to walk past the plate to scout the board. Resist it. The ghost replays every step. If you walked five squares past the plate and then back, the ghost will do the same. It will not reach the plate until ten steps after it needed to.

Planning run two

Once you press Rewind, the ghost begins its replay. You need to get from the start to the gate, but you cannot pass through the gate until the ghost is on the plate. If the route to the gate is shorter than the route to the plate, you will arrive early and need to wait. If it is longer, the gate will already be open when you get there.

The ideal run two goes straight to the gate, arrives just as it opens, steps through, and continues to the flag. Walls may force you to take a longer path, so plan around them. Sometimes the shortest route from start to flag goes through a corridor that passes near the gate. Other times you need to loop around.

On larger vaults the layout is more spread out and the walls create more dead ends. Read the maze before you move. Trace a mental path from the start through the gate to the flag, and count whether you have enough steps.

The step budget and par

Every vault has a par: the smallest number of total steps across both runs needed to win. The game gives you a few extra steps beyond par as a cushion, but the margin is not large.

When you finish, the game tells you how many steps you used and what the par was. Beating par is not possible since it is computed by a search that finds the true shortest path. Matching it means you played perfectly. Coming within two or three steps of it is a good result on a hard vault.

Your score is the total number of steps used. Lower is better. The best score for each vault size is saved in your browser.

Mistakes that sink a run

  • Pressing Rewind before you reach the plate. If the ghost's recording ends before it reaches the plate, the gate never opens. You have lost the run.
  • Walking past the plate on run one. The ghost will repeat every step, including the overshoot. It reaches the plate late, burns your budget, and delays the gate.
  • Running to the gate before it opens. You cannot pass through a shut gate. You will have to wait in front of it, spending steps.
  • Taking a long detour on run two. The budget is tight. Every extra step counts. Follow the most direct path to the gate and then to the flag.
  • Ignoring the step counter. The stats bar tells you how many steps you have left. If you are running low, you may need to abandon a cautious route and take the most direct one, even if it feels risky.

Vault sizes and difficulty

Small vaults are 6 by 6. The plate, gate, and flag are close together and the paths are short. Most vaults can be solved by simply walking straight to the plate, rewinding, and walking straight to the flag through the gate. The slack is generous.

Medium vaults are 7 by 7. Walls start to create real obstacles and the plate may be on the far side of the board from the gate. You will need to think about timing, not just direction.

Large vaults are 8 by 8. The board is big enough that running out of steps is a real threat. The par is often well into the twenties, and the slack is tighter. Scout the board carefully with your eyes before you move.

The whole game stays on your machine

Every vault is generated in your browser. No data is sent anywhere, no account is needed, and your best scores are stored in local storage on this device. You can play offline once the page has loaded. Closing the tab leaves nothing behind.

Help

How to play Ghost

The gate stays open only while somebody is standing on the plate, and there is only ever one of you — hence two runs. Press Rewind and the vault resets while a copy of your first run sets off alongside, repeating your steps exactly. When its recording runs out it stands still wherever it finished, which is how a plate gets held down. Reach the flag on the second run.

Run one: walk to the plate

Take the shortest sensible route and STOP there. The ghost will hold the plate from that moment on.

Rewind

Press the button. You return to the start; the ghost begins replaying.

Run two: take the gate

Wait until the ghost has reached the plate, then walk through the open gate to the flag.

Mind the total

Both runs come out of the same step budget, so a wandering first run costs you the second.

Why every vault can be robbed

Two things are checked before a vault is offered. First, the flag must be genuinely unreachable while the gate is shut — if there were a way round, the ghost would be pointless — so the gate is temporarily treated as a wall and the flag must be cut off. Second, a route must exist once it opens: the search works out how many steps it takes to reach the plate, then searches the second run with the gate forbidden until that step has passed. Only vaults passing both are used, and the par is the two runs added together.

Good to know

Finish run one standing still

The ghost holds its last position forever. Ending on the plate is the whole trick; ending one square past it is useless.

Count the ghost’s steps

It reaches the plate on exactly the step you did. If you took eight steps, the gate opens on step eight of run two and not before.

A short first run is a good first run

Every wasted step on run one is a step you do not have on run two, and it delays the ghost as well.

You can stand on the plate yourself

It works, but then you are not going through the gate. Useful for checking where the gate is, not for winning.

Common questions

Does the ghost copy me exactly?
Step for step, in the same order, starting from the same square. It cannot improvise.
What does the ghost do when the recording ends?
It stops and stands there for the rest of the run, which is exactly what makes it useful.
Can the ghost and I be on the same square?
Yes, it passes through you. It is a recording, not a person.
Can I rewind more than once?
No, there are two runs. Press New game for a fresh vault.
What if I never reach the plate on run one?
Then nothing holds the gate and the second run cannot finish. Rewinding early is usually the mistake.