Knowing When to Stop Straightening: Instance-Conditioned Performance Profiles for Anytime Any-Angle Search

A robot or game character that plans a path pays twice: once for the time spent computing, and once for the time spent walking. Any-angle planners such as Theta produce short, natural paths on grid maps because they let the path cut across cells instead of zig-zagging along grid edges. But they are run to completion, so they have no way to decide that the path they have is already good enough. Anytime planners such as ARA do return improving paths over time, but they stay on grid edges and accept paths that are 8% to 13% longer than necessary.

We propose an anytime any-angle planner whose stopping decision comes from a performance profile: a learned prediction of how much shorter the path will get if the planner is allowed to run a little longer. The profile is conditioned on cheap features of the current map and updated from the current run's own improvement trace. The planner stops at the moment the predicted saving in walking time falls below the cost of more thinking. The claim is not only that such a planner can exist. It is that on the Moving AI benchmarks and on 3D voxel grids, stopping driven by the profile reduces total time to reach the goal (planning plus travel) compared with both run-to-completion any-angle search and a well-tuned fixed anytime schedule. The regime where this holds is when planning speed and motion speed are within a couple of orders of magnitude of each other, and the note sets out to find the edges of that regime.

Core Claim

The two literatures meet at a specific gap. Performance profiles, meaning models of expected solution quality as a function of computation time, were built by Dean and Boddy and Boddy and Dean to make deliberation a decision variable. They have been applied to motion only at a coarse level. Miura and Shirai stopped refining a vision-motion plan when predicted execution savings fell below planning cost, and beat fixed-granularity planners in 66% of 40 simulated problems. Their choices, however, were discrete topological ones (cross an uncertain gate or detour), not geometric path search.

On the pathfinding side, the any-angle planners run to completion: Theta*, Lazy Theta* and subgoal graphs. Uras and Koenig's comparison charts the runtime-versus-path-length trade-off across algorithms offline, but no single algorithm in it traces that trade-off during a run. ARA* supplies the anytime machinery: repeated searches with a heuristic inflated by a factor $\epsilon$, lowered step by step. It also reuses search state between iterations, keeping a list of states whose costs improved after they were closed. But it lowers $\epsilon$ by a hand-set step and has no model of when further iterations pay off.

We combine ARA's state reuse with Lazy Theta's deferred visibility checks. We then put the stopping and step-size decisions under the control of a profile that is built for the instance at hand rather than averaged over a benchmark. The open problem this targets is the one the profile literature itself flags. In combinatorial search, the variance across instances is large enough that one static offline profile predicts poorly for any particular run.

Research Program

The first component is the planner, which we call Anytime Lazy Theta. Each iteration is a Lazy Theta search with the heuristic inflated by $\epsilon$. Neighbors are optimistically given the grandparent as parent, and the line-of-sight check is deferred until a node is expanded. Across iterations, states are reused in the ARA* manner.

Two properties need care. The first is validity under interruption. In Lazy Theta*, a node's parent link is verified when the node is expanded. Every node on the returned path has therefore been expanded, so each incumbent path is collision-free, and the only risk from a mid-iteration stop is losing the in-progress improvement, not holding a broken path. We will verify this property in code and state it formally, because it is exactly the reliability question that lazy evaluation raises for contract-style use.

The second is that Theta is not guaranteed optimal even at $\epsilon = 1$. The planner therefore cannot certify its own suboptimality the way ARA can. We will report a lower bound derived from the inflated-heuristic search on the corner-vertex grid. The analysis of Bailey et al. makes corner placement the natural choice here, since shortest paths turn only at obstacle corners. We treat this bound as a diagnostic rather than a guarantee.

A further question is whether re-searching with a lower $\epsilon$ lets the tree move to a different corridor around obstacles. This matters because greedy parent shortcutting can lock the search into one route early, as noted for Theta*. We will measure how often successive incumbents actually change which way they pass obstacles.

The second component is the profile. For a planning-then-acting agent moving at speed $v$, the quantity to minimize is total completion time

$$C(t) = t + L(t)/v,$$

where $t$ is planning time and $L(t)$ is the length of the incumbent path at time $t$. The stopping rule halts when the predicted drop in $L$ over the next time slice $\Delta t$, divided by $v$, is smaller than $\Delta t$. This is the marginal-utility-of-computation rule from deliberation scheduling specialized to paths.

The predictor of $L(t+\Delta t)$ has three layers.

  • Offline curves by map class. These are built from benchmark runs, grouped for example by obstacle density or by whether the map is a game map, random, a room map or a maze.
  • Conditioning on cheap query features. The features are the straight-line start-goal distance, the local obstacle density along the straight line, and the ratio of the first incumbent's length to that straight-line distance.
  • An online correction. This rescales the predicted curve using the improvement already observed in the current run's first iterations.

The same predictor also chooses the next $\epsilon$ step. It picks the step with the best predicted improvement per unit time, since the dominant cost is line-of-sight checks and their number grows as $\epsilon$ falls. We will keep the predictor to a lookup plus a small regression costing microseconds, and we will measure its overhead explicitly. Meta-reasoning that is too heavy is the other known failure of this approach.

