Project Info
What if the car had chosen differently?
Inspiration
You can't drive your way to safety. RAND showed self-driving cars would need hundreds of millions — sometimes hundreds of billions — of miles to statistically prove they're safe, because the moments that actually matter (a jaywalker, a near-miss, the half-second a kid steps off the curb) almost never happen per mile. No fleet can drive far enough to catch them all. So the industry simulates instead. But the world models that do it live inside Waymo and Nvidia, behind proprietary fleets and TPU clusters. We wanted the version a small team can actually run and inspect: take one logged scene, branch it into the futures that didn't happen, and let a human teach the policy which future was better. RLHF for driving, not chatbots — the same GRPO that taught reasoning models to think, pointed at a steering wheel.
What it does
Improving Autonomous Cars turns a single driving log into a training signal. Pick a scenario — "Near Miss," "Jaywalker" — and watch the ego car drive it in 3D: live LiDAR, bounding boxes, and an Autonomy Stack panel streaming the model's actions and rewards, with an "Explain last decision" button for the reasoning behind each move. Then the counterfactuals kick in — every 10 seconds the dashboard spawns three new sims where the ego chose differently, each drawn as a top-down map of where that decision led. A human ranks those rollouts. A reward model learns the ranking. GRPO trains the policy against it — and the trick is that each scenario's counterfactual set is exactly the "group" GRPO needs for its baseline. A 3D knowledge graph wires every scenario, run, action, and reward together so you can trace why a decision happened, and an analytics page tracks rewards, runs, and incidents over time. Above all of it runs a governed multi-agent safety system: perception, planner, and safety-auditor agents that coordinate in a shared room, run on a durable runtime, and operate under cryptographic intent enforcement — so the agents auditing a driving decision can't go rogue while doing it.
How we built it
Frontend. React 19, TypeScript, Vite. Three.js + React Three Fiber for the 3D sim and LiDAR, Zustand for state, react-force-graph-3d for the knowledge graph, and Hyparquet to read Waymo parquet files straight in the browser. Backend. An Express server that proxies the OpenAI reasoning calls server-side, fully traced. Training. A Python pipeline: a Bradley-Terry reward model over human-ranked rollouts, a GRPO trainer that uses each scene's counterfactual set as its group, and an orchestrator tying them together. Durable agent runtime — Orkes AgentSpan. The long-running work — the counterfactual rollout fleet and the GRPO/reward-model training jobs — runs as durable workflows on AgentSpan. Execution state lives on the server, tool calls retry on failure, and if a process dies the run resumes from the exact step instead of restarting. Crucially, the human reranker is an AgentSpan human-in-the-loop approval gate: the workflow pauses with no timeout, holds state on the server, and waits for a human to rank the rollouts before training continues — exactly the primitive AgentSpan is built for. Agent collaboration — Band. The perception, planner, and safety-auditor agents don't call each other directly. They live in a shared Band room and coordinate by @mention with deterministic (non-LLM) routing, so context stays synchronized and every exchange lands in one audit trail. If one agent misinforms another, Band's control plane catches the cascade instead of letting a bad safety verdict propagate. Intent governance — ArmorIQ. Before the autonomous safety agent acts, ArmorIQ captures its plan, compiles it into a signed Canonical Structured Reasoning Graph, and issues a short-lived intent token with per-step cryptographic proofs. Every action is checked against that signed plan; anything that drifts outside it is blocked at the gate, fail-closed. It governs the agent by intent, not just credentials — which is what you want before an autonomous agent gets anywhere near a driving policy. Observability — Sentry. Full-stack distributed tracing front to back, error boundaries, and performance profiling, with the backend doubling as the Sentry tunnel — so the whole system is traceable instead of a black box.
Challenges we ran into
Counterfactual realism. The instant the ego leaves the logged path, you have no ground-truth sensor data for where it went — the hardest unsolved problem in the field. We used synthetic generation to keep divergent rollouts coherent, and learned firsthand why the frontier pours money into generative world models here. Learning the reward instead of writing it. "Good driving" is too fuzzy to hand-code without going brittle, so the whole point became learning it from human preference — building the ranking → reward-model → GRPO chain end to end and getting the signal to actually move the policy. An intent-governance SDK that fought back. Integrating ArmorIQ surfaced real bugs in its intent-verification layer — a verifyToken() that returned true even when the signed planHash had been tampered with (an integrity hole in the exact thing the SDK exists to protect), and a delegate() that was dead against the live backend. We shipped workarounds and wrote up all eight findings with root-cause traces. Backend from scratch, mid-hackathon. The app started frontend-only; the LLM proxy and the Sentry tunnel meant standing up a server tier under the clock.
Accomplishments we're proud of
The loop actually closes: log → counterfactual → human rank → GRPO → knowledge graph. Not a diagram of it — a running version. Four sponsor integrations that each own a real subsystem, not logos bolted on: AgentSpan runs the durable pipeline and holds the human-rank approval gate, Band is the agents' shared room and audit trail, ArmorIQ is the cryptographic intent gate on the safety agent, and Sentry is full-stack tracing across the whole thing. We found and documented 8 real bugs (2 high-severity) in a production intent-assurance SDK while wiring it in — with honest triage separating the SDK's faults from our own pre-existing dependencies. We can say exactly where we sit next to Waymo, and built the honest, transparent version of a technique the frontier keeps locked up.
What we learned
The RLHF/GRPO playbook ports cleanly from language to driving: a scene's counterfactual rollouts are the GRPO group, and a human ranking them is the preference signal. AV safety is a long-tail and reward-specification problem far more than an average-driving one — both squarely in human-feedback RL's wheelhouse. Counterfactual realism breaks the moment trajectories diverge; reconstructive methods can't follow, which is why generative world models are the real frontier. Multi-agent safety is three different problems — coordination (Band), durable execution with human checkpoints (AgentSpan), and intent enforcement (ArmorIQ) — and they don't collapse into one tool. Humility: Waymo's world model, the open-source Waymax simulator, and Wayve's GAIA-1 are years ahead. Our edge is transparency and access, not scale.
What's next
for Improving Autonomous Cars Real closed-loop data — swap synthetic scenes for the Waymo Open Motion Dataset via Waymax, so the counterfactuals are grounded in real driving. A generative world model so divergent rollouts stay realistic once the ego leaves the logged path. Active preference collection — surface the most informative rollouts to rank, so every human label trains the reward model harder. A continuous flywheel — re-rank as the policy shifts so the reward model never goes stale. From advisory to audit-and-veto — combine ArmorIQ's fail-closed intent gate with AgentSpan's approval checkpoints so the safety system can actually override an unsafe policy, not just flag it.
Improving Autonomous Vehicles
Multi-sim dashboard for autonomous vehicle perception. Replays Waymo scenes in 3D, proposes ego actions via the OpenEnv model, and continuously spawns counterfactual rollouts to compare "what if the ego chose differently?"
Quick Start
npm install
npm run dev
Open http://localhost:5173. The app defaults to mock data mode (no Waymo files needed).
Pages
| Route | Description |
|---|---|
/sim | Main 3D simulator. LiDAR point cloud, bounding boxes, ego vehicle. Autonomy Stack panel shows OpenEnv actions/rewards in real time. |
/dashboard | Camera-grid multi-sim view. Ground truth + auto-spawning counterfactual rollouts. Every 10s, 3 new sims appear with different ego decisions. |
/graph | 3D knowledge graph (ForceGraph3D). Connects scenarios, incidents, runs, actions, metrics, and rewards. Click any node to inspect. |
/analytics | Overview cards, sortable run table, reward timeline chart, incident ticket feed. |
OpenEnv Configuration
The OpenEnv model provides actions and rewards for the ego vehicle.
Mock mode (default): Deterministic pseudo-random actions based on scene context. No external API needed.
Real mode: Set an environment variable to point at your OpenEnv endpoint:
VITE_OPENENV_ENDPOINT=http://localhost:8080/predict
VITE_OPENENV_MODE=real
Then in your code, call configureOpenEnv({ mode: "real", endpoint: import.meta.env.VITE_OPENENV_ENDPOINT }).
The client module lives at src/lib/openenvClient.ts and exposes:
getActionAndReward(input)— single action/reward querygetCounterfactualVariants(input, count)— N variant actions for branching
Waymo Data
Place Waymo Open Dataset parquet files in public/waymo_data/:
vehicle_pose.parquetlidar.parquetlidar_box.parquet(optional)lidar_calibration.parquet
Or drag and drop files directly onto the simulator.
Demo Script
- Open
http://localhost:5173/sim - The sim loads with mock data. Use the scenario selector (top-left) to pick "Near Miss" or "Jaywalker"
- Press Play. Watch the Autonomy Stack panel (right) update every 3s with OpenEnv actions/rewards
- Click "Explain last decision" to see the model's reasoning
- Navigate to
/dashboard— the camera grid auto-populates with counterfactual sims - Watch new tiles appear every 10s. Each shows a 2D top-down mini-map of the ego's divergent trajectory
- Click any tile to see full metrics and action stream
- Go to
/graph— the knowledge graph connects runs, actions, metrics, and rewards. Click nodes to inspect - Go to
/analytics— overview cards, sortable table, timeline chart, and incident feed
Tech Stack
- React 19 + TypeScript + Vite
- Three.js + React Three Fiber (3D rendering)
- Zustand (state management)
- react-force-graph-3d (knowledge graph)
- Sonner (toast notifications)
- Lucide React (icons)
- Hyparquet (browser-native Parquet reader)
Project Structure
src/
pages/ SimPage, DashboardPage, GraphPage, AnalyticsPage
components/ Scene3D, Timeline, and existing 3D components (kept intact)
components/ui/ AppShell, Card, Badge (design system)
lib/ openenvClient, simManager, simTypes
utils/ parquet, waymoLoader, rangeImage, trajectoryData, scenarioAI
store.ts Zustand global state
theme.ts Design tokens (colors, typography, spacing)
mockData.ts Synthetic scenario generation + LiDAR raytracing
Agent stack — ArmorIQ · AgentSpan · Band
Overflow runs an AV-safety agent fleet on three layers of agent infrastructure:
- ArmorIQ (
scripts/armoriq_*.mjs) — governance: every tool call gated by a signed intent token.npm run agent,npm run fleet. - AgentSpan (
scripts/agentspan_*.py) — durable execution: crash-resume, retries, structured output, guardrails, human approval.npm run agentspan,npm run agentspan:fleet. - Band (
scripts/band_agents.py) — cross-agent discovery +@mentioncoordination.npm run band -- auditor.
Python setup (once): uv venv .venv && uv pip install -r requirements-agents.txt — the agents reuse the OpenAI key in server/.env.
See AGENT_STACK.md for the full story and run guide.
Analysis
View
Metric
- 2
- 1
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- ExpressIn code
- HTMLIn code
- JavaScriptIn code
- OpenAIIn code
- PythonIn code
- ReactIn code
- TypeScriptIn code
- Next.jsClaimed
- PyTorchClaimed
8 of 10 appear in the indexed code. 2 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- Claude CodeCommits
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
884 KB
Source files
85
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
Steve-Dusty/overflow
120 files · 1.5 MB · @ 39d6a07
Structure
Interface
36 files · 30%Screens, components and styles rendered to the user.
API & routing
5 files · 4%Request entry points: routes, handlers and controllers.
Application logic
30 files · 25%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript85%
- Python12%
- Markdown2%
- Shell0%
- CSS0%
- YAML0%
- Other (2)0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 29- @armoriq/sdk
- @react-three/drei
- @react-three/fiber
- @sentry/react
- @sentry/vite-plugin
- hyparquet
- hyparquet-compressors
- lucide-react
- react
- react-dom
- react-force-graph-3d
- react-router-dom
- sonner
- three
- zustand
- +14 more
server/package.json
npm · 6- @sentry/node
- @sentry/profiling-node
- cors
- dotenv
- express
- openai
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
Feature verification
3D driving sim replay (LiDAR, bounding boxes, ego vehicle)Verified
Watch the ego car drive in 3D: live LiDAR, bounding boxes
Claimed on readmehigh confidencesrc/components/Scene3D.tsx— 3D scene component presentsrc/components/PointCloud.tsx— LiDAR point cloud rendering componentsrc/components/BoundingBoxes.tsx— Bounding box rendering componentsrc/components/EgoVehicle.tsx— Ego vehicle rendering component
3D knowledge graph (scenarios/runs/actions/rewards)Verified
A 3D knowledge graph wires every scenario, run, action, and reward together
Claimed on Devposthigh confidencesrc/pages/GraphPage.tsx:8— Imports and renders ForceGraph3D from react-force-graph-3dsrc/pages/GraphPage.tsx:840— ForceGraph3D component instantiated with graph node/edge data
8 documented ArmorIQ SDK bugs found while integrating (2 high severity)Verified
We found and documented 8 real bugs (2 high-severity) in a production intent-assurance SDK
Claimed on Devposthigh confidenceARMORIQ_SDK_BUGS.md:16— Table lists verifyToken() tamper-detection bug and delegate() bug, both rated High severityARMORIQ_SDK_BUGS.md:29— Detailed writeup of verifyToken() failing to detect a tampered planHash
AgentSpan durable workflows with crash-resume and human-in-the-loop approval gateVerified
The long-running work... runs as durable workflows on AgentSpan... the human reranker is an AgentSpan human-in-the-loop approval gate
Claimed on Devposthigh confidencescripts/agentspan_fleet.py:8— Sequential durable pipeline (perception >> safety-auditor >> planner >> policy) with retries/resume notedscripts/agentspan_hitl.py:30— approval_required tool decorator implements the human-in-the-loop pause/approve flowscripts/agentspan_resume.py— Dedicated resume script supports crash-resume claim
Analytics page (rewards, runs, incidents over time)Verified
an analytics page tracks rewards, runs, and incidents over time
Claimed on Devposthigh confidencesrc/pages/AnalyticsPage.tsx:59— Tabs for Reward Analysis, Safety, Policy, Runs & Data; actionStats/generateActionStream compute reward/run metrics
ArmorIQ cryptographic intent governance (signed CSRG, intent tokens, fail-closed)Verified
ArmorIQ captures its plan, compiles it into a signed Canonical Structured Reasoning Graph, and issues a short-lived intent token... fail-closed
Claimed on Devposthigh confidencesrc/lib/armoriq.ts:74— authorizeManeuver gates every proposed ego maneuver via ArmorIQ proxy before commit, with allow/block/hold decisionsscripts/armoriq_agent.mjs— Server-side ArmorIQ agent script referenced by ArmorIQ intent flow
Auto-spawning counterfactual rollouts every 10sVerified
every 10 seconds the dashboard spawns three new sims where the ego chose differently
Claimed on Devposthigh confidencesrc/lib/simManager.ts:23— SPAWN_INTERVAL_MS = 10_000 drives actions.spawnRuns() on a 10s timersrc/lib/openenvClient.ts:209— getCounterfactualVariants generates N variant actions used for branching
Bradley-Terry reward modelVerified
a Bradley-Terry reward model over human-ranked rollouts
Claimed on Devposthigh confidencescripts/train_reward_model.py— Dedicated reward model training script found via search for reward_model/RewardModel
Express server proxying OpenAI reasoning calls server-side, tracedVerified
An Express server that proxies the OpenAI reasoning calls server-side, fully traced
Claimed on Devposthigh confidencesrc/lib/llmClient.ts:18— Client calls /api/chat on backend rather than calling OpenAI directly, keeping key server-sideserver/index.mjs— Express server implements the /api/chat proxy and Sentry instrumentation
GRPO trainer using counterfactual set as groupVerified
a GRPO trainer that uses each scene's counterfactual set as its group
Claimed on Devposthigh confidencescripts/train_grpo.py:196— GRPOTrainer / GRPOConfig classes implement group-relative policy optimization training loop
Human ranking of rolloutsVerified
A human ranks those rollouts
Claimed on Devposthigh confidencesrc/pages/RankPage.tsx:67— RankPage implements a drag/rank UI for counterfactual variants, submits preference pairs
Hyparquet browser-native Waymo parquet readingVerified
Hyparquet to read Waymo parquet files straight in the browser
Claimed on readmehigh confidencesrc/utils/parquet.ts:19— Imports hyparquet and hyparquet-compressors to parse parquet in-browser
Mock data mode default / real OpenEnv endpoint configVerified
The app defaults to mock data mode... Real mode: Set an environment variable to point at your OpenEnv endpoint
Claimed on readmehigh confidencesrc/lib/openenvClient.ts— configureOpenEnv/getActionAndReward support mock vs real endpoint modes per README configsrc/mockData.ts— Synthetic scenario/mock data generation module
Multi-agent safety system (perception, planner, safety-auditor) in shared Band roomVerified
perception, planner, and safety-auditor agents that coordinate in a shared room
Claimed on Devposthigh confidencescripts/band_agents.py:40— Defines overflow-perception-agent, overflow-safety-auditor, overflow-planner-agent with handoff routing between themscripts/band_agents.py:112— @mention based routing logic between Band peers
Sentry full-stack tracing with backend Sentry tunnelVerified
Full-stack distributed tracing front to back... the backend doubling as the Sentry tunnel
Claimed on Devposthigh confidenceserver/index.mjs:44— /api/tunnel endpoint forwards browser Sentry envelopes to Sentry ingestsrc/lib/sentry.ts:18— @sentry/react initialized client-side
Training orchestrator tying reward model + GRPO togetherVerified
an orchestrator tying them together
Claimed on Devpostmedium confidencescripts/train_full_pipeline.py— Pipeline script references both reward model and GRPO stages
Camera-grid multi-sim dashboard with top-down mini-mapsCode-supported
Camera-grid multi-sim view... each drawn as a top-down map of where that decision led
Claimed on readmemedium confidencesrc/pages/DashboardPage.tsx— Dashboard page exists and consumes simManager run state for tiled display
OpenEnv action/reward stream ('Autonomy Stack' panel)Code-supported
Autonomy Stack panel streaming the model's actions and rewards
Claimed on Devpostmedium confidencesrc/lib/openenvClient.ts:135— getActionAndReward implements action/reward queryingsrc/lib/simManager.ts:196— simManager calls getActionAndReward to update run state every advance tick
RLHF/GRPO loop closes end-to-end (log to counterfactual to human rank to GRPO to knowledge graph)Code-supported
The loop actually closes: log to counterfactual to human rank to GRPO to knowledge graph. Not a diagram of it, a running version
Claimed on Devpostlow confidencesrc/pages/RankPage.tsx:145— Ranking submission adds preference pairs to training datascripts/train_full_pipeline.py— Pipeline script chains reward-model and GRPO stagessrc/pages/GraphPage.tsx:840— Graph renders scenario/run/action/reward nodes
'Explain last decision' buttonClaimed only
an 'Explain last decision' button for the reasoning behind each move
Claimed on Devpostmedium confidence
An AI agent derived these features from the project’s Devpost page and readme, then searched the code for each one. Verified features are backed by cited code; claimed-only features had no supporting code, which is not by itself proof a feature is missing.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.