Buckets:
The SBCS project in simple words
Written 2026-10-12. A short account of what we built, what we ran and what we found.
1. The question
Picture a city where every traffic light is switched off and there are no stop or give-way signs. Self-driving cars from different companies must still cross junctions without hitting each other. Nobody tells them who goes first. Can they work out shared road rules by themselves, just by practising? And what happens to those rules when each company is told "you may only take this much risk"?
2. What we built
The city. A simulated city of 1.2 x 0.9 km with 41 junctions: four-way crossings, T-junctions, roundabouts, a freeway with ramps and a diamond interchange (a bridge where a freeway meets a street). It is built on MetaDrive, an open driving simulator. Trips start and end at parking spaces by the kerb.
The cars. Each car decides ten times per second how to steer and how much to accelerate or brake. It sees:
- a ring of 72 laser beams around it that measure the distance to other cars up to 50 m (this is "lidar");
- the four nearest cars within 50 m: where they are, how fast, where they intend to turn and when they will reach the point where the two paths cross (this is like cars talking to each other by radio, "V2X");
- the road ahead and directions to its destination.
The brain. Each car is driven by a small neural network: a function that turns what the car sees into steering and pedal. A fleet has eight separate brains, called operators (think: eight companies). In the city, each operator drives three of the 24 cars. The brains never share what they learn.
3. How the cars learn
| Term | Simple meaning |
|---|---|
| Reinforcement learning | Learning by trial and error: try something, get a score, do more of what scored well |
| PPO | The trial-and-error method we use. It changes the brain a little at a time so it does not forget what it knew |
| Reward | The score for good driving: progress along the route, +10 for arriving, -10 for a crash or leaving the road, small penalties for speeding and for wasting time |
| Risk cost | A separate score for danger: 1 for a collision, 1 for leaving the road, smaller amounts for near misses |
| TTC (time to collision) | How many seconds until two cars would hit if neither changed speed. Under 1.5 s counts as a near miss |
| PET (post-encroachment time) | The gap between one car leaving a crossing point and the next car reaching it. Under 2 s counts as a near miss |
| Safety budget | The most risk cost a car may collect per moment of driving, on average |
| PPO-Lagrangian | PPO with a safety budget. It puts a price on risk. The price goes up while the car is over budget and down while it is under |
| Curriculum | Learning in steps, easy scenes first, like school grades |
| Seed | One independent repeat of an experiment with different random numbers. More seeds = more trust in the result |
Our budgets are 1/2, 1/4 and 1/10 of the risk that cars take when they have no budget at all.
4. The learning ladder
- Driving school (stages A1 to A7), one car alone. Straight street, highway, lane changes and ramps, curves, turns at junctions and roundabouts, then the city's own junction types. A stage is passed when 90 % of trips arrive.
- Traffic (stages B1 to B3). B1: eight cars at one junction. B2: sixteen cars in one district of the city. B3: 24 cars in the whole city.
Three models are compared: direct PPO (after driving school, straight into the full city), curriculum PPO (B1, then B2, then B3) and PPO-Lagrangian (either plan, with a safety budget).
5. Every experiment we ran
Budgets are written as a share of the risk that cars take with no budget at the four-way crossing (0.00316 per car-step): none, 1/2, 1/4, 1/10. The city studies use the same numbers. In the city they are looser than they sound: 1/2 and 1/4 are about 0.7 and 0.35 of what the curriculum fleets risk there with no budget, and 1/2 is about 0.9 for the direct fleets.
"Steps" are moments of driving summed over all cars (10 per second per car). A "fleet" is one trained group of cars; a "seed" is one independent repeat. Unless said otherwise, every traffic fleet starts from its seed's driving-school graduate, and tests use actions without random variation.
A. Driving school (one car alone, no budget)
| What | Variations | Seeds |
|---|---|---|
| Stages A1 to A6: street with parking (4M steps at most), highway (3M), lane change and ramp (4M), curves (4M), turns at a crossing, a roundabout and a signal (5M), all mixed (4M) | Full sensing | 20 |
| The same six stages | Without arrival-time information about other cars ("no ETA") | 10 |
| The same six stages | Laser beams only, no radio information ("lidar only") | 5 |
| The same six stages | Left-hand traffic (mirrored roads). Trained for a planned check; no traffic study used them | 10 |
| Stage A7: the city's junction types and whole-city trips, lights off (12M) | Full sensing, continued from A6 | 10 |
In stages A2 to A5 and in A7, every third practice scene repeats an earlier stage, so nothing is forgotten. Stage A6 is itself a mix of the earlier scenes (all except the plain highway).
B. Trial runs in traffic (to choose budgets and settings; 8 cars, 24 in the city)
- No budget at the crossing and the roundabout (30M steps), the highway merge (20M) and an early version of the city (24 cars, 80M): 3 seeds each. This measured how much risk cars take when unconstrained (0.00316 per car-step at the crossing).
- Four budgets (1/2, 1/4, 1/10, 1/20 of each scene's own unconstrained risk) at the crossing, the roundabout and the merge: 5 seeds each, 60 fleets, 30M steps (merge 20M). At the merge no budget could be met.
- Two ways to adjust the price on risk at the crossing: a simple step up or down ("gradient ascent") against a smoother controller ("PID"); budgets 1/2, 1/4, 1/10; 5 seeds each, 30 fleets, 60M steps. We kept the simple one and the 60M length.
C. Study 1: one four-way crossing (8 independent cars, 60M steps, predictions written down first)
- Main grid, 80 fleets: none, 1/2, 1/4, 1/10 x full sensing or no ETA x 10 seeds.
- Controls, 5 seeds each (45 fleets):
- every car starts from a different driver instead of copies of one (none and 1/10);
- the budget is applied at once instead of being tightened gradually (1/10);
- the price on risk moves 0.3 times and 3 times as fast (1/4);
- all cars share one brain (none and 1/4);
- lidar only (none and 1/4).
- A fixed price on risk instead of a budget (price 1 and price 4): 10 seeds each, 20 fleets.
- One price shared by the whole fleet while the brains stay separate (1/4): 5 fleets. Added later, after an internal review of the paper; not planned beforehand.
D. Study 2: the whole city, lights off (8 operators, 24 cars, 120M steps, predictions written down first)
- Curriculum plan (B1 junction sites with 8 cars, 30M; B2 districts with 16 cars, 30M; B3 whole city with 24 cars, 60M): none, 1/2, 1/4 x 10 seeds = 30 fleets.
- Direct plan (whole city only, 120M): none and 1/2 x 10 seeds = 20 fleets. Added later, after the same review and not planned beforehand: 1/4 x 9 seeds.
Seed 0 is left out of the analysis by a rule fixed beforehand (its driver was too weak), so 45 of the 50 fleets count.
E. Follow-up training in the city (9 seeds each; items 10 to 12 were planned in writing before their data, item 13 was an extra try with no written plan)
- Does removing the budget unfreeze a frozen fleet? The 18 curriculum fleets trained at 1/2 and 1/4 drive 20M more steps with no budget, in three ways: simply continue; continue with a fresh value estimate; continue with the randomness of their actions reset. 18 fleets x 3 ways = 54 fleets. Of the 18, 7 were frozen. Simply continuing brought back 2 of the 7 (only just), a fresh value estimate 0 of 7, the reset 7 of 7. So removing the budget is not enough; resetting the randomness is what works.
- Is it how fast the budget tightens? Curriculum with a four times slower tightening, and direct with a four times faster one (1/2): 18 fleets. No difference.
- Does more randomness prevent freezing? The curriculum repeated with a higher minimum randomness on the pedal: none, 1/2, 1/4 = 27 fleets. Yes: no fleet froze.
- Can they become better city drivers? The direct fleets (none and 1/2) drive 60M more steps.
- On the usual short trips, in two ways: continued as they are, or with randomness reset (36 fleets).
- On long whole-city trips of 0.6 to 2.5 km, with randomness reset only (18 fleets).
- Second round: the two best groups, both without a budget and both with the reset (one from the short trips, one from the long trips), drive another 60M steps on long trips, with randomness reset once more (18 fleets).
F. Tests of trained fleets (no training)
- City driving test: one car alone, and 24 cars in traffic.
- Short trips (as in training): all 50 Study 2 fleets, the 18 fleets of item 11, the 27 higher-randomness fleets, 14 unfrozen fleets (the 7 that had been frozen, each simply continued and with the reset) and both improvement rounds.
- Long whole-city trips: only three Study 2 groups (curriculum with no budget, direct with no budget, direct at 1/2; 30 fleets) and both improvement rounds.
- The traffic test of the 45 Study 2 fleets that count was repeated with random variation in the actions.
- The direct 1/4 fleets of item 9 had no city driving test before item 23.
- Mixed fleets at the crossing: half the cars from a fleet with one budget, half from another fleet (3,136 pairs, counting fleets paired with themselves; done for full sensing and for no ETA). Also pairs of fleets from the same seed with different budgets (240 pairs).
- Mixed fleets in the city (513 tests). The pairs that include a no-budget fleet, and fleets paired with themselves, were repeated with random variation in the actions (332 tests).
- Moved to other junctions: crossing-trained fleets and city fleets tested at the crossing, roundabout, T-junction, Y-junction, staggered T and arterial crossing.
- Copies of one brain: in each of the 45 Study 2 fleets that count, all 24 cars are driven by one operator's brain, each of the 8 brains in turn. This is compared with the normal fleet, where the 8 brains drive together. Both are run without and with random variation in the actions (1,440 test runs). Roles check: the normal fleets then drove 64 more episodes each to measure the cautious and assertive roles (720 test runs).
- Mixed fleets at the crossing, with random variation in the actions: no-budget fleets mixed with other no-budget fleets, with 1/4 fleets and with 1/10 fleets (full sensing; 90 pairs each, 270 tests).
- Graduates before traffic: eight copies of one driving-school graduate are placed straight into traffic at the crossing and at the roundabout, to see which habits they bring (20 graduates with full sensing, 10 without ETA).
- A crossing with working traffic lights, meant as a known-answer check (10 graduates, eight copies each). It failed: the cars ran red lights. A second run that read the light at a different moment gave the same answer. We replaced the check: in five no-budget crossing fleets, every car was made to brake whenever another car came from its right. Our measurement found this "yield to the right" rule in 68 of 68 meetings where two cars arrived at almost the same time. But the one-word label per fleet still said "first come" for 4 of the 5 fleets, because a car that brakes also arrives later. So the paper also reports a second way to measure who came first. The data of this replacement check is not in the bucket; only its report is kept.
- Extra tests for the paper's reviews: all 80 crossing fleets of item 4 were driven again with random variation in the actions (10 episodes each, and 30 more for the 60 fleets with a budget). From these drives and from stored data we made tables on: arrival order at the stop line, pairs of manoeuvres, other possible rules (for example "the car turning left yields"), crash type and place, and sensitivity to the near-miss thresholds.
- Environment tests (12 October, section 9): every stage's saved policy at eight kinds of road, alone and in traffic, and the final fleets at several traffic volumes. 2,850 tests.
G. Development runs
228 earlier run folders that are not used in any result. Their names start with P0, P1, v2, v3, v5-P0,
lab, v6lab, chk or smoke. (Careful: v5-P0 is a cancelled first attempt; v5-school and v5r count.)
They are early trials on older versions of the roads or of the training program: no-budget and budget trials at the
crossing, the roundabout and the merge, trials in early cities, 13 attempts to tune the driving school, and short
lab and check runs. They shaped the design.
The bucket also holds a few small trial folders of the test programs (citytest_smoke, citytest_dev,
crossplay/f3_smoke, tmp, envtest/envtest_smoke) and a first, incomplete run of the round-1 city test
(citytest_pol*, 16 fleets). That test was then run on the lab computer for 53 of the 54 round-1 fleets
(citytest_lab_*).
In total the bucket holds 894 result folders from training that count (each stage of a ladder is one folder). All training ran on Vega, a supercomputer; some tests ran on a lab computer. All raw results are in a private Hugging Face storage bucket (about 47 GB).
6. What we found
- The cars do find a rule. Without a budget, cars at the crossing mostly follow "first come, first served" (94 % of the time).
- A budget did not teach a safer rule. We predicted that a tight budget would switch them to something like "yield to the car on your right". No fleet switched. The first-come rule only became weaker (83 to 87 %).
- Collide, negotiate, freeze. With no budget, cars meeting at a junction often both go and collide. With a medium budget they slow down and one waits: they negotiate. With a tight budget, both wait and nobody moves.
- Identical cars take different roles. Under a budget, some cars became cautious and others assertive, although all started as copies of one driver.
- A budget can be met by driving less. Risk is counted per moment of driving, so a parked car looks safe.
- Freezing can stick. Fleets that met a tight budget first at busy junctions (the curriculum) stopped driving, and stayed frozen even after the budget was removed: 6 of 9 fleets, against 0 of 9 for direct training. Giving the cars more randomness in their actions prevented it and cured it.
- Honest limit. These are learners, not road-ready drivers. The best fleets finish about half of their whole-city trips in 24-car traffic.
7. The first paper
"Collide, Negotiate, Freeze", written for the ICAART 2027 conference (deadline 22 October 2026). It is 12 pages, is on Overleaf, and three practice reviews by AI reviewers each rated it "weak accept". It is about what a safety budget does to the road rules.
8. The viewer
A 3D web page of the city (artifacts/sbcs_city.html). It replays recorded drives, lets you ride along with one
car, and has a night view that shows what that car senses: its laser beams, the cars it tracks and its risk. It can
also show a trained fleet driving live (python -m sbcs.live, then open http://localhost:8770). This laptop keeps
up with about 70 cars in real time.
9. The new direction, and what we did today
The professor wants a second paper on his original, wider question: can cars in a city without signals learn shared road rules that make daily commuting safe and reliable, and how do they negotiate? He asked for results for each kind of road (straight road, T-junction, four-way crossing, roundabout, highway ramps, diamond interchange, street grid, full city), tests with different amounts of traffic, pictures of where cars drive, a comparison of the three models, and the safety measures.
We checked the bucket against that list. Most of it was there. Missing were results for each kind of road on its own and tests with more or fewer cars. So today we ran one new test job. No new training was needed:
- We took the saved brain from the end of every stage of the ladder (105 saved fleets, 5 seeds).
- We drove each one at each of the eight kinds of road, with one car alone and with the usual number of cars.
- We drove the final fleets with different amounts of traffic: 1 to 12 cars at small scenes, 1 to 48 in the city.
- That is 2,850 tests. Each records every trip (arrived, crashed, left the road, how long it took), every meeting at a junction (who went first, how close it was), the risk cost split into its parts, and every car's position five times per second for plots.
Before the job went to Vega, the test program was checked by independent AI reviewers, nine problems were fixed, and a
14-test trial run was read back from the bucket. The results are in the bucket folder envtest/envtest_v1/, with a
README that explains every table. docs/bucket_guide.md lists everything in the bucket and what each of the
professor's points can use.
10. What is still open
- The plots for the new paper are not drawn yet. The data for them is in the bucket.
- The new tests show how good the cars are at the end of each stage. They do not show learning minute by minute for one kind of road on its own. That would need new training (about one day on Vega).
- No fleet was trained from zero without driving school, if "direct PPO" is meant that way.
- The new paper itself is to be written, in a separate chat that starts from the bucket.
Xet Storage Details
- Size:
- 18 kB
- Xet hash:
- 30979fa87f9327fbeb36a0feca13c6c6a7563f0c531d20168e89a0c2fd5752db
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.