Skip to content
One Quick Try

Traffic Jam Puzzle

Slide the cars and trucks along their lanes until the red car can drive out.

Type
Logic
Takes
about 2-6 min
Result in
moves

Traffic Jam

~2-6 min

  1. Cars and trucks fill the lot. Each slides only forwards or backwards.
  2. Drag them to clear a path for the red car to the exit on the right.
  3. 12 levels, from 4 to 38 moves at best. Your moves are compared with the fewest possible.
Level

Keyboard: Tab to a vehicle, then use the arrow keys.

Your result: — moves

How it's measured
  • Sliding Puzzle

    Slide the tiles back into order.~2-5 min
  • River Crossing

    Get everyone across the river safely.~2-5 min
  • Tower of Hanoi

    Move every disk in the fewest moves.~1-5 min
  • Water Jug

    Measure an exact amount with unmarked jugs.~1-4 min
  • Lights Out

    Turn off every light. Each press flips its neighbors.~1-3 min
  • One Line

    Draw every line once, without lifting.~2-4 min

How does the traffic jam puzzle work?

Cars and trucks are packed into a 6×6 parking lot. Each one can only slide forwards or backwards along its own direction, never sideways and never through another vehicle. Drag them to clear a path for the red car to the exit on the right of its row. With a keyboard, Tab to a vehicle and slide it with the arrow keys.

How is your result calculated?

A move is one vehicle sliding, however far it goes. Moving the same vehicle again straight after counts as the same move, because it could have gone there in one slide. Your result is your number of moves, compared with the fewest possible for that level, and your time from your first move.

How do you know the fewest moves?

By trying everything. A computer can list every position a lot can reach and find the shortest way out with a breadth-first search: first every position one move away, then two, and so on until the red car escapes. There are 12 levels here, needing 4 moves at best for the first and 38 for the last, and the site's tests run that search on every level each time the site is built.

The puzzle was invented by Nob Yoshigahara and has been sold since 1996 as the board game Rush Hour. A computer search by Sébastien Collette, Jean-François Raskin and Frédéric Servais through every possible 6×6 starting position found that the hardest needs 93 moves.

How do you solve traffic jam puzzles?

  • Work backwards from the red car. Note which vehicles stand in its way, then what is blocking each of those, and so on. That chain is your plan.
  • Trucks are the hard part. A truck across the exit row usually has to go all the way up or down, so check early whether there is room for it.
  • Make space before you need it. Moves that look useless, like pushing a car into a corner, often open the lane you need three moves later.

For another puzzle about sliding pieces, try the Sliding Puzzle; for a puzzle about getting everyone across, the River Crossing Puzzle.

Questions

What counts as one move?
One vehicle sliding any distance. Sliding the same vehicle again straight after is counted as part of the same move.
Is this the same as Rush Hour?
It is the same kind of puzzle, with levels made for this site. Rush Hour is the board game, invented by Nob Yoshigahara and sold since 1996.
What is the hardest traffic jam puzzle?
A computer search of every 6×6 starting position found that the hardest needs 93 moves. The last level here needs 38.
How are the fewest moves worked out?
By a breadth-first search through every position the lot can reach, which finds the shortest way out. The site's tests repeat it for every level.
Can vehicles turn or move sideways?
No. Each car or truck only slides forwards and backwards along the direction it faces.