Junction 2026, 4th of ~75, Bahn Express Challenge
DaVinci's Night Shift, A Pricing and Dispatch Desk for Junction 2026

- Role
- Built the desk: models, pricing rule, guard, evaluation harness, live operations and the replay site
- Timeline
- Duration
- 48-hour hackathon, on site in Espoo, Finland
- Team
- Team: Ahmed Saad, Ashutosh Chatterjee (TUHH), Roman Petrov (ESADE), Tudor Lina (ESADE)
- Stack
- Python · Logistic Regression · Bayesian Updating · Simulation · Azure · Cloudflare
View the sourcePlay a weekWatch a week replayedPress: Réalités (in French)
Overview
Junction is Europe's largest hackathon: more than 2,000 participants, 48 hours, on site in Espoo, Finland, from 13 to 15 November 2026. Our team of four, with students from Hamburg and Barcelona, entered Bahn Express's challenge, Spread, which about 75 teams took on. In the challenge jury's final ranking we finished 4th.
Spread is one simulated week of a car-transport company in Finland. Dealers ask for prices, and a competitor answers them too. Every car we win needs a freelance driver, found by posting a gig with a fee. The score is the gross margin, and a team is ranked only when at least 90% of its orders arrive on time. Our desk, DaVinci's Night Shift, makes two estimates, applies one rule and keeps one guard. On 80 weeks that no setting was tuned on it makes €16,013 a week at 97.0% on time.
The automated leaderboard is a separate number from the jury's ranking: in the live final the desk finished 6th of 236 entries, 58 of them ranked, and 2nd of 236 in the test final eight hours earlier. I wrote the desk, the harness that measures it, the live loop and the replay site: 38 of the repository's 41 commits. The other three came out of the Saturday-night review with my teammate Roman Petrov, whose ideas are each measured in the README beside mine.
The problem
A pricing problem and a logistics problem are tied together and scored by one number. Price too high and the competitor takes the order; price too low and the margin is gone. Win a car you can't find a driver for and it arrives late, and under 90% on time a team isn't ranked at all, whatever it earned. The kit's starter loses €66,760 a week at 51% on time. And a simulated week is noisy in a way that punishes guessing: one cent less on every fee step moved a single week by €1,354, because one changed booking changes the rest of the week. So a gain of a few hundred euros can't be seen on a handful of weeks. The hard part wasn't having ideas. It was knowing, inside 48 hours, which of them were real.
What I built
- 01
Fitted the chance that a driver takes a car in time
A logistic curve on what a dispatcher knows at the quote: the awake hours until the last pickup, the length of the drive, the fee over the typical fee, the drivers who live within 100 km of each end, and how many of our orders already wait for a driver. It is fitted on 29,597 orders from 80 weeks played with random prices and fees.
- 02
Fitted the chance that a dealer takes a price
A logistic curve in the log of the price over the list price, divided by the dealer's trust. Each lane has a level that holds in every week. The day's level doesn't, so the desk learns it from each quote that wins or loses, one Bayesian update at a time, and widens its belief each morning. A price war shows as a low level within the first quotes of its day.
- 03
One rule uses both
For each option of a request, the desk picks the opening fee with the lowest expected cost among the fees at which a driver comes in time often enough, then quotes the price with the highest expected profit. An option without such a fee gets no price.
- 04
One guard protects the ranking
In every week, on one night, 8 to 24 drivers give their bookings back, and that day causes 40% of all late cars. So the desk never holds more cars due on one day than the week can afford to lose a quarter of. It lifted the lowest of 40 weeks from 91.3% to 94.1% on time, with the margin unchanged.
- 05
Read the dealers' notes
A note can move the ready time, the real opening hours or the deadline, or ask for plates or a manual licence, and the world acts on it. The reader gets 99.97% of 3,963 unseen notes right and says when it is unsure. It was worth €1,850 a week, and failed visits fell from €515 to €5.
- 06
Made every idea earn its place
A practice week is deterministic, so an idea is a setting played on the same 80 weeks with it and without it, each week compared with itself. The gain has to be more than twice its standard error, the lowest week's on-time share must not fall, and then 80 weeks that no setting has seen judge the change once. Only then does it become the default.
- 07
Kept the list of what didn't work
More than sixty ideas were measured and left out, each with its number: direct offers to drivers, of which none of 6,491 was accepted; a driver curve that ranked orders better on paper, AUC 0.869 against 0.851, and made less in play; a tighter guard and a looser one.
- 08
Hardened the live loop while the event ran
The hall's Wi-Fi lost a request every minute or two and cost one test final 90 orders. Three changes went into the running desk, each by restarting it: a request waits 4 seconds for its answer, not 20, and the desk then rebuilds its books from the event history; the final's clock is read on a connection of its own; a stream that falls silent for three seconds is opened again from its last event.
- 09
Played the final from a machine next to the server
A VM in a data centre, 15 ms from the challenge's server, ran the desk as a service that starts by itself, with the laptop as standby. No restart and no rejoin in the whole final week.
- 10
Published the evidence as a page
The site's front page is the desk as an arcade cabinet: pull the lever to play a week. The replay page plays one week of version 21 on a map of Finland, and every number on it is computed from the log.
Architecture
The challenge's world sends events; the desk keeps its books from those events alone, which is why it can rebuild them after any failure. For each request two fitted models give the chance of a driver in time and the chance that the dealer accepts, the rule turns them into an opening fee and a price, and the guard can still say no. The same decision code runs in two loops: practice worlds, where the harness plays fixed seeded weeks in parallel and logs each one, and the live loop that played the final from a VM. The replay site is built from that log.
Tech stack
Driver model
Logistic curves fitted with scikit-learn in analysis/fit.py, shipped as plain coefficients in desk/fitted.json. The desk itself needs only the challenge kit and Python's standard library. The curve is cautious, it says 94.7% in time where 97.3% are, so the desk asks it for 0.84 rather than 0.90.
Dealer model and market learner
A dealer curve with one level per lane, plus a learner updated by Bayes' rule on every answered quote. It also follows the competitor's own moves through the week, a tilt by lane length and a level for each pickup and delivery place. On 80 weeks with random prices it predicts the next answer 3.9% better, worth €314 a week over 120 weeks.
The guard and its reserve
Holds back a quarter of a day's cars against the night of dropped bookings; 15% in a week that stays calm, 10% for cars due after the weekend, which have the weekend to find a driver. That last refinement gained €169 a week over 200 weeks, standard error €37, with the lowest week unchanged.
Note reader
desk/notes.py reads the free-text note on a request and repairs typos against a word list. Scored on notes it had not seen by analysis/notes_score.py.
Evaluation harness
eval/ holds fixed seeds, parallel workers, the log and a week-by-week comparison. results/runs.csv has one row for each week played: 11,651 weeks under 272 labels. Tuning weeks, 80 further weeks and 80 unseen weeks are kept apart, because weeks that have judged dozens of settings flatter the survivors.
Live loop and recovery
desk/live.py plays a world that runs on a real clock. With lost requests and lost answers injected into every kind of call, four weeks scored the same as without. Full weeks played live with a restart in the middle make what practice says.
Deployment
An Azure VM in Norway East running the desk as a systemd service, 15 ms from the server and never more than 19 ms in 40 requests. Only one machine may play, since two would send every quote twice; a runbook covers the morning of the final step by step.
Replay site
A single-file arcade page and a replay page whose build script computes every number from the log, hosted on Cloudflare. The outline of Finland is Natural Earth's, public domain.
Results
4th of ~75
The challenge jury's final ranking for Bahn Express's challenge at Junction 2026, shown to us at the event. Just off the podium, so it is not counted among the wins on this site.
6th of 236
The automated leaderboard of the live final, where 58 of the 236 entries were ranked: €19,919 from 460 orders at 95.9% on time. The first team made €22,931 and the tenth €19,084.
2nd of 236
The Sunday 01:00 test final, played from the VM: €13,672 from 371 orders at 96.8% on time, with no late quote, no lost request and no rejoin. Five hours earlier, on the hall's Wi-Fi, the desk was 29th.
€16,013 a week
Version 21 on 80 weeks that no setting was tuned on, at 97.0% on time with the lowest week at 92.6%. The kit's starter makes −€66,760 a week at 51.0%.
11,651 practice weeks
Every week the desk has played, logged under 272 labels, so each claim in the README can be recomputed.
60+ ideas left out
Each measured on the same weeks as the ones that were kept, and listed with its number.
99.97%
Of 3,963 unseen dealer notes read correctly by the note reader.
Moments

What I took away
- 01
A difference under twice its standard error is nothing. One cent on every fee step moved one week by €1,354. Without the paired comparison on fixed weeks I would have shipped noise several times that weekend, and felt good about it each time.
- 02
The weeks that judged your settings flatter them. On the 40 weeks the settings were tuned on, one version made €17,599 a week; on 80 new ones, €17,084. Holding back weeks that no setting has seen is what an honest expectation costs.
- 03
A better model on paper can earn less in play. The richer driver curve had the better AUC and made less money. The score is the margin, so the margin is what gets measured.
- 04
The network is part of the system. Five hours apart, the desk was 29th from the hall's Wi-Fi and 2nd from a VM beside the server. The fixes went into a running final by restarting the desk, which only worked because it could rebuild its books from the event history.
- 05
A written rule lets a teammate's ideas be judged exactly like mine. Roman's Saturday-night ideas were each played on the same 80 weeks. Most didn't gain, one found a floating-point edge in the guard, and all of them are in the README with their numbers.
- 06
Writing down what failed is part of the result. The list of ideas that were left out is longer than the list that stayed, and it is the part I would want to read first if this were someone else's work.
View the sourcePlay a weekWatch a week replayedPress: Réalités (in French)