DeepanSadhukhan/sbcs / envtest /SCENARIOS.md
DeepanSadhukhan's picture
|
download
raw
8.4 kB

Isolated conflict scenarios: definitions, measures, runs

Written 2026-10-12 for the professor's outline. Eight scenarios, each trained on its own, each with: a definition of a conflict, performance measures, a way to visualise it, tests at several traffic volumes and constraint levels, and a check for human-like behaviour. Run ids and bucket folders are at the end.

Common to every scenario

Cars and sensing. 8 independent operators (networks); lights off; no signs. Same sensing as everywhere in the project (72 lidar beams to 50 m, the four nearest cars by radio, road preview, route guidance).

What a conflict is (as the code measures it, sbcs/events.py, sbcs/safety.py).

Kind Definition Where
Crossing or turning conflict Two cars whose planned paths come within 2 m of each other and that come from different upstream lanes. The event opens when both are within 40 m of that point and closes when both have passed (or after 40 s) junctions
Merge contest A car on the ramp or acceleration lane and the nearest mainline car in the next lane within 20 m. It ends when the ramp car has merged; whoever is ahead then went first on-ramps
Near miss by time to collision (TTC) With both cars keeping their speed and heading, their bodies would touch within 1.5 s everywhere, including car-following
Near miss by gap (PET) The second car reaches the conflict point less than 2 s after the first has cleared it junctions
Collision, road departure Body contact; leaving the paved road (or hitting a kerb at speed) everywhere

Safety cost per car-step (the quantity the budget limits): 1 per collision step + 1 per road departure + 0.1 x (1 - TTC / 1.5 s) + 0.5 x (1 - PET / 2 s), the last two only below their thresholds. Charged to both cars of an encounter.

Performance measures, all scenarios.

Group Measure Table
Reliability share of trips that arrive; share that crash, leave the road, miss a turn, time out trips
Efficiency travel time and time stopped per trip; delay against the same fleet with one car; arrivals per minute trips
Safety cost per car-step and its four parts; crashes per km; minimum TTC and PET per conflict rows, trips, events
Negotiation who goes first, wait before entering, share of conflicts resolved without contact, standoffs events

Constraint levels. none (plain PPO), 1/2 and 1/4 of the unconstrained crossing cost (0.00158 and 0.00079 per car-step). The crossing also has 1/10 (Study 1).

Traffic volumes in tests. 1, 2, 4, 8, 12 cars at the small scenes (they have 15 to 62 places to start from); 1, 8, 16, 24, 32, 48 cars in the grid and the city.

Visualisation, all scenarios. Trajectory heat map (where cars drive) and speed map from traj; conflict points coloured by outcome (passed, near miss, collision) from events.px, py; arrival and crash share against volume; cost parts as stacked bars per constraint level; learning curves from metrics.jsonl.

Per scenario

Scenario (scene) Conflict that matters Scenario measure beyond the common ones Human behaviour to test, and how
Straight road (school_street) No crossing paths, so no junction events. Conflicts are pulling out of a parking space in front of a moving car, car-following and parking: TTC near misses and contacts TTC near misses per km; time to pull out; share parked correctly Gap acceptance: does a parked car wait for a gap before pulling out (waiting time against the gap to the next car, from traj); keeping a following distance
T-junction (site_t) Crossing and turning conflicts at one 3-leg junction Share of conflicts resolved; wait before entering Does the side street yield to the through road, or first come first served (a_arrived_first, relation, move)
4-way crossing (cross) Crossing and turning conflicts, four equal arms Accuracy of "first to arrive goes first"; PET First come first served; yield to the right; left turn yields to oncoming
Roundabout (roundabout) Entering car against circulating car Share of entries that go second to a circulating car Yield to the car already on the ring (a_on_ring, b_on_ring, first)
Highway on-ramp (merge) Merge contest on the 200 m acceleration lane Share of merges without a near miss; speed at the merge Zipper merging and gap choice: mainline car slows or changes lane, ramp car matches speed (a_ramp, first, speeds)
Diamond interchange (site_diamond) Off-ramp and on-ramp meeting the street at two junctions, plus merges back onto the freeway Share of freeway cars that take the exit (outcome wrong = missed exit); conflicts at the two ramp junctions Slowing on the off-ramp; yielding at the ramp junction; merging
Street grid (city@sw) All junction conflicts of one district (9 T-junctions, 2 crossings, 1 roundabout) over multi-junction trips Trip completion over several junctions; delay per junction The same rules holding from junction to junction
Full city (city) Everything, 41 junctions Whole-trip completion; crashes per km One rule across junction types