Baselines

The naive reference point is run-to-completion Lazy Theta at $\epsilon = 1$ followed by execution, together with plain Theta. This is what practitioners do today, and it is the right point to beat whenever planning time is negligible. Its reported efficiency is that Lazy Theta was about 1.66 times faster than Theta and used roughly 13 times fewer line-of-sight checks on 100×100×100 grids with 10% obstacles (Lazy Theta*).

The strongest edge-constrained competitor is ARA with a line-of-sight post-smoothing pass applied to every incumbent path. It is strong because smoothing is cheap and effective. Uras and Koenig report that smoothing takes less than 1% of total runtime and brings Theta, Block A and Sub-2 within 0.5% of optimal length. ARA itself reached a given suboptimality bound 140 times faster than repeated A* searches from scratch on a 20-degree-of-freedom arm, according to ARA*.

The strongest any-angle competitor is our own planner run under the standard ARA* schedule: start at a high $\epsilon$, lower it by a fixed step, and stop by a fixed rule. We tune the step, the starting $\epsilon$ and a stop threshold per map class on held-out instances, using the same tuning budget the profile receives. No reported result was found on Lacuna for any anytime any-angle planner on Moving AI maps, so this baseline will be established by us. We also include fixed-time contracts, again tuned per map class.

All methods share one C++ code base, one line-of-sight routine, the same maps and queries, single-threaded execution and wall-clock timing. As an upper reference we use a hindsight oracle that knows each instance's full anytime trace and stops at the best moment.

Three ablations isolate the key ingredient: the static profile alone, the conditioned profile without online correction, and the full predictor. Beating a baseline means lower mean total completion time $C$, with paired per-instance statistics, across a stated range of $v$. It also means closing a clear fraction of the gap between the tuned fixed schedule and the hindsight oracle.

Why not just…?

Why not just run ARA* on the grid and smooth each incumbent? Smoothing cannot change which way a path goes around obstacles. On 500×500 grids with 20% random obstacles, Basic Theta found shorter paths than A with post-smoothing in 95% of cases (Theta*). The open question is whether that gap is large enough, relative to $v$, to matter for total time. Our experiments report it directly per map class. If smoothed ARA* ties on game maps, we will say so and restrict the claim to cluttered and 3D maps.

Why not just use a fixed anytime schedule on the any-angle planner? This is the real threat. If Theta*'s improvement curves turn out to be so uniform that a tuned schedule captures almost all of the oracle's benefit, then the profile adds nothing and the contribution reduces to the planner itself. The ablation settles this. We measure how much of the gap between the tuned schedule and the oracle each profile layer closes, and how the variance of the curves across instances correlates with that benefit.

Why not just precompute subgoal graphs? On static, fully known maps they are the right answer: roughly 100 times faster than Theta* with paths within 0.03% of its length (Uras and Koenig). Sub-2 preprocessing can take up to 35 seconds (comparison), however. We therefore test on freshly revealed and edited maps, where preprocessing is either charged to the planner or has to be repeated. We report static maps separately and expect to lose on them.

Why not just run ANYA with a timeout? ANYA returns optimal paths, but when it is halted it has no usable path, and its interval search grows badly in clutter. We run it with the same deadlines and a fallback to a grid path, and use it offline only to compute exact optimal lengths for scoring.

Proposed Experiments

The testbed is the Moving AI suite (Sturtevant): the game maps from Baldur's Gate II, Dragon Age: Origins and StarCraft, random maps at 0% to 30% obstacle density, room maps and mazes. We add 100×100×100 voxel grids at several obstacle densities, following Lazy Theta*. Profiles are built on one set of maps and evaluated on held-out maps. We also include a cross-family transfer test, for example training on game maps and testing on mazes. This transfer test is the decisive check on whether conditioning generalizes or merely memorizes.

The primary metric is total completion time $C$, swept over $v$ expressed in cells per millisecond of planning. The sweep is wide enough to span the settings where planning time is negligible, where it is comparable to travel time, and where it dominates, so that we can locate where profiles help. Secondary metrics are:

  • regret relative to the hindsight oracle;
  • calibration of predicted versus realized path-length improvement;
  • the predictor's overhead as a fraction of runtime;
  • line-of-sight checks per unit of path-length improvement;
  • the rate at which successive incumbents switch to a different route around obstacles.

A second experiment shares a fixed per-frame budget across many simultaneous queries, as in a game with many agents. It compares profile-based allocation across queries, in the style of contract-algorithm scheduling, against equal splits.

The proposal succeeds if three things hold together. The full predictor must close a substantial share of the gap between the tuned schedule and the oracle in the intermediate $v$ regime. It must hold that advantage on held-out map families. And its overhead must stay below the savings it produces. It fails informatively if the tuned fixed schedule already sits near the oracle. That outcome would show that any-angle search curves are regular enough that meta-reasoning is unnecessary.