Tesla · How it works

From Hand-Written Rules to One Network: How FSD Plans

Tesla says one network now makes the call that search and scoring code used to make.

Camera pixels go into one neural network that drives a steering wheel, while a pile of old rule blocks is crossed out.

A Tesla waits at the end of a side street. It wants to turn left onto a main road. A person is walking across the side street, not at the crosswalk. A car is coming along the main road from the right.

Tesla’s AI Day 2022 talk on planning used a scene like this one: a car on a side street that must yield to traffic from the right and to a pedestrian crossing outside the crosswalk. My drawing below is my own illustration of such a scene. A human driver sorts it out in a blink: let the walker pass, then slot in behind them, ahead of the car if there is room, behind it if not. The car has to make the same call, and it has to do it again every fraction of a second.

For several years the answer came from code that engineers wrote: a search over possible moves and a set of scores. Tesla now says a single neural network makes the call. This part is about what changed, what Tesla has actually said about it, and what nobody outside Tesla can check.

Part 10 of Inside a Tesla. I like the car and the tech, so I researched it to feed my own curiosity; not affiliated with Tesla, not investment advice.

Short version:

  • Planning means choosing a path through time: where to go, how fast, and who yields. In 2021 and 2022 Tesla showed a planner that searched many futures and scored each one with hand-written checks and small networks.
  • From v12, Tesla says one end-to-end network goes from camera pixels to steering and acceleration. Tesla’s v12 release note says it replaced over 300k lines of C++. It learns from human driving.
  • That is harder to debug, because there is no rule to open. Tesla says it uses probes, a world simulator and closed-loop tests. I found no architecture diagram or parameter count from Tesla, and I mark every claim by who made it.

What planning means

By the time the planner runs, the car already has a picture of the road: lanes, cars, walkers, free space. The earlier parts followed that picture being built from eight camera feeds. Planning is the step after it. It turns the picture into a path: where the car will be, second by second, for the next 10 to 15 seconds, as described in notes of Tesla’s AI Day 2021 talk.

That path answers three questions at once:

My own top-down illustration of a car turning left onto a main road, with a pedestrian ahead and a car coming from the right. Three decisions: where to go, how fast, and who yields.

The third question is the hard one. The walker and the other car do not follow a script. What the Tesla does changes what they do, and what they do changes what the Tesla should do.

The problem has an odd shape. Say a parked truck blocks your lane. You can pass on the left or on the right. Both work. A path halfway between them drives into the truck. Engineers call this a non-convex problem: good answers exist, but you cannot find one by averaging or by nudging a bad one a little at a time.

2021: search first, then smooth

At AI Day 2021 (19 August 2021), Ashok Elluswamy described a planner built on that idea. I could not read Tesla’s slides, which are Tesla’s to share, so this section follows the video through transcripts of it, including a viewer’s detailed notes and a full transcript. The planning segment starts at about 1:13:11. The parking demo counts below come from two transcripts of the video, not from my own measurement.

Tesla said the planner works in two stages:

  1. A coarse search finds a corridor of free space that leads to the goal. It can try thousands of maneuvers, for example lane changes, and weigh safety, comfort and the upcoming turn.
  2. A smooth optimiser then fits a path inside the corridor. It scores the path on distance to obstacles, time taken, comfort and jerk (how suddenly the acceleration changes).

Tesla also said the planner runs on every relevant object in the scene, not only on the car. That predicts what others will do. In one example from the notes, the planner worked out that an oncoming car would yield, so the Tesla kept going instead of braking.

The talk had a parking lot demo with numbers. A plain A* search, a classic method that always expands the node that looks closest to the goal, looked at about 400,000 nodes in the demo lot. Adding a navigation route cut that to about 22,000. A Monte Carlo tree search guided by a neural network needed about 288.

Log-scale bar chart of nodes expanded in the AI Day 2021 parking demo: plain A star about 400,000, with a navigation route about 22,000, network-guided tree search about 288. Figures from a viewer’s notes.

A node is one position the search has to examine. Monte Carlo tree search is the family of methods behind game programs such as AlphaGo: try many futures and keep count of which first moves lead to good ones. Per the notes, Tesla named MuZero and AlphaZero as inspiration. The network’s job was to say which branches are worth trying, so the search spends its time in the right place.

I only use the words “Monte Carlo” for this parking demo. They come from the transcripts of the AI Day 2021 video. Some outside papers, such as this Berkeley one, state that Tesla’s planner uses Monte Carlo tree search in general. They point to a blog post, not to a Tesla source. The 2022 talk, next, uses other words.

The AI Day 2022 planning talk (30 September 2022) was given by Paril Jain. I read a machine-made transcript of it. It has errors and its clock may be off from the video, so I quote only short phrases.

