Public test sequence 737
Boarding Systems Office
Operational study no. 01
Field manual for passenger flow optimization

Boarding Simulator

Move 178 passengers through one aisle. Tune the sequence, preserve groups, and compete against 1,000 canonical seeds.

Run desk
Cabin routing
Queue analysis
API pendingPreparing browser control channel.
Time
0ticks
Avg wait
0.0ticks
Manifest
0/0seated
Groups
0intact
Exit rows
014-16
Boarding Order
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Speed
Batch test
Leaderboard
Submit this boarding order or inspect public rankings.
View ranks
01
A
B
C
D
E
F
01
02
A
B
C
D
E
F
02
03
A
B
C
D
E
F
03
04
A
B
C
D
E
F
04
05
A
B
C
D
E
F
05
06
A
B
C
D
E
F
06
07
A
B
C
D
E
F
07
08
A
B
C
D
E
F
08
09
A
B
C
D
E
F
09
10
A
B
C
D
E
F
10
11
A
B
C
D
E
F
11
12
A
B
C
D
E
F
12
13
A
B
C
D
E
F
13
14
A
B
C
D
E
F
14
◀ EXIT
EXIT ▶
15
B
C
D
E
15
◀ EXIT
EXIT ▶
16
A
B
C
D
E
F
16
17
A
B
C
D
E
F
17
18
A
B
C
D
E
F
18
19
A
B
C
D
E
F
19
20
A
B
C
D
E
F
20
21
A
B
C
D
E
F
21
22
A
B
C
D
E
F
22
23
A
B
C
D
E
F
23
24
A
B
C
D
E
F
24
25
A
B
C
D
E
F
25
26
A
B
C
D
E
F
26
27
A
B
C
D
E
F
27
28
A
B
C
D
E
F
28
29
A
B
C
D
E
F
29
30
A
B
C
D
E
F
30
L2
LAV
GALLEY
LAV
R2
Aft cabin
APU
0 entries
Awaiting agent API calls
Awaiting simulation start
STD
BUS
ELD
CHD
WCHR
BAG
Cabin features
Door
Exit
Bulkhead
Exit row

737 Boarding Simulator

Design the optimal boarding algorithm and compete on the global leaderboard

Quick Start

  1. 1Write your algorithm in the code editor on the left. You have access to passengers (array), ROWS (30), and aircraft (seat info). Return the passengers in boarding order.
  2. 2Click BEGIN_BOARDING to watch your algorithm in action. Passengers will board the aircraft one at a time, stow their luggage, and take their seats.
  3. 3Test with BATCH_100X or BATCH_1000X to run your algorithm across many different passenger configurations and see average performance.
  4. 4Submit to the leaderboard when you're satisfied. Your algorithm will be evaluated across 1,000 canonical seeds to calculate your official score.

The Objective

Your goal is to minimize the total boarding time measured in ticks. A tick is the simulation's unit of time—each tick, passengers move one step forward in the aisle, make progress stowing luggage, or wait if blocked.

The challenge is that different boarding strategies have different tradeoffs. Boarding window seats first (WILMA method) reduces seat interference, but may cause more aisle congestion. Back-to-front boarding is intuitive but often performs poorly due to clustering. Your job is to find the optimal balance.

The Aircraft

The simulation uses a Boeing 737-800 configuration with 30 rows in a 3-3 layout (seats A-B-C on the left, D-E-F on the right). Total capacity is 178 seats, with approximately 85% filled (~150 passengers per simulation).

  • Row 1 — Bulkhead row (extra legroom, no under-seat storage)
  • Rows 14-16 — Exit rows (seats 15A and 15F removed for overwing exits)
  • Single aisle — Only one passenger can occupy each aisle position at a time

Passenger Types

Each passenger has a type that determines their walking speed and luggage stowing time. These values have some randomization (±20-30%) to reflect real-world variability.

STD (Standard)

Regular adult travelers. Speed: 1.0x, Stow time: ~3 ticks. The most common passenger type (~55% of solo travelers).

BUS (Business)

Frequent flyers with minimal, organized luggage. Speed: 1.2x, Stow time: ~2 ticks. They're efficient and quick to settle.

ELD (Elderly)

Senior travelers who need more time. Speed: 0.5x, Stow time: ~5 ticks. Often travel in pairs with a caregiver.

CHD (Child)

Young travelers who must be with a guardian. Speed: 0.8x, Stow time: ~1 tick. Always part of a family group.

WCHR (Wheelchair)

Pre-boarded passengers already seated when boarding begins. They're in their seats from the start.

BAG (Carry-on Only)