Models and the result tables

Model Isolated scenario Run ids
Direct PPO trained on the scenario only, no budget v7-iso-<scenario>-none-s{1..5}-I
PPO-Lagrangian the same with a budget of 1/2 or 1/4 v7-iso-<scenario>-d0.00158-…, -d0.00079-…
PPO curriculum the fleet that came through the traffic curriculum, tested at the scenario v6-S2-cur-* (B1, B2, B3), in envtest/envtest_v1
Parameter-shared PPO (baseline) one network for the whole fleet, no budget v7-iso-<scenario>-shared-s{1..5}-I
More constraint levels and baselines budget 1/10; fixed price 1 and 4; MAPPO; MAPPO-Lagrangian; CoPO-style coordination …-d0.000316-…, -lam1-, -lam4-, -mappo-, -mappol-, -coord45-

<scenario> is one of street, t, cross, roundabout, merge, diamond, grid. Each: 30M car-steps, 5 seeds, started from the city-school graduate of the same seed. Full city: direct PPO and PPO-Lagrangian are Study 2's direct plan (v6-S2-dir-none, -d0.00158, v6r2-S2-dir-d0.00079, 120M); its shared baseline is v7-iso-city-shared-s{1..5}-I.

Tests of the isolated fleets at every volume: bucket folders envtest/envtest_iso/, envtest/envtest_isoextra/, envtest/envtest_isosota/ and envtest/envtest_isocity/ (same tables as envtest/envtest_v1/, see its README). Training curves, replays and conflict records: runs/<run id>/.

Supporting experiments

  • Ablations (done, crossing): sensing (full, no arrival times, lidar only), price update rule (gradient ascent or PID) and its speed, fixed price instead of a budget, one shared network, one shared price, start from different drivers, no gradual tightening. City: curriculum against direct, tightening speed, exploration floor, unfreezing.

  • Comparison with other methods, each at every small scenario (5 seeds, 30M steps, same sensing and reward):

    Run id part Method What it is here
    shared Parameter-shared PPO (often called IPPO) one network for the whole fleet, no budget
    mappo MAPPO (Yu et al., 2022) one network; the critics also see the mean observation of the other cars and their number (centralised training, decentralised driving). Our own implementation in the same trainer
    mappol MAPPO-Lagrangian (Gu et al., 2023) MAPPO with a budget of 1/2 and an adaptive price per operator. It is the simpler of the two methods of the MACPO paper; MACPO itself (trust-region updates) was not implemented
    coord45 CoPO-style coordination (Peng et al., 2021) one network; each car is trained on cos 45° x its own reward + sin 45° x the mean reward of the other cars. CoPO learns this angle and uses a 40 m neighbourhood; here the angle is fixed and all cars of the scene count. So this is CoPO's idea, not CoPO
    lam1, lam4 Fixed-penalty PPO a fixed price on risk (1 or 4) instead of a budget

    Also at the crossing only (Study 1): PID-Lagrangian, one shared price. These are re-implementations inside our trainer, run once with our settings, not the authors' code or tuning. Say so wherever they are compared.

Xet Storage Details

Size:
8.4 kB
·
Xet hash:
674c4e1385028d1ed69f85d756bca351f3a00f031fec977f9a28f13032e2d55a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.