Train shunting puzzles, also called railway shunting, railroad switching, or any variation of these, are transportation puzzles. The goal is usually to move train carts to a specific point on a track while keeping some limitations in mind. Some have a maximum amount of moves, maximum amount of coupling and uncoupling manoeuvres, direction changes, and so on as well.
Train shunting puzzles can vary a lot in terms of both difficulty level and complexity, but more complex puzzles aren't necessarily more difficult. In some cases a complex puzzle means fewer moves you can make, and thus an easier path to the solution.
Standard versions are often those in which you either have to change the location of two train carts, or those in which you have to create a line of carts in a specific order. You can use the locomotive to push and pull the carts to any location you wish, but the tracks are usually build in such a way that careful planning is required.
Some have extra elements as well, like low bridges the carts can't go under, loops too short for a long line of carts, and so on.
Another version requires two trains to pass each other safely, but the tracks are usually designed in such a way that the most straight forward option doesn't work, and careful planning is once again required.
Train shunting offers plenty of adaptation possibilities. The obvious one is to simply have the party face a puzzle with actual trains, but you could use it for security systems, power supply lines, marching armies that have to avoid each other, changing locations of ships, managing warehouses, droid movement paths, and so on.
There's a lot of fun to be had, but it is one of those puzzles that'll require a physical version in some form. A simple drawing should usually be enough, but you could take it a step further by using toy trains for example.
In the example below the aim is to change the positions of the two train carts using the locomotive, but the track itself is a loop broken up by a bridge. Only the locomotive is short enough to pass under the bridge.
The solution, as illustrated below, is as follows:
1. Move the locomotive right, then left toward the blue cart to couple them together.
2. Move backward to the right, then push the cart left to the starting position of the locomotive.
3. Move the locomotive right, then left along the loop. Continue the loop until you can push the dark orange cart. Keep pushing it until it is in the starting position of the blue cart.
4. Go back to the right, then left to couple with the blue cart again. Pull it along the track, then uncouple. Continue going until you meet the dark orange cart.
5. Push the dark orange cart against the blue cart. Then leave them while looping along the track so you end up behind the blue cart.
6. Push both carts into the starting position of the locomotive.
7. Pull the blue cart away from the dark orange cart.
8. Pull the blue cart into the starting position of the dark orange cart, then loop around so you're behind it.
9. Move left to couple with the dark orange cart.
10. Pull it to the right.
11. Push it back along the looping track, into the starting position of the blue cart.
12. Move the locomotive back to its starting position.