Light travelers with just a small carry-on bag. Speed: 1.0x, Stow time: ~1 tick. Quick to board and settle.

How the Simulation Works

Boarding Sequence

  1. 1. Your algorithm sorts the passengers into boarding order
  2. 2. Passengers enter the jetway one at a time
  3. 3. Each passenger walks down the aisle until reaching their row
  4. 4. They stow their luggage (taking 1-10 ticks depending on type)
  5. 5. They enter their seat (with possible crossover penalties)
  6. 6. When the last passenger sits, boarding is complete

Aisle Blocking

The single aisle is the main bottleneck. When a passenger is stowing luggage, they block the aisle at their row. Passengers behind them must wait until the aisle is clear before proceeding.

Pro tip: Spreading out passengers across different rows allows parallel stowing and reduces total time.

Seat Crossover Penalties

When a passenger needs to reach a window or middle seat, they may need to step over already-seated passengers:

  • +2 ticks per person they must cross over to reach their seat
  • Window seats (A, F) may require crossing 2 passengers
  • Middle seats (B, E) may require crossing 1 passenger
  • Aisle seats (C, D) have no crossover penalty

Seat Yielding

When a passenger needs their seat but someone is already seated between them and the aisle, the seated passenger(s) must yield:

  • +2 ticks for each yielding passenger to stand up
  • +2 ticks for each yielding passenger to sit back down
  • This can add 4-8 ticks when boarding window/middle seats after aisle seats

This is why WILMA (window first) strategies help: window passengers are already seated when middle/aisle passengers arrive, so no yielding is needed.

Group Separation Rules

Families and travel groups must board within 10 positions of each other in the queue. If your algorithm separates group members too far apart, you'll see a GROUP_SEPARATION validation warning. This rule reflects real-world airline policies.

Groups are identified by groupId. The isGroupLeader flag indicates the primary traveler, and groupMemberIds lists other members.

Overhead Bin Conflicts

Each row has overhead bin capacity for 6 pieces of luggage (both sides combined). When a passenger's row is full, they must walk to find available space.

  • Passengers check their own row first, then search forward (toward the front), then backward
  • +2 ticks per row walked to reach an alternate bin
  • +2 ticks per row to walk back to their seat
  • This extra time is added to their stowing duration, blocking the aisle longer

Bin conflicts are tracked in the event log as bin_conflict events. Back-to-front boarding tends to cause more bin contention because rear passengers fill up rear bins, forcing later passengers to walk further.

Available Variables

Your algorithm has access to these global variables:

  • passengers (Passenger[]) — Array of passengers to sort and return
  • ROWS (30) — Total number of rows on aircraft
  • aircraft (object) — Aircraft layout and vacant seat info (see below)
  • console.log() (function) — Outputs appear in Event Log for debugging
  • rand() (function) — Seeded RNG (same stream as Math.random)

Passenger Properties

Each passenger object has these properties:

Seat Information

  • row (1-30) — Row number
  • seat ("A"-"F") — Seat letter
  • seatIdx (0-5) — Seat index (A=0, F=5)
  • isWindowSeat (bool) — Seats A and F
  • isMiddleSeat (bool) — Seats B and E
  • isAisleSeat (bool) — Seats C and D
  • isExitRow (bool) — Rows 14-16
  • isBulkhead (bool) — Row 1

Passenger Attributes

  • id (int) — Unique passenger identifier
  • type (string) — STD, BUS, ELD, CHD, WCHR, BAG
  • typeFull (string) — Full type name (e.g. "STANDARD")
  • speed (0.24-1.44) — Walking speed multiplier
  • luggageTime (1-10) — Base ticks to stow luggage
  • color (string) — Hex color for passenger type

Group Information

  • groupId (int|null) — Group identifier
  • groupSize (1-3) — Number in group
  • isGroupLeader (bool) — Primary traveler
  • groupMemberIds (int[]) — Other member IDs

Determinism & Sandbox

  • Seeded randomnessMath.random() and rand() are seeded per simulation.
  • Deterministic clockDate.now() and performance.now() use a tick-based clock (tick * 1000ms).
  • Runtime guard — Your algorithm must finish under 50ms or it will error.
  • Restricted APIs — Timers and microtasks (Promise/queueMicrotask/setImmediate), network, DOM/storage, workers, Function/eval, crypto randomness, and Node globals (process/require) are disabled.
  • Console outputconsole.log()/warn()/error() appears in the Event Log as USR entries.

Aircraft Properties

Your algorithm has access to an aircraft variable with information about the full aircraft layout, including which seats are vacant:

