Introduction

Imagine every point in a room has an invisible altitude. The robot's goal sits in a deep valley, every obstacle rises like a steep hill, and the robot is a ball that always rolls downhill. This mental model is called a potential field, and it turns navigation into simple physics.

The idea traces back to Oussama Khatib (1986), who borrowed it from electrostatics: just as a positive charge is repelled by like charges and attracted to opposite ones, a robot can be repelled by obstacles and attracted to its goal. At each step the robot computes the net force — the gradient of the combined potential — and moves in that direction.

The appeal is obvious: no expensive graph search, no pre-built map, instant reaction to new obstacles. But there is a catch that every robotics student learns the hard way — local minima.

A local minimum is a dip in the landscape that is not the goal. The robot rolls in, the net force drops to zero, and it sits there forever, trapped in an energy valley that leads nowhere. Understanding when this happens — and how to escape — is the real depth behind what looks like a simple formula.

Try It

The robot (blue dot) follows the gradient of the combined potential: the goal (green star) attracts it and the red obstacles repel it. Click anywhere on the grid to toggle an obstacle, then press Go and watch what happens.

<!-- {{c_html_comment}} -->
<div class="toolbar">
  <span class="legend"><span class="dot robot"></span> {{lbl_robot}}</span>
  <span class="legend"><span class="dot goal"></span> {{lbl_goal}}</span>
  <span class="legend"><span class="dot obs"></span> {{lbl_obstacle}}</span>
  <span class="hint-inline">{{lbl_click_hint}}</span>
</div>
<canvas id="canvas" width="340" height="280" title="{{canvas_title}}"></canvas>
<div class="status" id="status">{{msg_ready}}</div>
<div class="btns">
  <button id="btn-go" type="button">{{btn_go}}</button>
  <button id="btn-escape" type="button">{{btn_escape}}</button>
  <button id="btn-reset" type="button" class="ghost">{{btn_reset}}</button>
</div>
/* {{c_css_comment}} */
* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; color: #222; margin: 0; }
.toolbar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .4rem; font-size: .85rem; }
.legend { display: flex; align-items: center; gap: .3rem; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.dot.robot { background: #1d6fa4; }
.dot.goal  { background: #0a7d33; }
.dot.obs   { background: #c92f3c; }
.hint-inline { color: #555; font-style: italic; font-size: .8rem; }
canvas { border: 1px solid #cdd9e3; border-radius: 8px; cursor: crosshair; display: block; }
.status { font-size: .95rem; font-weight: 600; margin: .45rem 0; min-height: 1.4em; }
.status.ok   { color: #0a7d33; }
.status.bad  { color: #c92f3c; }
.status.info { color: #1d6fa4; }
.btns { display: flex; gap: .5rem; flex-wrap: wrap; }
button { font: 600 14px system-ui, sans-serif; padding: .45rem .9rem;
         border: 1px solid #1d3557; background: #1d3557; color: #fff;
         border-radius: 8px; cursor: pointer; }
button.ghost { background: #fff; color: #1d3557; }
// Code not found

Notice: with obstacles arranged to create a bowl around the robot, the attractive and repulsive forces cancel exactly and the robot freezes. Press Escape local min to inject a random walk — the robot stumbles out of the valley and tries the gradient again. This random-restart trick is the simplest of many real-world escapes, but it has no guarantee: with the wrong landscape the robot may wander forever.

The Local-Minima Problem

The local-minima trap is not an accident of bad parameter choices — it is provably unavoidable for the standard attractive-repulsive design in environments with obstacles.

  • Why minima form: when an obstacle sits between the robot and the goal, the repulsive force from the obstacle and the attractive force toward the goal can balance to zero at a point that is not the goal. The robot is stuck.
  • Harmonic potentials: if the potential is chosen to satisfy Laplace's equation (2U=0\nabla^2 U = 0), it has no spurious local minima — the only minimum is the goal. The catch: computing a harmonic field requires solving a PDE over the entire workspace, erasing the speed advantage.
  • Navigation functions: Koditschek and Rimon (1990) proved that for sphere-world environments (spherical free space, spherical obstacles) one can construct a potential with a single global minimum at the goal. Outside sphere worlds, the construction breaks.
  • The trade-off in full: simple potentials are fast but incomplete (may get stuck); guaranteed potentials are complete but expensive — mirroring the classic tension between greedy local search and exact shortest-path algorithms.

So the field sits in a fascinating middle ground: too simple to guarantee success, too useful to abandon.

Where It Matters

Despite the local-minima problem, potential fields remain one of the most widely deployed navigation ideas in robotics and beyond:

  • Industrial robot arms: Khatib's original 1986 paper targeted manipulators; potential fields still appear in real-time joint-space controllers for industrial arms.
  • Drone swarms: each drone runs a potential field where teammates repel and the formation target attracts — coordination with no central planner.
  • Autonomous vehicles: combined with sensor data, repulsive fields from detected obstacles feed directly into steering and braking controllers.
  • Game AI: enemy units in real-time strategy games use influence maps — a discrete cousin of potential fields — to flow around obstacles and toward targets without expensive path queries.
  • Molecular dynamics: the same mathematics describes how atoms attract and repel each other; minimizing potential energy IS the navigation problem at atomic scale.

Potential fields are also a natural stepping stone to understanding gradient descent more broadly: the same local-minima hazard that traps a robot also plagues neural-network training, and the escape strategies (random restarts, momentum) are strikingly similar.

Conclusion

Potential fields offer one of the most beautiful ideas in robotics: collapse the navigation problem to rolling downhill on an invisible energy surface. The math is clean, the implementation is fast, and the robot reacts in real time to whatever sensors reveal.

Yet the local-minima trap is a reminder that greedy local search — following the gradient without ever looking up — can fail in provably unavoidable ways. The same lesson echoes across computer science: from non-convex optimization in machine learning to local-search algorithms for combinatorial problems.

A robot frozen in a false valley, waiting for a random nudge to escape, is a small but vivid model of a universal challenge: when is "downhill" enough, and when do you need a map of the whole landscape?

Share this article

Pick a channel — or use your device's native share sheet.

Comments

Loading comments...

https://www.kipuhub.com/en/article/potential-fields/Content licensed under CC BY-NC 4.0.