πŸš‚ Single Siding β€” sort the train, beat the exact optimum

Incoming train β€” cars arrive left to right; the highlighted car is next

Siding (stack) β€” last car in is first car out; the highlighted car is on top

Output track β€” must leave in ascending order 1, 2, 3…

A car may only leave to the output track if it is the next number needed (output must stay ascending). A rejected move is not counted β€” try another. If no legal move remains, reset the yard and try a different order.

πŸš‚ All three yards sorted

…
0moves this yard
0cars out
0score / 3000
How it plays. Each yard sends you a scrambled train of numbered cars. Your job: get them onto the output track in ascending order 1…N, using as few moves as possible. Three moves exist:
  • push β€” next incoming car onto the siding stack
  • pop β€” top siding car onto the output track
  • direct β€” next incoming car straight to the output track
The siding is a stack: last in, first out. A car may only enter the output track if it is the next number in sequence β€” anything else is rejected and not counted.
score per yard = round(1000 Γ— exact optimum Γ· your moves)
The optimum is exact: breadth-first search over the full state space (incoming index, siding stack, output count), computed in your browser and revealed when you finish the yard.
final score = sum of the 3 yard scores (max 3000).
Every player gets the same three yards (fixed seeds) β€” fair leaderboards.
Yards: Y1 Β· Y2 Β· Y3, 6, 7 and 8 cars. Every yard is solvable β€” but not every move order is: a wrong push can bury a car you need next.