Bahn Express · one simulated week of car transport in Finland

A dispatcher that prices by what it has measured

Dealers ask for prices, and a competitor answers them too. Each car that we win needs a freelance driver, found by posting a gig with a fee. The score is the margin; a team counts only with 90% of its orders on time.

One week of version 21, replayed
won, no driver yet booked, or on the road will arrive late a request that we win one that goes to the competitor
The desk

One request, one price, one gig

Every request takes the same path. The numbers beside each step are what that step was measured to be worth, on the same practice weeks with it and without it.

How the desk decides: a dealer's request is read, the notes reader extracts the real hours, a driver curve and a dealer curve estimate cost and chance, the price rule picks the price with the highest expected profit, the guard checks the week's room, and the won car becomes a gig.

Try the price rule

A car with a list price of €100. The dealer curve is the fitted one; move what the desk knows and watch the price that it quotes.

quoted: 6% above the curve's choice
chance that the dealer takes it
expected profit

The 6% is itself measured: a 6% higher price lost 13% of the orders where the curve said 24%, and made €758 a week more. The desk learns today's level from every quote that wins or loses, and each order delivered on time is worth 1% of price with that dealer.

chance that the dealer takes the priceexpected profitthe price quoted
Evidence

Each idea, with the weeks that judged it

Practice weeks are deterministic: the same seed gives the same week to the cent. So an idea is judged on the same weeks with it and without it, and a week is compared with itself.

From the kit starter to version 20

Mean margin a week on the same 20 level 8 weeks. Each version adds to the one above it.

What each idea is worth

Margin a week with the idea, less the margin without it. Two ideas earn nothing and are there to keep the week ranked.

How an idea becomes a default: a setting that is off is played on 80 practice weeks with and without it; it must gain more than twice its standard error and must not lower the lowest week; then 80 unseen weeks judge it once; only then it becomes the default.

Week by week

Pick a change. Each bar is one practice week: its margin with the change, less its margin without it, sorted from the worst week to the best.

a week that gaineda week that lostthe mean of all weeks

Rounds and finals

Against the other teams

Ranking rounds are five secret weeks that every team plays once. Test finals run by the clock, as the final does: nobody can pause the world.

The Sunday 01:00 test final, hour by hour

Margin of the first ten teams through the week, from the public feed that we recorded. 236 teams took part and 41 were ranked. Our desk played from the VM: second, with no late quote and no lost request.

DaVinci's Night Shiftthe other nine of the first ten

Orders won on each weekday of that final

Wednesday was the day with few drivers. The nine other teams won their most orders on it; our desk held back, as its guard is built to, and kept the highest on-time share but two. What a looser Wednesday costs in practice is in the list of ideas not taken.

Ranking rounds at level 8

Five secret weeks a round. The total changes with the round's weeks, so the place says more than the euros.

Three test finals

The same loop each time. What changed is the network between the desk and the server.

Test finalPlayed fromPlace
Saturday 14:00
joined on the week's Thursday
laptop9th of 55
Saturday 20:00
the hall's Wi-Fi lost a request a minute
laptop29th of 75
Sunday 01:00
after the loop was hardened
VM, 15 ms away2nd of 236
Not taken

What was measured and left out

Most ideas end here. Each one stays in the log under its label, and is off in the settings. These are twelve of more than sixty in the README.

The live final

34 minutes that nobody touches

In the final a weekday hour lasts 18 seconds, so a request waits 4.5 seconds for its price. If our code stops, the world goes on and the competitor takes the requests. The service waits for the final, plays it, and starts again by itself.

The live final: events arrive on a stream, the books are kept from the events, the desk decides and sends quotes and gigs back. Four nets: a request without an answer is recovered in place, a silent stream is opened again, a stopped process starts by itself, and the final is played from a VM near the server.

What the nets were measured to do

What went wrongWhat happened
A request without an answerTwo recovered in place in one test final; no rejoin of the world
A stream that died without a wordFour opened again from their last event; nothing missed
A restart in the middle of a week€19,444 a week with one, €19,208 without, on the same four weeks
The network dropping three times, and a restart across a midnight€17,362 at 97.4% on time, on a week that makes €18,125 in practice mode
The hall's Wi-Fi29th from it; 2nd from a VM 15 ms from the server

One look at the books takes 40 ms on average and 0.33 s at worst. The live loop keeps the rhythm of the practice weeks, so every measurement on this page was made at the pace that the final plays at.