Boarding Simulator
Get every passenger into their assigned seat as quickly as possible. The aisle is narrow, luggage takes time to stow, and passengers may have to stand up to let someone reach a window seat.
Your algorithm chooses the boarding order. Try grouping passengers by row, seat, or travel party, then watch where the queue slows down.
How to use it
- Open boarding.js and choose a stock algorithm from the dropdown. Run it once to see how it behaves before changing the code.
- Use Run below the preview to start the simulation. Pause to inspect it, step forward one tick at a time, or reset to start over. The speed slider changes how fast you watch the run.
- Edit the JavaScript in the file tab. Open reference.md for the algorithm API, or Settings to change the scenario. Use the same seed when comparing two approaches: it recreates the same setup.
- Click Test 100 seeds to check more than one scenario. The Benchmarks panel shows progress and results; the Output panel helps you inspect what happened.
- When you are happy with your algorithm, click Submit algorithm to score it against 1,000 canonical seeds. Open the Leaderboard to compare submissions.
What makes a good result?
The score is the total boarding time in ticks. Lower is better: the flight is ready when everyone is seated.
Work with an agent
Open the Agent tab to connect an AI coding agent. Copy the provided prompt into your agent so it can help edit the algorithm, run experiments, and inspect results in this browser.