The talk starts with the scene from the top of this post. Jain said a check of each other car’s path against the Tesla’s path misses many valid options. Tesla instead plans the Tesla and the others together. The method has a name: “we rely on a framework what we call as interaction search”. The planner “needs to make a decision every 50 milliseconds”.

Here is the idea, drawn small. Each branch is one choice: a goal, or how to interact with one other road user.

Search tree for the left turn. Turn right is pruned as off the route. Under turn left, go after the walker (0.71) beats go before (0.22), and go after the car (0.91) beats go before (0.34). Scores are made up.

Every branch gets a fresh score. According to the talk, the scorers were a mix:

ScoreWho wrote itWhat it asks
Collision checksEngineersDoes this path hit anything?
ComfortEngineersHow hard are the jerk and the acceleration?
Intervention riskA network, trained on FSD Beta interventionsWill the driver likely take over in the next few seconds?
Human-likenessA networkHow close is this path to what people drove?

Low scores prune a branch, so the search keeps its time for promising ones. Jain said running a full optimisation for every branch was too slow, and Tesla built “lightweight queryable networks” that brought the cost to “close to 100 microseconds per action”. He also said the mix lets Tesla avoid relying on “a lot of hand engineered costs”. Two of the four rows are still hand-written.

A patent application describes the same design. It is titled “Artificial intelligence modeling techniques for joint behavior planning and forecasting” (US 2026/0105614 A1) and lists Elluswamy and Jain among its inventors. Its priority date, 30 September 2022, is the day of the talk. The application was published on 16 April 2026. It describes a graph with a goal layer and interaction layers, scores for comfort, physics, intervention likelihood and human-likeness, and pruning of low scores. It says the method can pick a path “without determining trajectories of objects in the surrounding environment”. A patent shows a design. It does not say what runs in a car today.

The talk also handled hidden space. A visibility mask stops at the first thing that blocks the cameras, and the planner can place “ghost objects” in the hidden area, such as a car that could be around a corner, so the car slows down for what it cannot see.

This planner was strong, and it was also a lot of code with many hand-set parts. Years later Elluswamy gave a reason Tesla moved on from that style.

v12: one network

In the ICCV 2025 talk Elluswamy said Tesla moved away from explicit modules because “codifying human values is really difficult”. His examples: braking and yielding trade comfort against speed, and the right balance depends on the moment. He gave a puddle against an oncoming lane as an example, and said you “can’t write it in code, at least not very well”.

So Tesla stopped writing it. The FSD v12.1 release note, first shown to employees on 24 December 2023, says FSD Beta v12 “upgrades the city-streets driving stack to a single end-to-end neural network” and is “replacing over 300k lines of explicit C++ code” (as reproduced by NotATeslaApp, a tracker, not Tesla’s own page). In late August 2023, Elon Musk showed an early v12 on a livestream drive and said that version 11 had over 300,000 lines of C++ and version 12 had “basically none of that”, as InsideEVs reported. InsideEVs also reported that on that drive the car nearly ran a red light and Musk took over.

End-to-end means one thing: a single network that takes in pixels and puts out controls, with nothing hand-written in between.

Two pipelines. Before v12: cameras, vision networks, a hand-written planner, a controller, the car. From v12, Tesla says: cameras, route and speed go into one network that outputs steering and acceleration.

Elluswamy’s ICCV 2025 talk is the best primary account I found. I could not find the official video, so I read a transcript copy and a viewer’s summary of it, and the wording below is approximate. The talk was at the WDFM-AD workshop in Honolulu, which ran on 20 October 2025. What Tesla said there:

  • One large network takes raw sensor data plus the route, vehicle speed and motion data. It outputs “roughly two tokens”, the next steering and acceleration.
  • The input is “seven or eight cameras depending on the vehicle”, each a “5 megapixel” stream at a high frame rate. For a 30 second context, Elluswamy put that at “like two billion tokens”. By my own arithmetic, two billion tokens in and two out is about a billion to one. The squeeze is the whole problem.
  • Explicit perception modules (cars, road boundaries) are no longer used for driving. They “can be implicit and they can be trained as auxiliary things”.
  • A summary of the talk quotes the main premise as “gradients must flow end-to-end”. In plain words: during training, the error at the controls reaches every layer back to the pixels, which is what the dashed teal arrow in the picture shows.

It learns from people

How does a network learn to drive? In the simplest form, it copies. People drive, the cameras record, and the network is trained to produce the steering and pedal inputs that the person used.

Learning from human driving. A person drives while cameras record video, steering and pedals. The network guesses the controls, the error against the person is used to nudge the weights, over very many clips.

