Scripted planner vs neural controller: what is decided upfront

The original forklift decides its whole route before it moves. The neural version decides nothing in advance and steers from what it senses 60 times a second.

Watch the neural forkliftWatch the scripted one

What you are looking at

Both demos use the same NVIDIA SimReady forklift and the same job: get the forks into a pallet's fork openings. They differ in when the decisions are made. The scripted forklift (Autonomous Delivery) is JavaScript that plans a route from exact poses and then replays it. The neural forklift (Neural Forklift) has no route at all: a small network of competing neurons steers it from fresh sensor readings on every frame.

Two details matter for how to read the demo. The scripted planner is ordinary geometry code, not a neural network. And the neural network is hand-wired, not trained: nobody trained it on data. Its weights, thresholds and speed tables were written by hand, so it does not learn a route. It re-expresses a control law as competing neurons. The real difference is plan-then-follow versus sense-and-react.

The two approaches side by side

Scripted plannerNeural controller
Where the logic livesPath geometry: a reverse arc, a Bezier curve, a straight final approachSensory populations, four goal neurons, a motor mix
When the route is decidedBefore the truck moves, for the whole jobNever; no route exists
Needed upfrontExact start pose, pallet pose and every path leg, with speeds per legNothing about the start; only the sensing channels and the hand-set weights
Sensed while runningNothing: it replays the pathPallet lateral error, heading error, distance to go, fork height, 12 obstacle rays (all noisy)
When something is offNothing reacts; it replans only at the next jobBacks off and re-approaches, or steers around the obstacle
How it failsMisses silently if the world differs from the planStuck loops (timeouts) or an occasional collision

The scripted planner: plan the whole route, then replay it

BEFORE IT MOVES: PLAN THE WHOLE JOB WHILE IT MOVES: REPLAY THE PLAN, NO SENSING Known posesstart, pallet, destinationall exact, fixed upfront Route geometryreverse arc, Bezier curve,straight final approach Task listdrive, lower forks, insert,lift, back out Follow the pathsteer and speed comefrom path curvature Forks in the palletonly if the world stillmatches the plan Next job replansfrom wherever the truckended up plan handed over
Everything in the top row is computed once from exact poses; the bottom row only replays it.

If the pallet sits a few centimetres off its slot, nothing in this loop notices.

The neural controller: nothing planned, one loop repeated

1 Senselateral errorheading errordistance to go12 obstacle rays 2 Encodeeach reading spreadover a population oftuned neurons 3 Competeapproach, insert,retreat, avoidinhibit each other 4 Actfiring rates blendsteer and speed,truck moves 1/60 s repeats every 1/60 s with fresh readings
The neurons on the demo's left-hand panel are step 3 and the populations feeding it, drawn live.

No route is stored anywhere. The only memory is each neuron's recent activity, so when the pallet's offset changes, the next pass through the loop steers differently.

What is decided upfront versus at run time

In the scripted version almost every decision is fixed before the truck moves. In the neural version the same decisions are remade every 1/60 s.

DecisionScripted: fixed in the planNeural: remade each step
Which way to head toward the palletA Bezier curve from the start pose to an approach pose, computed onceCurvature = −a × lateral error − b × heading error, re-evaluated continuously
When to back out and try againNever because of misalignment; a reverse turn and a fixed 1.6 m withdraw are built into every jobThe RETREAT neuron fires when near the pallet and badly lined up, or at the entry gate (about 5–9 cm lateral or 2–4° heading off just before the fork tips enter)
SpeedCapped by path curvature and distance left on each leg, with a preset top speed per legSpeed tables over distance to go, mixed by which goal is firing; slows to a stop at the insert point
When to lower the forksA "forks down" step placed in the task listThe LOWER neuron fires within about 3.4 m; forward speed is gated until the forks are down
ObstaclesNot considered; the layout is chosen so the path is clearThe AVOID neuron fires from 12 range rays and steers away from the nearest side
When to stopThe path simply endsThe insert speed table reaches zero at the stop point

In both versions the knowledge itself is still hand-written: the gains, thresholds and speed tables are set by the builders, not learned. The neural framework moves where decisions are made (plan time to run time), not who wrote the rules. The lift and back-out after a successful insert is scripted in both.

What we tested and the results

The neural network matches a plain scalar version of the same control law in easy cases and beats it in the hard ones. Each row is 150 fresh random starts with sensor noise on. A trial succeeds only if the forks end fully inside the openings with no blade on a runner and no collision. The forks have about 10 cm of slack each way, measured from the pallet model.

ScenarioNeural networkScalar control
Normal pallet, truck starts facing roughly toward it98.0%99.3%
Normal pallet, truck starts facing any direction93.3%94.0%
Pallet rotated up to 35° and off its slot92.7%86.7%
Hard: rotated pallet plus neighbours 1.9 m either side92.7%86.0%
Hard, with 3× the sensor noise94.0%0.0%
Hard, truck starts facing any direction86.7%82.7%

The scalar control uses the same law, thresholds and avoidance rule as plain if/else code. Its 0% at 3× noise comes from hard mode switches flipping back and forth as noisy readings cross a threshold; the network's leaky neurons smooth that out. When either one succeeds, the forks end within a few millimetres of centre, with about 94 mm of blade clearance against 99 mm of slack. Try the harder cases yourself: hard scenario, hard with 3× noise.

What this does and does not show

It shows that a network of competing neurons can steer a forklift into a pallet from a random start without a planned route. It does not show that a neural network is better at this, or that it learns.

When to use which

Use a scripted planner when the world is known and repeatable: fixed docks, exact poses, predictable timing, and nothing that needs to react. Use the reactive approach when the pallet's pose is uncertain or the scene changes, because it only needs what it can sense and corrects as it goes. Next we would let reward-modulated learning tune the gains, to see whether it closes the remaining gap, then extend the demo to carrying the pallet to a rack and setting it down.