Penrose's Train Challenge

For a description of railroad mazes, see the Demonstration "Penrose's Railway Mazes". The train must go from the start (S) to the finish (F). The train can move only in the forward direction, following the curvature of the track. No sharp turns are allowed.
While "Penrose's Railway Mazes" gives you the solutions, it is not interactive; the present Demonstration helps you to find the solution by hand with mouse clicks.
No paper and pencil are necessary: here you can solve the puzzle yourself by clicking the green dots in the right sequence, while the system checks that your train does not make any sharp bends.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


How to Use this Demonstration
The train starts at the red dot.
You select the next curve (part of the rail track) by clicking close to a green dot. If the move is valid, the train is marked by a new red dot, its previous position is orange, and all other visited dots are yellow.
Text Messages
If you make an illegal move, you get a "not allowed!" message on the graphics screen, and your last click is ignored.
If you reach your destination (marked by a capital "F"), you get a win message.
The System Knows
How does the system know when you made a wrong move?
Every green point has a sequential number. Select "show numbers" to see these numbers.
The system checks whether you made a valid move by finding the triple of the last three point numbers in a database of all allowed triples.
Click "take back" to undo your last step.
Click "save" to store your partially solved path.
Click "restore" to load the stored path.
Click "markers" to switch off the display of the green markers.
If "markers" is selected, you can click "numbers" to see the sequential numbers of the green points.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.