A car's number is its home track, and every track ends with as many cars as it started with. A storage track is a dead end, so it works like a stack: only the car nearest the switch can be reached, and the engine's train is a stack too.
- A track is clean when it holds only its own cars. Cars at the bumper end that are already home never move.
- If the front car on the engine belongs on a clean track that still has room, drive there and leave it, with any cars behind it that belong there too.
- Otherwise, if a clean track is waiting for cars, find the closest one of its cars: the one with the fewest cars above it on any track. Pick it up together with the cars above it, so it ends up at the front.
- If the engine is getting too long, or the car it needs is buried in its own train, park the front cars on a track that still has to be cleaned anyway.
- If no clean track is waiting, clean one: pick up the wrong cars above its home cars, starting with the home track of the engine's front car.
- Each visit to a track: throw only the switches that are wrong for the route, drive in, uncouple where the plan says, then back out just past the lowest switch the next route needs.
Fewest visits: every track that holds a wrong car needs at least one visit to take cars away, and every track still missing cars needs at least one visit to leave them. The answer sheet shows that lower bound beside its own count. With one car on every track the plan follows the loops of the shuffle and meets the bound exactly.
Every step of the plan is one move, so its move count is a good answer, not a proven best.