This is old. In 2016 an NVIDIA team trained a network to steer a car from one front camera, with the human steering angle as the target (Bojarski et al.). The car ran it at 30 frames per second.

Copying has a known trap. Humans drive well, so the clips show good drives. But the learner is not perfect. A small slip puts it in a spot that no human clip shows, so it has nothing to copy there, and the next error is bigger. The statistics behind this were described by Ross, Gordon and Bagnell in 2010: each step depends on the earlier ones, so the usual assumptions of machine learning break.

Why copying humans is not enough. Grey human paths stay in the lane. A learned car path drifts, each small error making the next more likely, until it reaches a region with no human examples.

Researchers outside Tesla have attacked it in different ways. Waymo’s ChauffeurNet (2018) reported that plain copying fails in complex driving even with 30 million training examples, and added synthetic bad situations plus penalties for collisions. Tesla’s stated answers are different in shape, and I could only check them as claims:

  • Elluswamy said the fleet is the source of rare cases. He described explicit triggers and small targeted networks to find them, and a pile of “500 years of driving” too large to store whole.
  • The v14.3.9 release notes (8 September 2026) say Tesla “upgraded the Reinforcement Learning (RL) stage of training the FSD neural network”. That is learning from the result of driving, not only from copying.
  • Elluswamy said the same model can feed a world simulator, covered below.

Other public work follows the same direction. UniAD (CVPR 2023) joins perception, prediction and planning in one network and is organised around the final plan. Its licence is non-commercial, so I link to it and do not reproduce its figures. Google’s EMMA (2024) maps raw camera data to planner trajectories and other driving outputs with a large multimodal model. Neither paper says how Tesla’s system is built.

v13, v14 and what comes next

Here is what Tesla’s own release notes and staff said, release by release, up to 14 November 2026. I read the release notes through trackers and press that copy them, so the wording may differ a little from Tesla’s own pages.

ReleaseDateWhat Tesla said
v13.2.221 Dec 2024“Upgrades every part of the end-to-end driving network.” 36 Hz full-resolution video on the AI4 computer, 4.2x data scaling, 5x training compute scaling, about half the latency from camera to controls. “3x model size and context length scaling” listed as upcoming. (notes)
v147 Oct 2025“Added navigation and routing into the vision-based neural network for real-time handling of blocked roads and detours.” (Electrek, quoting the notes)
v14.3.98 Sep 2026Upgraded RL stage, upgraded vision encoder, AI compiler and runtime rewritten with MLIR for faster reaction. “Expand reasoning to all behaviors beyond destination handling” listed as upcoming. (notes)
v15not releasedOn the Q3 2026 call (21 Oct 2026) Elluswamy said “pretty soon” Tesla would “release the same software as part of the v15 release to customers”. The moderator’s question had asked about the unsupervised software; Elluswamy did not use that word. No date. He also said “we are building an entirely new architecture with essentially AI-based mapping and navigation”. (call transcript)

Two things stand out. The notes list capabilities, not the inside of the network. And the word “reasoning” appears: the v14.3.9 notes imply that reasoning exists for destination handling today and is planned for more. In the ICCV talk Elluswamy said you “can always think longer and produce reasoning tokens”, used only when needed, because reasoning on every decision would add too much latency.

Parameter counts: reported, none from Tesla. On 6 August 2025 Musk posted on X that Tesla was “training a new FSD model with ~10X params”, probably ready for release “end of next month if testing goes well”, as UPI reported. v14 began rolling out on 7 October 2025. Its release notes, as quoted by Electrek, do not name a parameter count. In September 2026 NotATeslaApp reported that Musk credited v15 with “a 10x parameter upgrade”. The article’s own wording adds “about one billion” to “ten billion” parameters, and it names no source for those two figures. I found no Tesla source that ties any release to a count. Treat all of these as second-hand.

Who said what. Planner designs of 2021 and 2022, and v12 replacing over 300k lines of C++: Tesla said. About 10 times the parameters: the CEO on X, August 2025. No v12 to v14 architecture diagram found.

One more thing I cannot say. Elluswamy listed 3D occupancy and objects as outputs the network can be asked for, so the ideas from the earlier parts probably live on inside or beside the network. I did not find a Tesla source that says what happened to the 2022 planner. It may be gone, or it may survive as a training aid. That is my guess, not a Tesla statement.

Here is the whole run in one picture.

Timeline from August 2021 to October 2026. Aug 2021 AI Day, a planner that searches. Dec 2023 v12.1: one network replaces over 300k lines of C++. Oct 2025 v14 rolls out. Oct 2026 Q3 call: v15 pretty soon.

Why one network is harder to debug

