Echo: project timeline
Teaching a car when to ask other cars for information, and whom. Click a step for the details.
PHASE 1 · Highway with normal traffic · Nov 5 – Nov 14
- Nov 5
Set up the world Custom highway, stable car IDs, messages, first world model (MLP)
- What we built
- A custom HighwayEnv with one ego car and ten neighbours, stable vehicle IDs, intent fields, a message format, a random-policy data collector, and the first MLP world model.
- Why
- Everything later needs a world where cars can be identified and asked.
- Nov 12
Exp 1–2: a DQN asks one car per step 5-step planner + request DQN, 2,000 episodes · reward rose, but no baseline
- What changed
- The DQN became a request policy: ask one visible car or nobody, with a cost per question. A 5-step planner used the MLP to drive.
- Result
- Average reward rose from 6.42 to 8.67 after resuming training to 2,000 episodes, and the communication cost fell.
- Lesson
- Without comparing against "ask nobody" on the same seeds, we couldn't tell whether asking helped at all.
reward 6.42 → 8.672,000 episodes - Nov 12
Exp 3: ask many cars at once (MLPx + DQNx) One ask / don't-ask choice per visible car · tended to ask nobody
- What changed
- MLPx, a world model that reads messages from several cars, and DQNx, which decides separately for each visible car whether to ask.
- Result
- At a cost of 0.1 per car, the policy drifted towards asking nobody.
- Lesson
- Evaluation needs a no-request baseline to show whether messages are worth their cost.
- Nov 13
Exp 4: time-to-collision messages Messages kept apart from what the car sees · same as asking nobody
- What changed
- Observations only hold position and speed; messages carry intent, target lane and time to collision.
- Result
- On the same seeds, the trained DQNx and "ask nobody" both scored 5.54; asking everyone scored −0.53.
- Lesson
- Communication got cheaper, but there was still no measurable benefit from it.
DQNx 5.54ask nobody 5.54ask everyone −0.53 - Nov 14
Check the world model against reality Imagined vs real outcomes · planning 3 steps works much better than 5
- What we did
- Compared MLPx's imagined outcomes with real environment rollouts from the same state and action.
- Result
- Planning 5 steps ahead picked the right move only 23% of the time; 3 steps: 67%.
- Lesson
- Imagination errors pile up, so the planner switched to 3 steps.
5 steps: 23%3 steps: 67% - Nov 15
Turning point: why did asking never help? Messages said nothing the car couldn't already see, and nothing forced a risky choice
- Diagnosis
- The messages (current acceleration, time to collision) could mostly be worked out from what the car already observes. And on an open highway the car never has to make a decision that depends on them.
- Decision
- Build a scenario where the information is truly hidden and actually changes the best move.
PHASE 2 · Forced merge with hidden yielding / aggressive drivers · Nov 15 – Nov 17
-
Merge scenario + information check Hand-written rules, no learning · asking the rear car: 4.64 → 7.35
- The scenario
- A stalled car blocks the ego's lane, so it must merge into a line of 9 cars. Each is secretly yielding (lets you in) or aggressive (speeds up and closes the gap).
- Hidden?
- A classifier guessing driver type from what the ego sees: 51.4%, exactly chance.
- Useful?
- Without asking: gamble (5.17, 52% crashes) or wait for a safe gap (4.64). Asking the rear car: 7.35 with 0% crashes.
classifier 51.4% = chanceinformation worth +2.7300 seeds -
MLPx v1–v3: crash prediction, 10,000 episodes Drives better overall · but the planner ignores messages
- What changed
- v1: the first merge world model. v2: a "will this step crash?" output. v3: 10,000 episodes of data.
- Result
- Crash prediction became very good (AUC 0.99), but messages barely changed the predictions.
- Lesson
- The data had the signal (merging in front of an aggressive car crashed 76% of the time, a yielding one 31%). The plain MLP couldn't match each car with its own message.
-
MLPx v4: each car paired with its own message Messages start to matter · asking the rear car worth only +0.66
- What changed
- A per-vehicle network: each car is encoded together with its own message, then all cars are pooled into a scene summary.
- Result
- The planner finally drove better when it asked, but the gain was small.
- Lesson
- A bad merge crashes 1–2 steps later; the planner only saw that through blurry imagined states.
-
Request DQN, run 1 One car or nobody per step · 6.27, same as asking nobody (6.23)
- What changed
- A new request DQN that scores each visible car with one shared network, like MLPx.
- Result
- It asked rarely and picked the rear car twice as often as random, but drove no better than asking nobody.
- Lesson
- With the planner gaining so little from messages, there was almost nothing for the DQN to learn.
-
MLPx v5: "will I crash in the next 3 steps?" Catches merges that go wrong later · asking the rear car worth +2.68
- What changed
- A second crash output that predicts a crash within the next 3 steps, from the real observation and the real messages. The planner uses it to judge its first move.
- Result
- Asking the rear car: 8.47 with 0% crashes, against 5.79 for asking nobody. The true value of the information is +2.7.
- Lesson
- The planner now uses messages fully.
rear rule 8.47ask nobody 5.790% crashes -
Request DQN, run 2 Same DQN, better planner · learned never to ask (5.78)
- Result
- It asked only 0.3 times per episode and scored like asking nobody.
- Lesson
- While practising it asked one of ~9 cars at random, so it almost never asked the right car at the right moment. And the payoff came several steps after the question.
-
Request DQN, run 3: the first one that learned to ask Practise on target-lane cars, look 3 steps ahead · 6.77 vs 5.79, crashes 18% → 2%
- What changed
- While practising, it mostly asks cars in the lane it wants to enter, and it learns from 3-step returns so the later payoff reaches the question. 3,000 episodes.
- Result
- Beats asking nobody by +0.98 (about 3 standard errors), cuts crashes from 18% to 2%, and sends 57% of its questions to the rear car (random: 12%).
- Still missing
- It asks twice as often as the rear-car rule (13.5 vs 6.7 per episode) and merges later (7.8 s vs 4.9 s).
DQN 6.77ask nobody 5.79rear rule 8.47crashes 2% - Nov 16
Longer training, other seeds 6,000 episodes: 6.28 · other seeds: 5.96–6.87 · results depend a lot on luck
- What we tried
- Run 3's setup for 6,000 episodes; the same setup with two other training seeds; and steadier settings (half the learning rate, slower target updates).
- Result
- 6,000 episodes did worse (6.28, crashes 13%). The other seeds scored 6.87 and 5.96. The steadier settings scored 6.11.
- Lesson
- The training score swings a lot, and the saved model was picked from a noisy training average.
- Nov 16
Pick the saved DQN on validation roads Same training, better choice of model · 3-run average 6.53 → 7.09
- What changed
- Every 250 episodes the DQN drives 100 fixed validation roads without exploring, and the best-scoring model is kept.
- Result
- Seeds 0 / 1 / 2: 6.92 / 7.45 / 6.90. Every run now beats asking nobody, crashes 1–4%.
- Still missing
- It asks about 18 times per episode, against 6.7 for the rear-car rule.
average 7.09crashes 1–4% - Nov 17
Where the DQN asks + cost sweep Wrong car at ~half the key moments · asks 15–20 times or never, whatever the cost
- Where it asks
- At the moments where the rear car's answer changes the move, it asks the rear car only 36–63% of the time, often the front car instead. About half its questions come after the merge.
- Cost sweep
- Trained at costs 0, 0.1, 0.2 and 0.5 (3 seeds each). Each DQN asks almost every step or never; from cost 0.2 every run stops asking, though asking still pays.
- Lesson
- One useful question is a small signal in a lot of noise, so the DQN never learns when to ask.
- Nov 17
Value-of-information rule: ask only if it changes the movePAST The planner imagines both answers, no training · 8.52, matches the hand-written rule at every cost
- How it works
- For each car in the target lane, the planner imagines both answers ("yielding" and "aggressive"). Asking is worth how much better the ego could drive knowing the answer than with the move it would make without asking. It asks the most valuable car if that beats the cost.
- Result
- At cost 0.05: 8.52 against 8.47 for the hand-written rule. Across costs 0 to 0.5 it matches or beats that rule everywhere (6.78 vs 5.44 at 0.5) and asks less as cost rises: 16.4 → 2.7 questions per episode.
- Fix along the way
- The first version compared against the wrong baseline and merged without asking in 6 of its 8 crashes. Comparing with the move the ego actually makes without asking fixed that.
- Still missing
- It crashes 2–4%; the hand-written rule crashes 0%.
8.52 at cost 0.05rear rule 8.47DQN 7.09no training - Nov 19
Four-lane intent-aware world model Four lanes, hidden behavior, eight spatial message slots · 26,597 transitions merged
- Data
- Combined informed and random no-message transitions from a four-lane HighwayEnv setup, with aggressive and defensive vehicles and fixed spatial message slots.
- Model
- A compact 116-input MLPx predicts next state and reward only. One-step evaluation is strong; open-loop error grows across three- and five-step imagination.
- Result
- 26,597 transitions are available for world-model training.
26,597 transitions116 inputs3 / 5-step evaluation - Nov 19
Train the request DQN Ask eight spatial slots or nobody · returns rose, but crashes and loss remain high
- What changed
- The DQN chooses which visible spatial slot to ask. A frozen three-step MLPx planner then chooses the ego driving action.
- Logging
- Each episode records return, mean loss, epsilon, request count, crash, and truncation status.
- Lesson
- Returns improved during training, but crash frequency remains high and the rising loss indicates that the request DQN needs stabilization.
- Nov 19
Render and inspect the learned policy Color-coded vehicles, crash frames, and requested-car highlights · behavior is easy to verify
- Visualization
- The ego is green, aggressive vehicles orange, defensive vehicles blue, and crashed vehicles red. A yellow circle marks the vehicle whose message was requested.
- Tool
scripts.evaluation.render_request_dqndisplays the DQN request and the planner's ego action at every step.
- Nov 19
Experiment 2: collect more data and retrain MLPx 223,375 transitions from 2,000 source episodes · 96.55% three-step no-message action agreement
- Training
- 197,553 informed and 25,822 random no-message records. MLPx trained for 50 epochs, with best test loss 0.004263 at epoch 42.
- Evaluation
- Three-step no-message state MAE 0.0213 and reward MAE 0.0422 on 29 valid states. All-message agreement was 68.97%. Five-step tests had 11 valid states per mode; incomplete candidate rollouts were excluded.
- Nov 19
Experiments 1 and 2 evaluated 200 episodes per policy, fixed seed range · Experiment 1 outperforms Experiment 2
- Experiment 1
- DQN return 14.955 and crash rate 92%, versus no-request return 13.070 and 99% crashes.
- Experiment 2
- After 1,000 DQN training episodes, evaluation return was 12.326 with 94.5% crashes, versus 11.973 and 93% for no requests. More WM data has not improved complete-system results in this comparison.
- Inspection
- Matching training graphs and an Experiment 2 video are available. The renderer now labels the requested vehicle and shows its exact intent response and the ego action on the frame.
- Details
- DQN results, graphs, and videos · Training commands · World Model results and graphs
- Nov 19
Experiment 3: correct message slots and request actions 263,375 transitions · frozen MLPx + retrained DQN · consistent spatial encoding
- Fixes
- Message records preserve all eight spatial positions. DQN actions 0–7 refer to fixed spatial slots; action 8 asks nobody. Empty requests are masked during selection and target calculation.
- World Model
- 50 epochs, best test loss 0.004056 at epoch 25. On 299 sampled states, three-step agreement is 81.61% without messages and 81.94% with all messages. The corrected evaluator includes early-terminal candidates.
- Limits
- Older MLPx results used a different evaluation protocol and are not directly comparable.
- Nov 19
Resume DQN to 2,000 episodes: evaluation worsens Full-state resume and combined training graph · return 15.585 → 15.142; crashes 88% → 90.5%
- Training
- The first continuation reused weights but restarted optimizer/replay state. New latest.pt saves support full-state resume. A combined graph shows all 2,000 episodes with a marker at the continuation boundary.
- Decision
- The 1,000-episode fixed-action model is restored as active best.pt. The 2,000-episode model and resumable state are retained.
- Nov 19
Selected Experiment 3 policy: modest overall progressPAST Same 200 evaluation seeds · return +4.2%, eight fewer crashes versus Experiment 1
- Comparison
- Experiment 1: return 14.955, crashes 92%, requests 5.040. Selected Experiment 3: return 15.585, crashes 88%, requests 7.015.
- Communication
- Experiment 3's no-request baseline crashes at 88.5%. Its learned requests avoid only one additional crash in 200 episodes; a reliable safety benefit is not established.
- Videos
- All experiments have seed-10 recordings with identical render settings and intent overlays. They crash at steps 15, 8, and 10 respectively; one scenario does not replace aggregate evaluation.
- Details
- Policy results and videos · MLPx results · Run guide
- Nov 19
Experiment 4: diagnose crashes and add the safety guard Speed cap, braking checks, and lane-change clearance · 97% crashes → 0% on guarded validation
- Diagnosis
- The learned planner repeatedly accelerated its internal target speed toward 50 m/s and attempted unsafe or overlapping lane changes.
- Fix
- A deterministic executive guard caps the target speed at 30 m/s, brakes for low clearance or TTC, checks destination-lane gaps, and blocks overlapping lane commands.
- Result
- The guarded validation eliminated the observed crash regression while preserving real lane changes. The guard is now shared by training, evaluation, and rendering.
30 m/s capTTC 3 sclearance 8 m - Nov 20
Experiment 5: matched hidden-intent worlds Identical public state, stay vs cut-in future · messages reduce crashes, DQN5 asks too often
- Data and model
- Collected 144,945 transitions and trained a 118-input / 57-output WM5 that includes ego target speed and target lane.
- Controlled result
- The stage-balanced WM5 reduced one-shot challenge crashes from 12/200 without messages to 6/200 with messages.
- Learned policy
- DQN5 gained a small safety benefit but sent 33.31 requests per ordinary episode and 1.88 per intent trial on the later shared-seed comparison.
144,945 transitions118 inputs12 → 6 controlled crashes - Nov 20
Experiment 6: teach the DQN to avoid redundant requests Penalty when a reply changes no driving action · roughly half the requests, better same-seed return
- Teacher signal
- During training only, compare the planner's move with and without the selected reply. A request that changes nothing receives an extra 0.10 penalty; deployed observations remain public.
- Ordinary roads
- DQN5 → DQN6: requests 33.31 → 16.88, adjusted return 34.943 → 35.801, with zero crashes for both.
- Intent trials
- DQN5 → DQN6: requests 1.88 → 1.04, return 2.563 → 2.597, crashes 10/200 → 9/200.
- Controller follow-up
- A proactive 6-second caution mode plus lane/speed cooldowns removed rapid reversals and increased completed lane changes from 171 to 240 across 100 roads, with zero crashes and nearly unchanged return.
- Limit
- DQN6 is the strongest learned request policy, but asking nobody still has the highest cost-adjusted return.
1,000 episodes240 lane changes / 100 roads63 tests pass - Nov 22
Experiment 7: oracle-taught request policy (BC on privileged teacher)PAST Privileged simulation oracle generates clean demonstration labels · slashes cut-in crashes by 40% (124 → 75), highest net return
- Teacher oracle
- A privileged oracle tests candidate queries in parallel simulation copies, picking "Ask" only when intent changes the outcome and beats the 0.05 request cost. Rare ask labels are balanced during behavior cloning.
- Cut-in trials (2000)
- DQN6 → Exp 7: cut-in crashes dropped 124 (6.20%) → 75 (3.75%) against 179 (8.95%) for blind ask-nobody. Net return rose to 2.631 with fewer requests (0.75 vs 0.97 per trial).
- Highway speed
- Cruising speed preserved at 27.0 m/s with zero false-alarm hesitation.
2,000 cut-in trials75 crashes (3.75%)40% fewer crashes vs DQN6return 2.631 - Nov 25
Experiment 8: fine-tune requests with Double DQNNOW Online mixed-scenario replay from the Experiment 7 policy · fewer intent crashes, but more communication
- What changed
- The online network now selects the next valid request while the target network evaluates it. Standard DQN and Double DQN are separate policy classes:
RequestDQNandRequestDDQN. - Training
- Initialized from the Experiment 7 behavior-cloned weights, kept the Experiment 5 MLPx frozen, and fine-tuned for 1,000 mixed ordinary and paired-intent episodes.
- Standalone result
- Ordinary roads finished with 0 crashes across 100 episodes. Paired-intent evaluation produced 17 crashes in 400 trials (4.25%).
- Controlled comparison
- On identical seeds and controller settings, paired-intent crashes were 24 for Experiment 6, 16 for Experiment 7, and 17 for Experiment 8. Mean requests were 1.02, 0.75, and 1.72 respectively.
- Conclusion
- Double DQN is a viable, stable policy variant and improves safety over Experiment 6. Experiment 7 remains the best-balanced policy because it has slightly fewer crashes, substantially fewer requests, and the highest cost-adjusted return.
1,000 training episodescrashes: 24 / 16 / 170% ordinary-road crashes82 tests pass
PHASE 3 · Build and test the informed world-model pipeline · Nov 19
PHASE 4 · Safety, hidden intent, and selective requests · Nov 19 – Nov 20
PHASE 5 · Double-DQN request-policy experiment · Nov 25