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.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2017 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+