← all repositories
lexfridman/deeptraffic

MIT's browser-based traffic jam for neural networks

A deep reinforcement learning competition where you train a neural network to weave through highway traffic—safety systems included, collisions not your problem.

1.8k stars JavaScript Domain AppsAgentsLearning
deeptraffic
Velocity · 7d
+0.6
★ / day
Trend
steady
star history

What it does

DeepTraffic is a browser-based competition and teaching tool from MIT’s Deep Learning courses. You write a neural network in JavaScript that controls one or more vehicles on a seven-lane highway, choosing every 30 frames whether to accelerate, brake, change lanes, or cruise. The goal is pure speed: get your vehicle through dense traffic as fast as possible. A built-in safety system handles collision avoidance, so your algorithm can focus on aggressive lane-weaving rather than not dying.

The interesting bit

The competition doubles as a crowdsourced hyperparameter study. Thousands of submissions have produced a t-SNE plot showing clusters of similar solutions—competitors independently converging on comparable network architectures and parameter choices. The README also notes a subtle multi-agent wrinkle: in version 2.0, your algorithm runs on 11 vehicles simultaneously, but each makes greedy local decisions, so your own cars can obstruct each other.

Key highlights

  • Runs entirely in the browser via the DeepTraffic site; this repo provides starter code (network_basic.js achieves ~66.8 mph)
  • Input is an occupancy grid showing free space and surrounding vehicle speeds
  • Safety system overrides your network when collisions are imminent
  • Leaderboard and visualization tools for top submissions
  • Published research backing: NIPS 2018 Deep RL Workshop paper with citation provided

Caveats

  • The repo itself is minimal—just a basic starter agent and documentation; the actual simulation and training infrastructure lives on MIT’s external site
  • Multi-agent mode lacks true coordination; vehicles don’t plan jointly, which limits the sophistication of emergent behavior

Verdict

Worth an afternoon if you’re learning deep reinforcement learning and want a concrete, visual problem with immediate feedback. Skip it if you’re looking for a standalone framework or serious autonomous driving simulation—the physics are simplified and the real compute happens in someone else’s JavaScript sandbox.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.