Introduction
Sampling-based model predictive control replans at every control step: it proposes candidate control sequences, rolls each one out in a simulator, and moves its plan toward the candidates that cost least. It needs no gradients and tolerates contact-rich, discontinuous dynamics, which is why it is used for legged and whole-body control. In this task the robot, the simulator, the cost and a budget of simulated rollout steps per control step are fixed; what is open is the planner: how the plan is parameterised and sampled, how the sampling distribution is updated from costs, how the plan is warm-started from one step to the next, how the budget is split between rounds, horizon and samples, and how the plan becomes motor commands.
The field offers a family of update rules. Predictive Sampling keeps the best of a set of Gaussian perturbations of the current plan [1]; MPPI averages the candidates with exponential weights in their cost [2]; the cross-entropy method refits a Gaussian to an elite set [3]; CMA-ES adapts a full covariance with rank-based weights [4]; CoVO-MPC designs the sampling covariance analytically [5]; the planner of Xue et al. runs several rounds per control step with a noise scale annealed from large to small [6]; and more recent work brings zero-order optimisation techniques to robotics more broadly [7], model tensor planning [8] and rollout differentiation for feedback [9].
What makes the problem hard is that the planner is scored in closed loop, under a budget counted in simulator steps. A rule that lowers the open-loop cost of the plan faster need not track better: the plan is re-solved at every control step from a warm start, and whatever the update injects into it along directions the cost does not care about is still applied to the robot. A planner can also be good on the episodes it was tuned on and fall on harder ones, and a fall costs far more than a small loss of accuracy everywhere else.
Method
We call our planner AAR-MPC (annealed antithetic rank-recombination MPC). It keeps the structure of an annealed receding-horizon sampler [6] and changes four things, each the answer to a closed-loop failure we measured during development.
Plan, warm start and budget
The plan is a matrix of control knots , spread evenly over a horizon of rollout steps. The controls a rollout applies are an interpolating quadratic spline through the knots, plus a feed-forward term when the task provides a reference:
clipped to the control bounds. At every replan after the first of an episode, the plan is re-timed to the current time by a fixed linear map, , where evaluates the spline one control period later and holds the last knot where that runs past the horizon. When the configuration asks for a nominal tail, the last knot is instead replaced by the task's nominal control: the newly exposed end of the horizon is a part of the plan the rollouts have never informed, and copying the previous last knot into it carries an old guess forward.
The budget is split so that, when the budget allows, every round sees at least about 48 candidates: with rounds,
and each round evaluates mirrored pairs plus the current plan, candidates. The first replan of an episode, which has a larger budget, runs up to rounds. The plan starts each episode at zero.
self.K = int(cfg["knots"])
h = int(round((int(cfg["h"]) - 1) * 0.02 / self.dt)) + 1
self.h = int(max(self.K, min(h, int(spec["h_max"]))))
B = int(spec["budget"])
self.iters = int(max(1, min(int(cfg["iters"]), B // (self.h * 48)))) # at least ~48 candidates a round
self.P = int(max((B // (self.h * self.iters) - 1) // 2, 1)) # mirrored pairs per round
self.n = 2 * self.P + 1 # + the current plan itself
self.iters0 = int(max(1, min(5 * self.iters, int(spec["first_budget"]) // (self.n * self.h))))
T = (self.h - 1) * self.dt
tk = np.linspace(0.0, T, self.K)
self.W = jnp.asarray(_basis(tk, np.arange(self.h) * self.dt), jnp.float32) # knots -> controls [h, K]
S = _basis(tk, np.minimum(tk + self.sps * self.sim_dt, T)) # re-timing by one period
self.nominal_tail = cfg["tail"] == "nominal"
if self.nominal_tail:
S[-1] = 0.0
self.S = jnp.asarray(S, jnp.float32)
nom = np.zeros(self.nu, np.float32) if self.has_ref else np.asarray(spec["u_nominal"], np.float32)
self.nom = jnp.asarray(np.nan_to_num(nom))
self.kscale = jnp.asarray(float(cfg["hfac"]) ** np.arange(self.K)[::-1], jnp.float32)
mu = max(int(round(float(cfg["elite"]) * self.n)), 1)
w = np.maximum(np.log(mu + 0.5) - np.log(np.arange(self.n) + 1.0), 0.0)
self.wrank = jnp.asarray(w / w.sum(), jnp.float32) # weight of cost rank rMirrored candidates
Within a round of noise scale we draw perturbations
where knot is the present and sets the noise ratio between neighbouring knots, and evaluate the candidates , and itself. If and are the weights the two members of pair receive (they sum, with the plan's own weight, to one), the new plan is
A pair moves the plan only through the difference of its two weights. Write the cost of a candidate around the plan as an even part (how far it is from the plan, which is the same for and ) and an odd part (on which side it lies). With independent samples, the even part decides which candidates get weight and therefore pushes the plan along random directions; with mirrored pairs, the even part only decides how much a pair counts, and the direction of the step comes from the odd part. During development we found that a linear fit of rollout cost against the knots explained only 20 to 50% of its variance around the warm-started plan (0.23, 0.20, 0.32 and 0.49 at the four noise scales we probed), so most of the cost spread that an unpaired update turns into motion is of the even kind. Pairs whose members both fall outside the elite set receive zero weight and cancel exactly; pairs whose members rank close together nearly cancel. When there is no reference, the knots are clipped to the control bounds before rollout, which breaks the symmetry of a pair that hits a bound.
Rank recombination over a wide elite set
The weights are not exponential in the cost. Each candidate's total cost (running cost plus terminal cost; a non-finite total is ranked behind every finite one) is replaced by its rank , for the cheapest, and the weight of rank is the log-rank weight used in CMA-ES [4]:
normalised to sum to one, so that the best candidates have non-zero weight. With an elite share this keeps a large effective number of samples in every round, has no temperature to tune, and is unchanged by any increasing transformation of the cost. The wide elite set is also what lets mirrored pairs cancel: a narrow elite set gives most pairs a single non-zero member.
def _round_impl(self, key, mean, sig, uref):
"""candidates: P mirrored pairs around the plan, and the plan itself (last)"""
d = sig * self.kscale[None, :, None] * jax.random.normal(key, (self.P, self.K, self.nu))
knots = jnp.concatenate([mean[None] + d, mean[None] - d, mean[None]], 0)
if not self.has_ref:
knots = jnp.clip(knots, self.lo, self.hi)
U = jnp.clip(jnp.einsum("hk,nku->nhu", self.W, knots) + uref[None], self.lo, self.hi)
return knots, U
def _recombine_impl(self, knots, costs):
J = jnp.sum(costs, axis=1)
J = jnp.where(jnp.isfinite(J), J, jnp.inf)
rank = jnp.argsort(jnp.argsort(J))
return jnp.einsum("n,nku->ku", self.wrank[rank], knots)Annealing, every knot perturbed, and the command
Within a replan the noise scale falls geometrically over the rounds actually run (written here; the first replan of an episode runs more),
and a single round uses . Every replan therefore starts by re-exploring at a large scale and ends with a small refinement, as in the annealed sampler we build on [6]. Unlike that planner, we perturb every knot, the first one included. The control applied now should answer the state just observed; with a frozen first knot it answers the state predicted one period earlier. That is harmless when the rollout model is exactly the controlled system, and destabilising when it is not.
After the last round, the command for the next control period is the plan exactly as the rollouts applied it: the spline sampled at the rollout step, held over each step, plus the reference feed-forward. The planner commits to one control period at a time.
def plan(self, obs, sim):
cfg = self.cfg
if not self.first:
self.mean = jnp.einsum("jk,ku->ju", self.S, self.mean)
if self.nominal_tail:
self.mean = self.mean.at[-1].set(self.nom)
n_it = self.iters0 if self.first else self.iters
n_it = int(max(1, min(n_it, int(sim.budget_left) // (self.n * self.h))))
self.first = False
uref = jnp.asarray(self._ref(obs, np.arange(self.h) * self.dt))
s_hi, s_lo = float(cfg["sig_hi"]), float(cfg["sig_lo"])
for i in range(n_it):
self.key, k = jax.random.split(self.key)
sig = s_hi * (s_lo / s_hi) ** (i / (n_it - 1)) if n_it > 1 else float(np.sqrt(s_hi * s_lo))
knots, U = self._round(k, self.mean, sig, uref)
try:
costs = sim.rollout(np.asarray(U))
except BudgetError:
break
self.mean = self._recombine(knots, jnp.asarray(costs))
# controls of the next period: the plan as the rollouts apply it (held over each plan step)
j = np.minimum(np.floor(np.arange(self.sps) * self.sim_dt / self.dt + 1e-6).astype(int), self.h - 1)
u = np.asarray(self.W)[j] @ np.asarray(self.mean) + self._ref(obs, np.arange(self.sps) * self.sim_dt)
return np.clip(u, np.asarray(self.lo), np.asarray(self.hi)).astype(np.float32)Reference feed-forward
When the observation carries a reference trajectory whose joint coordinates match the controls, the spline becomes a residual on top of the reference joint targets, interpolated in time and looked one rollout step ahead. The reference carries the fast content of the motion and the few knots only the corrections; in that case the residual's last knot is held at the tail rather than reset.
def _ref(self, obs, offs):
"""reference joint targets at the times now + offs (s): the feed-forward the spline is a residual of"""
if not self.has_ref:
return np.zeros((len(offs), self.nu), np.float32)
ref = np.asarray(obs["ref_qpos"], np.float32)[:, -self.nu:]
fps, t = float(obs["ref_fps"]), float(obs["time"])
x = (t * fps - np.floor(t * fps + 1e-6)) + (np.asarray(offs) + float(self.cfg.get("lead", 0.0)) * self.dt) * fps
x = np.clip(x, 0.0, len(ref) - 1.0)
i0 = np.minimum(np.floor(x).astype(int), max(len(ref) - 2, 0))
i1 = np.minimum(i0 + 1, len(ref) - 1)
f = (x - i0)[:, None]
return ((1.0 - f) * ref[i0] + f * ref[i1]).astype(np.float32)Configuration
The constants are set per kind of task, from the setting label when the planner knows it and from the observation keys otherwise, in four configuration rows. One row uses 5 knots over a horizon of 17 rollout steps of 20 ms (rescaled if the rollout step differs), 4 rounds annealed from to , (so the knot applied now has the smallest noise) and an elite share of 0.25. Another row uses , more noise near the present than further out. Our code comment is explicit that the noise scales are chosen for robustness rather than for the best error on easy episodes.
Results
| Method | ① | ② | ③ | |
|---|---|---|---|---|
| Tracking error ↓ | Mean running cost ↓ | Mean running cost ↓ | Body tracking error ↓ | |
| Claude Fable 5.2 | 0.056 | 10.26 | 0.023 | |
| Predictive Sampling | 0.546 | 11.55 | 0.452 | 0.190 |
| MPPI | 0.171 | 10.48 | 0.265 | 0.133 |
| CEM | 0.074 | 10.44 | 0.168 | 0.069 |
| CMA-ES | 0.172 | 10.64 | 0.318 | 0.107 |
| DIAL-MPC | 0.067 | 10.50 | 0.239 | 0.049 |
| MPPI-CMA | 0.086 | 10.49 | 0.192 | 0.073 |
| Model Tensor Planning | 0.256 | 10.70 | 0.197 | 0.074 |
| CoVO-MPC | 0.299 | 10.49 | 0.316 | 0.173 |
| Feedback-MPPI | 0.190 | 10.76 | 0.343 | 0.182 |
- ① Unitree Go2 · torque-level trotting velocity tracking (DIAL-MPC)
- ② Unitree G1 · stand-up from a fall
- ③ Unitree G1 · LAFAN1 motion tracking
On Go2-walk, AAR-MPC reaches a tracking error of 0.056, lower than every published baseline. The strongest of them is the annealed sampler we build on [6], at 0.067, followed by the cross-entropy method at 0.074 and MPPI with covariance adaptation at 0.086. The remaining baselines are well behind, from 0.171 for MPPI to 0.546 for Predictive Sampling.
On G1-standup, AAR-MPC reaches a mean cost of 10.26, again lower than every baseline; the closest are the cross-entropy method at 10.44 and MPPI at 10.48, and Predictive Sampling is furthest behind at 11.55. On G1-mocap it reaches a body error of 0.023, also lower than every baseline; the best of them is the annealed sampler at 0.049, followed by the cross-entropy method at 0.069, and Predictive Sampling is again furthest behind at 0.190. The strongest baseline is thus not the same on every setting.
The evaluated gain over the annealed baseline matches what we saw in development, where on our own validation episodes for this kind of task the final planner reached 0.064 against 0.079 for that baseline. It does not tell us which component produced it. A component ablation of the final configuration, run in our own batched harness in the last minutes of the run, gave 0.0657 for the full method, 0.0643 without mirrored pairs, 0.0795 with softmax weights in place of ranks, 0.0622 with the first knot frozen, and 0.0677 with the tail held instead of reset to the nominal control. At the final noise level, rank recombination is the only component whose effect we could resolve on this kind of task; mirrored pairs and the nominal tail had each been worth about 10% at the lower noise level we used earlier, and perturbing the first knot was neutral to slightly harmful on moderate episodes. We kept it because, at the earlier and lower noise level, it prevented a fall on one demanding episode, and because in development it was, by our measurements, the decisive component on the other kinds of task.
How we got here
We started by running every reference method on validation episodes of our own and by measuring what limits the best of them. Scaling the annealed baseline's budget up sixteen-fold kept improving its error (from 0.086 at the nominal budget to 0.0645 in our development runs), which read as an optimisation limit. Two observations changed that reading.
- More, smaller rounds lowered the cost but not the error. Offline, with the total number of samples fixed and starting from warm-started plans, splitting the budget into 1, 4, 16 and 64 rounds with rank weights improved the plan's cost by 3.2%, 7.3%, 10.7% and 11.8%. In closed loop the gain disappeared: 4 rounds with softmax weights gave 0.0738, 8 rank-weighted rounds 0.0690 and 16 gave 0.0702. Lowering the open-loop cost was not what the closed loop needed.
- The error was dominated by wander, not bias. Decomposing the tracking error on individual episodes showed that most of it came from slow fluctuations of one tracked quantity around its target, with small biases on top. Together with the low linear-fit above, this led to our central hypothesis: the update injects sampling noise into directions the cost is nearly flat in, and the sixteen-fold budget helped because it averaged that noise over sixteen times as many samples. The objective became to inject less noise per unit of progress.
Mirrored pairs follow directly from that hypothesis; the evolution-strategies part of a literature survey the run commissioned lists antithetic (mirrored) sampling among the techniques that transfer. In a controlled batch, rank recombination beat softmax weights and mirrored sampling helped by about 10%; combined with a nominal tail, the planner improved from 0.0788 (the annealed baseline on the same episodes) to 0.0573, and on a second, disjoint set of episodes from 0.0665 for our own version of the annealed update to 0.0512.
Unfreezing the first knot came from the other kinds of task, where the planner was falling on demanding reference trajectories that every baseline also failed. Perturbing every knot, together with a shorter horizon and fewer knots, took our error on that development set from 0.2253 to 0.0703; with the original horizon and knots, perturbing every knot alone gave 0.1655. It did this while changing nothing measurable on another kind of development task at the time (0.0573, 0.0551 and 0.0554 for an unperturbed, half-scaled and fully perturbed first knot); we therefore made it the rule everywhere.
Many things did not survive.
- Every way of lowering the exploration noise when the plan looked converged ended in falls or gave no gain: step-size adaptation by success rate, adaptive variance from the rank-weighted second moment, a verified ladder of step sizes, evidence-thresholded updates and a steeper noise profile across knots. Low fixed noise scales gained on moderate episodes and fell mid-episode on others.
- An explicit antithetic Newton step, estimating a gradient from the odd part of each pair and a diagonal curvature from the even part as Hessian-estimation evolution strategies do [10], equalled rank recombination with mirrored pairs at its best damping and was sensitive to the damping (0.068, 0.0577, 0.0874 and a fall over four values); we dropped it.
- Damped or blended plan updates gave no gain.
- Domain-randomised rollouts cost more samples than they returned.
- Robustness decided the final noise level. A lower-noise configuration was about 5 to 10% better on moderate episodes and fell on the most demanding ones; a fall costs far more than the margin. We briefly used five rounds per replan, which was robust on those, and returned to four rounds at the slightly higher noise scale for wall-clock reasons; in development this configuration did not fall on any episode we tried.
Limitations
- Component evidence from one kind of task. Our component ablation and the measurements behind the mirrored-pair hypothesis come from development episodes of a single kind of task. On no Setting do we have an ablation of the evaluated planner; what we say about which component matters on the other kinds of task rests on our development measurements, not on the evaluation.
- The headline mechanism is not what wins in our ablation. Our own final ablation attributes the resolvable part of the gain on that kind of task to rank recombination; mirrored pairs and the nominal tail were within noise there at the final noise level, and the perturbed first knot was neutral to slightly worse on moderate episodes. The account of why mirrored pairs help is a hypothesis supported by earlier, lower-noise batches, not by the final configuration. In our development runs, differences below about 0.004 were not resolved.
- Exact cancellation is partial. With rank weights, the two members of a pair receive equal weight only when both lie outside the elite set; otherwise their weights differ, and by little only when their ranks are close, so even-part noise is reduced rather than removed. Clipping knots to the control bounds also breaks the symmetry of pairs near a bound.
- Per-kind constants, tuned by hand. The four configuration rows were chosen on our own development episodes, and the planner selects a row from the setting label or the observation keys. Labels it has never seen are mapped to a row by their prefix or by the observation keys, and that mapping was only checked to run, not for performance.
- Robustness costs accuracy. The noise level in one configuration row was raised until no development episode we tried caused a fall, which in development cost about 10 to 15% on moderate episodes.
- Much of the interface is unused. The planner does not use rollout gradients, domain randomisation (tested and dropped), feedback gains or multi-period commitments; it commits to one control period at a time and never asks for more budget by holding a plan longer.
References
- Taylor Howell, Nimrod Gileadi, Saran Tunyasuvunakool et al. (2022). Predictive Sampling: Real-time Behaviour Synthesis with MuJoCo.
- Grady Williams, Paul Drews, Brian Goldfain et al. (2017). Information Theoretic Model Predictive Control: Theory and Applications to Autonomous Driving.
- Reuven Rubinstein (1999). The Cross-Entropy Method for Combinatorial and Continuous Optimization. Methodology And Computing In Applied Probability.
- Nikolaus Hansen (2016). The CMA Evolution Strategy: A Tutorial.
- Zeji Yi, Chaoyi Pan, Guanqi He et al. (2024). CoVO-MPC: Theoretical Analysis of Sampling-based MPC and Optimal Covariance Design.
- Haoru Xue, Chaoyi Pan, Zeji Yi et al. (2025). Full-Order Sampling-Based MPC for Torque-Level Locomotion Control via Diffusion-Style Annealing. ICRA.
- Armand Jordana, Jianghan Zhang, Joseph Amigo et al. (2025). An Introduction to Zero-Order Optimization Techniques for Robotics.
- An T. Le, Khai Nguyen, Minh Nhat Vu et al. (2025). Model Tensor Planning. TMLR.
- Tommaso Belvedere, Michael Ziegltrum, Giulio Turrisi et al. (2025). Feedback-MPPI: Fast Sampling-Based MPC via Rollout Differentiation -- Adios low-level controllers.
- Tobias Glasmachers, Oswin Krause (2020). The Hessian Estimation Evolution Strategy.