In the 2022 design a bad move leaves a trail. The prediction said the other car would yield, or a cost was too low, or a threshold was off. An engineer opens the rule and changes one line. In a single network, the bad move traces to millions of weights, and no single weight holds the reason.

Andrej Karpathy, then Tesla’s director of AI, wrote this down in 2017 in Software 2.0: code that is “written by the optimization”, where large networks work well but it is hard to see how, and they can fail in odd ways that are difficult to inspect.

Regulators have not studied the architecture. They study behaviour. In October 2025 the US safety agency NHTSA opened a Preliminary Evaluation (PE25012) into about 2.88 million Teslas with FSD, on reports of cars going through red lights and entering opposing lanes. The document says multiple incidents happened at one intersection in Joppa, Maryland, and that NHTSA understands Tesla “has since taken action to address the issue at this intersection”. It does not say what the action was. This is a regulator’s opening summary of complaints, not a finding. But it shows the debugging question: after a failure at one place, how do you change a network without breaking the places that work?

Tesla’s answer in the ICCV talk has three parts.

1. Ask the network. The same model, Elluswamy said, “can be prompted to predict arbitrary things”. Tesla trains it to also give 3D occupancy, objects, traffic lights, signs, and plain-language reasoning, and he said you “can ask it why it made some decisions”. He said this helps interpret the model and gives some safety guarantees. A probe tells you what the network seems to know. It does not prove why the controls came out as they did.

How Tesla says it looks inside one network. Cameras, route and speed go in, steering and acceleration come out. Probes give extra readouts: 3D occupancy, objects, lights and signs, and plain-language reasoning.

2. Test in a loop. Elluswamy warned that “your open-loop performance might look amazing” and still fail on the road. Open loop means scoring the network’s guess against a recording. The recording never reacts to the guess. Closed loop means the guess changes what happens next. Tesla said it built a world simulator that generates all eight camera views from past states and actions “simultaneously by a single neural network”. It can replay past failures and inject adversarial events such as a car cutting across the path. It also supports closed-loop reinforcement learning.

A closed test loop. The driving network sends steering and acceleration to a world simulator, which returns video for all eight cameras. It can replay a past failure or inject an event such as a car cutting in.

Outside research backs the warning about open-loop tests. Li et al. (CVPR 2024) found that on a popular open-loop benchmark, nuScenes, end-to-end models lean mostly on the car’s own status (its speed and heading) to predict a path. They argue the metrics do not fully measure planning quality, and a simple baseline did competitively without perception annotations.

3. Choose the test set on purpose. Random fleet samples are mostly “boring highway driving”, Elluswamy said, so the test sets must be balanced and cover rare cases.

I cannot verify any of this from outside. The talk describes tools. It shows no numbers for how often they catch a failure. That is also true of most vendors, but it is the key gap for anyone who wants to judge the claim.

Questions people ask

Is Tesla FSD one neural network? Tesla says so. From v12, the release note says the city-streets stack became “a single end-to-end neural network”, and in 2025 Elluswamy described one large network from sensor data to steering and acceleration. I found no architecture diagram from Tesla, so how that network is built inside is not public.

Does FSD still run any hand-written code? Tesla said v12 replaced over 300k lines of explicit C++ in the city-streets stack. I found no Tesla line count for what remains, such as the code that runs the network on the chip. The v14.3.9 notes mention a rewritten AI compiler and runtime, which is code, but it runs the network and does not plan.

What does end-to-end mean in self-driving? One trained model from sensor input to control output, with no hand-written perception, prediction or planning step between them. The opposite is a modular stack, where each step is separate and can be tested on its own.

How does FSD decide who goes first at an intersection? In the 2022 design, by searching joint futures of the Tesla and the others and scoring each. Tesla says the current system learns this from human driving instead. I found nothing from Tesla on how the choice is represented inside the network.

Why can’t Tesla just fix one mistake like a normal bug? There is no line that holds the mistake. The fix is to add examples or change training, which can change behaviour elsewhere. Simulators and balanced test sets, which Tesla talks about, are how you check that a fix does not break something else.

Cheat sheet

Cheat sheet. Planning: where to go, how fast, who yields. v12 on: one network from pixels to controls, replacing over 300k lines of C++ (Tesla). Tesla gives no architecture diagram or parameter counts.

Next: a network is only as good as the examples it learns from. Elluswamy called the fleet “the Niagara Falls of data”. How does Tesla pick which clips to keep, and what does it need to train on them?

Further reading

Tesla talks and notes

Patents

Regulators

Papers

Outside analysis and press

Previous in the seriesTesla Occupancy Network: Seeing Things It Has No Name For
Next in the seriesThe Data Engine: How Tesla Teaches the Car
Written by Rafi Loom

Backend engineer who builds high-volume systems that move money. More about Rafi