Capacity Info

  • aircraft.totalSeats (178) — Physical seats on plane
  • aircraft.occupiedSeats (int) — Seats with passengers
  • aircraft.vacantSeats (int) — Empty seat count
  • aircraft.rows (30) — Number of rows
  • aircraft.seatsPerRow (6) — Seats per row
  • aircraft.seatLabels (string[]) — ["A", "B", "C", "D", "E", "F"]
  • aircraft.exitRows (int[]) — [14, 15, 16]
  • aircraft.bulkheadRow (1) — Row 1

Seat Lists

  • aircraft.seats (Seat[]) — All seats
  • aircraft.vacantSeatsList (Seat[]) — Empty seats only
  • aircraft.occupiedSeatsList (Seat[]) — Occupied seats only

Helper Functions

  • aircraft.getSeat(row, seat) → Seat — Get seat info
  • aircraft.isVacant(row, seat) → bool — Check if empty
  • aircraft.isOccupied(row, seat) → bool — Check if taken

Seat Object Properties

  • seat.row, seat.seat, seat.seatIdx
  • seat.isWindowSeat, seat.isMiddleSeat, seat.isAisleSeat
  • seat.isExitRow, seat.isBulkhead
  • seat.exists (bool) — False for 15A, 15F
  • seat.isOccupied (bool) — Has passenger
  • seat.passengerId (int|null) — Passenger ID
// Example: prioritize rows with more empty seats
const emptyByRow = {};
aircraft.vacantSeatsList.forEach(s => {
  emptyByRow[s.row] = (emptyByRow[s.row] || 0) + 1;
});
return passengers.sort((a, b) => (emptyByRow[b.row] || 0) - (emptyByRow[a.row] || 0));

Built-in Algorithms

Use these as starting points or benchmarks. Select them from the dropdown to see their code:

RANDOM_SHUFFLE

Baseline random ordering. Surprisingly not terrible! Averages ~450-500 ticks.

BACK_TO_FRONT

Traditional airline method. Board row 30 first, then 29, etc. Actually performs poorly (~500+ ticks) due to aisle clustering.

FRONT_TO_BACK

The worst strategy. Front passengers block everyone behind them. Included for comparison.

WILMA_METHOD

Window seats first, then middle, then aisle. Reduces crossover penalties. Typically ~350-400 ticks.

STEFFEN_PERFECT

Theoretically optimal: windows first, alternating rows (30, 28, 26... then 29, 27, 25...). Often ~300-350 ticks.

GROUP_PRESERVE

Back-to-front but keeps groups intact. A good starting point that passes validation.

Event Log & Metrics

The Event Log streams passenger actions and algorithm output in time order. Use it to debug bottlenecks and verify your strategy.

Event Types

  • boarding — Passenger enters the aisle
  • stowing — Luggage stow begins
  • bin_conflict — Bin overflow requires extra walking
  • crossover_start — Seat crossover begins
  • yielding — Aisle seat yields for crossover
  • shuffling — Passengers settle into row
  • seated — Passenger sits
  • waiting_blocked — Passenger blocked in aisle
  • console_log/console_warn/console_error — Algorithm output

Metrics

  • T-MINUS — Total boarding time in ticks
  • AVG_WAIT — Average per-passenger wait time
  • MANIFEST_LOAD — Seated passengers / total
  • GROUPS — Group count kept intact
  • EXIT_ROW_PAX — Passengers assigned to exit rows

Leaderboard & Scoring

When you submit to the leaderboard, your algorithm is evaluated server-side across 1,000 canonical seeds. This ensures your algorithm is robust across different passenger configurations.

Average Score

Mean ticks across all 1,000 simulations. Lower is better.

Validation Rate

Percentage of simulations without group separation errors. 100% required for ranking.

Worst Case

Maximum ticks in any single simulation. Used as a tiebreaker.

You can submit multiple times and keep improving. Only your best score counts. Use the SAVE button to store your algorithms locally so you can iterate on them.

Tips & Strategies

What Works

  • Spread passengers out — Avoid clustering. Passengers stowing at adjacent rows block each other.
  • Board window seats first — Reduces crossover penalties significantly.
  • Consider bin capacity — If too many passengers board at the same row range, bins fill up.
  • Use batch testing — Run BATCH_1000X to find edge cases in your algorithm.

What Doesn't Work

  • Strict back-to-front — Creates aisle congestion and bin contention.
  • Ignoring groups — Splitting families causes validation errors.
  • Front-to-back anything — Early boarders block the entire plane.
  • Optimizing for one seed — Your algorithm must work across all configurations.

Built with TanStack Start, Cloudflare Workers, and D1. Algorithm execution is sandboxed and secure.

Inspired by real-world research into airline boarding optimization.