Stylized Inglenook
exit button

Python CAN NOT
be hosted here.


The Inglenook puzzle is a basic train shunting puzzle. The real world problem is to build a train of boxcars in the optimal order for delivery of goods along the train's rout. In the puzzle available boxcars start on two of three sidings.

basic simulator screen

The screenshot at left illustrates the Inglenook puzzle. The color coded boxcars are shown in a random starting order. The colored numbers are in order for the boxcars to solve the puzzle. The colors are in “rainbow order” or the order established by the International Electrotechnical Commission (IEC) for labeling electronic components, etc. (0) Black, (1) Brown, (2) Red, (3) Orange, (4) Yellow, (5) Green, (6) Blue, (7) Violet, (8) Gray, (9) White. (Bad Beer Rots Out Your Guts But Vodka Goes Well.)

At the top, sidings 1 and 2 can each hold at most three boxcars. Siding 3 can hold at most five boxcars. On the right is the head shunt, which can hold at most three boxcars and the switcher/locomotive. The two red switches, or turnouts, are used to connect the head shunt with a siding so cars can be moved between them. A move starts with the switcher in the head shunt and ends when the switcher has returned to the head shunt. At the end of a move rolling stock cannot be sitting on the turnouts.

Setup Screen

When you start the simulator the first screen, at left, lets you configure the simulator. You can choose to watch the simulator solve the puzzle (default) or manually enter moves to solve the puzzle. By default, the beginning order of the boxcars comes from a cookie storing the solution for your last completed run of the simulator (Not implemented). If a cookie is not available the beginning order is randomly selected (shown). You can select to have the boxcars, in-order, in random order, or in user entered order. The resulting order of the boxcars is displayed at the right. The order of the boxcars to solve the puzzle can also be selected; in order (default), in random order, or in user entered order.

Note: The software objects to the beginning and ending order of the boxcars being the same.

Enter a move

When Solving the puzzle manually, options similar to those at right are added to the simulator screen so commands can be entered. Commands are entered from left to right. As options are selected available valid options are adjusted. For example in the beginning with boxcars on siding 2 and 3, and none on siding 1 nor the head shunt (see illustration above);

A link to the Simulator
will go here, later.