Steering force
Reynolds's core steering formula: subtract an agent's current velocity from a desired velocity to get the force that nudges it toward that desire.
What it is
Nature of Code’s “Autonomous Agents” chapter is where “Reynolds’s steering force formula” is named. The behaviours linked from this page — seek, arrive, wander, path following, flocking — are registered against it in this encyclopedia’s own graph; the excerpts here do not say which of them the chapter builds on it. Each of those pages covers what makes it distinct; this one is about the computation underneath all of them.
How it works
The chapter states one piece of it directly: a vector that “should point from the vehicle’s current position to the target position, with a magnitude equal to the maximum speed of the vehicle.” That magnitude is capped, in the chapter’s own phrase, “at the maximum possible speed” the vehicle can take on. The five behaviours above each specialise this same computation by aiming it at a different target; what differs between them is covered in the next section, not this one.
Parameters & tuning
The only knob fixed directly here is the vehicle’s maximum speed, since that’s what the target vector’s magnitude is capped at. Raise it and every behaviour built on this computation can close on its target faster; lower it and the same behaviours look sluggish, whatever target they’re aimed at — the cap sits underneath all five, not inside any single one.
Where it’s been used
Only Nature of Code’s own chapter is evidenced here, as teaching material rather than a named artwork; no specific piece built with this formula appears in what’s gathered for this page.
Variants & neighbours
Seek rotates the vehicle’s heading a fixed amount per frame toward the angle to a target point — nearest neighbour or the mouse — then moves forward along that heading. Arrive is a variant of seek that decelerates smoothly inside a slowing radius instead of overshooting the target. Wander seeks a target that itself moves randomly around the perimeter of a circle projected ahead of the vehicle, keeping the result directionally ordered rather than purely random. Path following predicts the vehicle’s future position, finds the nearest point on a path, and only seeks a target a little ahead of that point once the vehicle has strayed too far. Flocking has every agent continuously turn toward its single closest neighbour by a fixed angle increment, producing an emergent flock-like swirl from many instances.
Go deeper
Read the source directly: natureofcode.com/autonomous-agents.
Related, in brief
Wander steering behavior
Seek a target that itself moves randomly around the perimeter of a circle projected ahead of the vehicle, producing directionally-ordered rather than purely random motion.
Connected to
Kinds of this: Arrive steering behavior · Path following · Seek steering behavior · Wander steering behavior
Used to build: Flocking · Seek steering behavior · Wander steering behavior