Skip to content
Physical AI
Chapter 09 26 min read

Actor-Critic and Privileged Learning

Why the critic sees 64 values while the deployed actor sees 45 — and what privileged information can and cannot fix.

During training, Asimov's walking policy is never alone. Next to it runs a second network that never moves a joint. Its only job is to judge how well things are going. That second network sees more than the policy does, including quantities the real robot cannot measure. When training ends, it is thrown away. This chapter explains that arrangement: what the two networks do, why the judge gets extra information, and the limits of that trick.

Chapter 8 covered the actor: the 45 observations it reads and the network that turns them into 12 joint targets. Here we add the critic, explain how the two learn together, and draw a clear line between what exists during training and what runs on the robot.

Two networks, two jobs

A bicycle analogy

Think about learning to ride a bicycle.

The rider has to make decisions continuously: lean a little left, steer a little right, pedal harder. The rider acts on what they can feel right now: their balance, the handlebars, the speed of the wind on their face. That is the actor.

Now imagine a coach jogging alongside. The coach does not touch the bicycle. They watch and form a judgement: "from here, this ride is probably going to go well" or "this is heading for a fall". When the rider tries something new and the ride goes better than the coach expected, that was a good change. When it goes worse than expected, it was a bad change. That is the critic.

Now give the coach extra tools. They have a speed gun, a camera on the wheel, and a pressure sensor in the tyres. Their predictions get much better, because they can see things the rider cannot feel. But on race day the coach and their instruments stay at home. Only the rider rides. That is asymmetric actor-critic with privileged information, and it is how Asimov's policy is trained.

What the actor does

The actor is the policy πθ(a∣o)\pi_\theta(a \mid o). It takes the current observation and outputs an action, or during training a probability distribution over actions. For Asimov this is the 45 → 512 → 256 → 128 → 12 MLP from Chapter 8. The actor is the only network that affects the robot, and the only one deployed.

What the critic does

The critic is a value function Vϕ(s)V_\phi(s). It takes a description of the current situation and outputs a single number: an estimate of how much total future reward the robot will collect from here if it keeps following the current policy. It has its own weights ϕ\phi, separate from the actor's θ\theta.

Asimov's critic is an MLP 64 → 512 → 256 → 128 → 1 with ELU activations. Its 64 inputs are the actor's 45 observations plus 19 privileged values.

The same hidden layers as the actor, but with a single output. Counting parameters the same way as in Chapter 8: (64⋅512+512)+(512⋅256+256)+(256⋅128+128)+(128⋅1+1)=197,633(64 \cdot 512 + 512) + (512 \cdot 256 + 256) + (256 \cdot 128 + 128) + (128 \cdot 1 + 1) = 197{,}633.

Why the critic estimates expected future reward

Reinforcement learning (Chapter 7) gives the robot a reward rtr_t at every step: a number that is higher when the robot tracks its command, stays upright and moves smoothly. The goal is not to maximise the reward now but the return, the discounted sum of all future rewards:

Gt=rt+γrt+1+γ2rt+2+⋯=∑k≥0γkrt+kG_t = r_t + \gamma r_{t+1} + \gamma^2 r_{t+2} + \dots = \sum_{k \ge 0} \gamma^k r_{t+k}

The discount factor γ\gamma (typically 0.95–0.99) makes rewards in the near future count more than rewards far away. With γ=0.99\gamma = 0.99 at 50 Hz, rewards about two seconds ahead still carry significant weight.

The return is random: the same situation can lead to a good or bad outcome depending on noise, terrain and the policy's own exploration. The critic estimates its expected value:

Vπ(s)=Eπ[ Gt∣st=s ]V^{\pi}(s) = \mathbb{E}_\pi\left[\, G_t \mid s_t = s \,\right]

Why is this the right quantity to learn? Because the actor needs to know whether an action was good, and a single reward does not say that. A large step that earns a little reward now but makes the robot stumble two steps later is a bad action. The return captures delayed consequences. The value function gives a baseline for what return to expect, so any single outcome can be compared with it.

How the critic helps the actor learn

The advantage

The central quantity is the advantage: how much better did things go than the critic expected?

The simplest estimate uses one step of real experience and the critic's guess about the rest:

At≈δt=rt+γVϕ(st+1)−Vϕ(st)A_t \approx \delta_t = r_t + \gamma V_\phi(s_{t+1}) - V_\phi(s_t)

Read it in words. Vϕ(st)V_\phi(s_t) is what the critic expected before the action. rt+γVϕ(st+1)r_t + \gamma V_\phi(s_{t+1}) is what it believes after seeing one real reward and where the robot ended up. The difference δt\delta_t is called the temporal-difference (TD) error. If it is positive, the action led somewhere better than expected, so the actor should make that action more likely. If it is negative, the actor should make it less likely.

The advantage removes a large source of noise. Suppose the robot is in a bad situation where every action gives poor reward. Raw rewards would push the actor to avoid all of them. The advantage asks only which actions were less bad than expected, and that is the useful signal.

GAE: blending short and long views

The one-step estimate δt\delta_t depends heavily on the critic being accurate. The opposite extreme uses the full observed return, Gt−Vϕ(st)G_t - V_\phi(s_t), which does not depend on the critic's view of the future but is very noisy. Generalized Advantage Estimation (GAE; Schulman et al., 2015) blends them with a parameter λ∈[0,1]\lambda \in [0, 1]:

A^t=∑k≥0(γλ)k δt+k\hat A_t = \sum_{k \ge 0} (\gamma\lambda)^k\, \delta_{t+k}

With λ=0\lambda = 0 this is the one-step TD error: low variance, but biased whenever the critic is wrong. With λ=1\lambda = 1 it is the full return minus the baseline: unbiased, but high variance. Values around 0.95 are common. The intuition: trust the critic for the far future, where real outcomes are very noisy, but use real rewards for the near future, where they are informative.

Either way, the quality of the advantage depends on the quality of the critic. A more accurate critic gives the actor a cleaner learning signal. That is the whole motivation for giving the critic extra information.

Updating both networks

Each training iteration collects a batch of experience from many simulated robots, then updates both networks.

  • The critic is trained by regression: make Vϕ(st)V_\phi(s_t) close to a target return, such as A^t+Vϕ(st)\hat A_t + V_\phi(s_t). Its loss is a squared error.
  • The actor is trained by policy gradient: increase log⁡πθ(at∣ot)\log \pi_\theta(a_t \mid o_t) in proportion to A^t\hat A_t. A popular algorithm for this is PPO (Schulman et al., 2017), which clips the update so the policy cannot change too much in one step.

Which algorithm does Asimov use?

Menlo's reviewed pages do not name the RL algorithm. PPO is used on this page as a standard example of an actor-critic method. The actor-critic structure and the critic's inputs are documented. The optimiser details are not.

A compact GAE implementation, as used by many PPO codebases:

gae.py
import torch
 
def compute_gae(rewards, values, dones, last_value, gamma=0.99, lam=0.95):
    """rewards, values, dones: tensors of shape (T, num_envs).
    last_value: critic estimate for the state after the final step, shape (num_envs,).
    Returns advantages and critic targets (returns), both (T, num_envs)."""
    T = rewards.shape[0]
    adv = torch.zeros_like(rewards)
    gae = torch.zeros_like(last_value)
    for t in reversed(range(T)):
        next_value = last_value if t == T - 1 else values[t + 1]
        not_done = 1.0 - dones[t].float()
        delta = rewards[t] + gamma * next_value * not_done - values[t]
        gae = delta + gamma * lam * not_done * gae
        adv[t] = gae
    returns = adv + values
    return adv, returns
python

Symmetric and asymmetric actor-critic

In a symmetric actor-critic, both networks receive the same input. That is the natural choice when the agent's observation is all there is, for example a game agent that sees the screen.

In an asymmetric actor-critic, the critic receives different, usually richer, input than the actor. Pinto et al. (2017) introduced the idea for robot learning: train a policy that sees only camera images, while the critic sees the full simulator state. The key insight is that the critic is only needed during training, and training happens in simulation, where the full state is available for free. Nothing the critic sees has to exist on the real robot.

SymmetricAsymmetric
Critic inputSame as actorActor input plus privileged state
RequiresNothing extraA simulator that exposes the state
Value estimatesLimited by the actor's partial viewCan use the true state
Deployed networkActorActor (critic discarded)

Asimov uses the asymmetric form.

Privileged information

Privileged information is anything available during training but not at deployment. In simulation, the physics engine knows everything about the robot: its exact velocity, every contact force, the height of every foot. On hardware, the robot knows only what its sensors report, after noise, delay and estimation.

Asimov's critic observations

The critic receives all 45 actor observations plus 19 privileged values: base linear velocity (3), foot height (2), foot air time (2), foot contact state (2, binary), foot contact forces (6), passive toe joint positions (2) and passive toe joint velocities (2). Critic input: 45 + 19 = 64.

Critic indexPrivileged groupSizeWhat it tells the critic
45–47Base linear velocity3How fast the torso is actually moving: is the command being tracked?
48–49Foot height2Whether each swing foot is clearing the ground
50–51Foot air time2How long each foot has been in the air: gait timing
52–53Foot contact state2Which feet are on the ground right now (0 or 1)
54–59Foot contact forces6How load is shared and whether a foot is about to slip
60–61Toe joint positions2How far each passive toe is bent
62–63Toe joint velocities2How fast each passive toe is flexing

The index ranges follow Menlo's listed order. The x/y/z layout of the six contact-force values (assumed here to be three components per foot) is not documented.

Loading simulation…
▸How this works · equations · source · limitationsOpen in lab

What it demonstrates

Which inputs Asimov's actor and critic receive, which 19 are privileged (simulation-only), and why only the 45 hardware-compatible ones survive to deployment.

How it works

Both grids are generated from the shared observation layout in lib/sim/ch08-observations.ts, which records Menlo's documented groups, sizes and actor/critic split. Toggling privileged information hides the 19 critic-only values so the critic grid collapses to exactly the actor's view.

Adjustable parameters

  • Show privileged information on/off
  • Selected element

Known limitations

  • Per-element ordering within groups and the x/y/z layout of the 6 contact-force values are not documented; the layout shown is assumed.

Equations

otcritic=[ otactor∈R45,  otpriv∈R19 ]∈R64o^{\text{critic}}_t = \big[\,o^{\text{actor}}_t \in \mathbb{R}^{45},\; o^{\text{priv}}_t \in \mathbb{R}^{19}\,\big] \in \mathbb{R}^{64}

Core update rule

import { ACTOR_OBSERVATION_GROUPS, PRIVILEGED_OBSERVATION_GROUPS } from "@/lib/sim/ch08-observations";
const critic = [...ACTOR_OBSERVATION_GROUPS, ...PRIVILEGED_OBSERVATION_GROUPS]; // 45 + 19 = 64

Explained in Chapter 9: Actor-Critic

Switch off privileged information in the experiment and the critic's grid collapses to exactly the actor's 45 values. That is the view the actor has during training and on the robot.

Why the actor does not get them

Each privileged group is excluded from the actor for a concrete hardware reason.

  • Base linear velocity. An IMU measures acceleration and rotation rate, not linear velocity. Integrating acceleration drifts within seconds. Good velocity estimates need a dedicated estimator, whose errors differ from the simulator's perfect value (Chapter 4). Menlo excludes it from the actor deliberately.
  • Foot contact forces. Measuring them needs force sensors in the feet, which are expensive, fragile and noisy, or estimates from motor currents, which are indirect. The simulator's contact solver reports them exactly.
  • Foot contact state, height and air time. Contact can be estimated on hardware, but with errors and delays, especially for light or sliding contacts. Foot height above the ground needs knowledge of the terrain. The simulator knows both exactly.
  • Passive toe joints. The toes are passive and compliant, with no actuators.

Toe state is critic-only. The actor must infer toe behaviour from ankle motion, the IMU and the body's response.

The common thread is the data-matching rule from Chapter 8. If the actor learned to rely on a signal that is perfect in simulation and absent or degraded on hardware, it would fail at exactly the moment it mattered.

Why the critic can use them

The critic only computes advantages, which are only used to update weights, which only happens in training. So nothing about the critic needs to exist on the robot, and it can use anything the simulator offers.

The extra information helps because the reward itself is usually computed from privileged quantities. Rewarding "track the commanded velocity" requires knowing the actual velocity. Rewarding "lift your feet" requires knowing foot height. A critic that sees these quantities can predict upcoming reward much better than one that has to guess them from joint angles and an IMU. (Menlo's reward terms are covered in a later guide not reviewed for this site. The reward shapes on this page are general examples.)

The experiment below shows the gap between what the actor is told (the command) and what actually happens (the base velocity). The model is a deliberately simple first-order lag with slip and noise, not a walking simulation.

Loading simulation…
▸How this works · equations · source · limitationsOpen in lab

What it demonstrates

That the commanded velocity the actor receives is not the velocity the robot achieves, and that the achieved velocity, which a tracking reward and the critic need, is easy to read in simulation but not directly measurable on hardware.

How it works

The actual forward velocity follows the command through a first-order lag with time constant τ, an acceleration limit, a slip factor that removes a fraction of the commanded speed, and Brownian disturbances. Euler integration at 200 Hz.

Adjustable parameters

  • Commanded v_x (−0.5 to 1.2 m/s)
  • Step pattern on/off
  • Slip (0–0.5)
  • τ (0.05–1.5 s)
  • Noise (0–0.3)

Known limitations

  • Not a locomotion simulation: there are no legs, contacts or balance.
  • The tracking reward shape is a common choice in legged RL, not Menlo's documented reward.

Equations

v˙=clip⁡ ⁣((1−s) v∗−vτ, −amax⁡, amax⁡)+σ ξ(t)\dot v = \operatorname{clip}\!\left(\frac{(1-s)\,v^{*} - v}{\tau},\, -a_{\max},\, a_{\max}\right) + \sigma\,\xi(t)
rtrack=exp⁡ ⁣(−(v∗−v)2/σr2)r_{\text{track}} = \exp\!\big(-(v^{*}-v)^2/\sigma_r^2\big)

Core update rule

let a = ((1 - slip) * cmd - v) / tau;
a = clamp(a, -maxAccel, maxAccel);
v += a * dt + noise * Math.sqrt(dt) * gaussian(rng);

Explained in Chapter 9: Actor-Critic

The actor sees the dashed line. Only the critic, in simulation, sees the solid one. Any reward for tracking the command is a function of both, so a critic with access to the actual velocity can predict that reward directly.

How much does privileged information help? A real experiment

It is easy to claim that a better-informed critic gives better value estimates. The experiment below tests it with real learning in your browser.

The task is a toy, not Asimov. A walker is commanded to move at speed cc on a surface whose friction μ\mu is hidden and varies per episode. If the command asks for more speed than the surface allows, the walker slips (losing reward) and may fall (ending the episode with a penalty). The policy is fixed. Two critics learn by TD(0) from exactly the same experience. One sees what an actor would see: the command and the time remaining. The other also sees the privileged friction μ\mu. Both are evaluated on held-out episodes they never trained on.

Loading simulation…
▸How this works · equations · source · limitationsOpen in lab

What it demonstrates

With real TD(0) learning in the browser: a critic that also sees a privileged, simulation-only variable predicts returns more accurately, and produces lower-variance advantage estimates, than a critic limited to the actor's inputs.

How it works

Toy environment: each episode samples a commanded speed c and a hidden surface friction μ, both uniform on [0.2, 1]. For up to 30 steps the walker achieves min(c, 1.2μ) plus noise, earns 1 − 2|c − v| − max(0, c − 1.2μ), and falls (reward −2, episode ends) with probability 0.005 + 0.1·max(0, c − 1.2μ). The policy is fixed.

Two linear critics with quadratic polynomial features are trained by TD(0) with a normalised step size on exactly the same transitions. One sees (c, time remaining), the other also sees μ. Both are evaluated on 250 held-out episodes: value MSE against the realised discounted return (γ = 0.95), and the variance of the one-step TD error δ, which is the simplest advantage estimate. Dashed lines show the best achievable error for each feature set (least-squares fit on 3,000 episodes).

Adjustable parameters

  • Learning rate α (0.005–0.3)
  • Episodes per update (1–100)

Known limitations

  • A toy problem with a fixed policy and linear critics, not Asimov's environment or networks.
  • It shows the value-estimation benefit only. It says nothing about whether the actor itself improves; that is the separate partial-observability question.
  • Unit-tested with fixed seeds (tests/ch09-actor-critic.test.ts): privileged value MSE < 0.8× the actor-input critic after 3,000 TD episodes, and < 0.5× for the least-squares fits.

Equations

δt=rt+γVw(st+1)(1−dt)−Vw(st)\delta_t = r_t + \gamma V_w(s_{t+1})(1 - d_t) - V_w(s_t)
w←w+α δt ϕ(st)∥ϕ(st)∥2w \leftarrow w + \alpha\,\delta_t\,\frac{\phi(s_t)}{\lVert\phi(s_t)\rVert^2}
MSE=1N∑t(Vw(st)−Gt)2,Gt=∑k≥0γkrt+k\text{MSE} = \frac{1}{N}\sum_t \big(V_w(s_t) - G_t\big)^2,\quad G_t = \sum_{k\ge 0} \gamma^k r_{t+k}

Core update rule

for (const st of sampleEpisode(rng)) {
  tdUpdate(actorCritic, st, gamma, alpha);  // features of (c, tau)
  tdUpdate(privCritic,  st, gamma, alpha);  // features of (c, tau, mu)
}
const a = evaluateCritic(actorCritic, test, gamma); // value MSE, Var(delta)
const p = evaluateCritic(privCritic,  test, gamma);

Explained in Chapter 9: Actor-Critic

What you should see:

  • Both critics improve as they train: the held-out error falls.
  • The privileged critic's error falls much further. The dashed lines show the best each could do with unlimited training, computed by least squares on 3,000 episodes. With the same features, adding μ\mu cuts the best possible error to roughly a third.
  • The variance of the TD error δ\delta, which is the one-step advantage estimate, is also lower with privileged input. Less noise in the advantage means a cleaner learning signal for the actor.

The reason is not mysterious. Without μ\mu, the critic must predict the average outcome over all surfaces for a given command, and every individual episode deviates from that average. With μ\mu, it can predict the outcome for this surface. The remaining error comes only from true randomness (speed noise, random falls). These results are unit-tested with fixed random seeds in the site's test suite.

What this experiment does not show

It shows that privileged inputs improve value estimation. It does not show that the actor gets better, which depends on everything else in training. And it says nothing about whether the actor can act well without μ\mu. That is a different question, covered next.

Training-time and deployment-time information

Because the critic is discarded, training and deployment use very different systems. Here is the training architecture:

Training (in simulation)

Acting

  1. MuJoCo environment200 Hz physics
  2. Hardware-compatible observations45 values
  3. Actor45→512→256→128→12
  4. 12 joint actionssampled with noise
  5. Simulated robot50 Hz policy steps

Evaluating

  1. MuJoCo environmentground truth available
  2. Hardware observations + privileged observations45 + 19 = 64 values
  3. Critic64→512→256→128→1
  4. Value estimateexpected future reward

Learning

  1. Rewards + value estimatesadvantages, e.g. GAE
  2. RL optimizatione.g. PPO (algorithm not documented)
  3. Actor and critic weight updatesgradient steps

And the deployment architecture on the real robot:

Deployment (on the robot)

  1. Real robot sensorsIMU, joint encoders
  2. + Movement command + Action historysoftware
  3. 45-dimensional observationsame layout and normalizer as training
  4. Trained actorfrozen weights, mean action
  5. 12 joint actionscommanded joint targets
  6. Low-level actuator controllerdetails not documented
  7. Physical robotlegs and passive toes
Standard actor inference needs no critic, no privileged observations, no reward computation and no optimizer.

That last point is worth stating plainly: for standard actor inference, the robot needs no critic, no privileged observations, no reward computation and no optimizer. It needs the 45 observations, the saved normalizer and the actor's weights. The deployment software is far smaller than the training system, and it is fully determined by the actor's input and output interface.

Loading simulation…
▸How this works · equations · source · limitationsOpen in lab

What it demonstrates

Which components exist only during training (critic, privileged observations, rewards, optimizer) and the much smaller pipeline that runs on the robot.

How it works

A static block diagram with two states. Blocks are tagged as simulation, hardware, learning or privileged.

Adjustable parameters

  • Phase: training / deployment

Known limitations

  • Menlo does not name the RL algorithm; PPO appears as an example only.
  • How joint actions become motor commands on Asimov is not documented.

Equations

deploy: at=μθ(ot),ot∈R45\text{deploy: } a_t = \mu_\theta(o_t),\quad o_t \in \mathbb{R}^{45}

Core update rule

# deployment loop (illustrative): only the actor is needed
with torch.no_grad():
    action = actor(normalize(obs))   # mean action, no sampling, no critic

Explained in Chapter 9: Actor-Critic

Why the information is allowed to differ

It can seem like cheating for the critic to see things the actor never will. It is not, for a simple reason: the critic never chooses an action. Its information affects the actor only indirectly, through which actions get reinforced. The actor still has to learn behaviour that works from its own 45 inputs, because those are the only inputs it receives, in training and on the robot.

A teacher analogy helps here. A driving instructor sits in the passenger seat with an extra brake pedal, a better view of the mirrors and years of experience. They can judge each manoeuvre much better than the student can. But the student is the one who learns to drive, using only the student's own eyes and hands. The instructor makes the feedback better without changing what the student will have on their own.

What privileged information does not solve: partial observability

Here is the subtle part. A better critic makes the actor's learning signal better. It does not give the actor any new information at decision time.

The actor's 45 numbers are not the full physical state. Many different physical situations can produce exactly the same observation: same tilt, same joint angles, same command, same recent actions, but different ground friction, a different load on the toes, or a different body velocity. A system like this is partially observable.

If two situations produce identical actor observations but require different actions, no feedforward actor can tell them apart. It must output the same action for both. The best it can learn is a compromise that is optimal on average and suboptimal in each case. A perfect critic can tell the situations apart when scoring them, but that cannot change what the actor sees.

Loading simulation…
▸How this works · equations · source · limitationsOpen in lab

What it demonstrates

Why a memoryless policy cannot act optimally when two physical situations produce identical observations, and why privileged information for the critic does not fix this for the actor.

How it works

Two hidden situations (illustratively, a firm floor and a slippery patch) each have a quadratic return curve with a different best action. The actor sees the same observation in both, so it must choose a single action. The expected return over both situations is maximised by a curvature-weighted average of the two optima.

The reliability slider models extra information reaching the actor (a sensor, history or estimator) that identifies the situation with some probability.

Adjustable parameters

  • P(firm floor) (0–1)
  • Actor's action (−1.5 to 1.5)
  • Extra information reliability (0–1)

Known limitations

  • Return curves are made up for intuition. Real aliasing in locomotion is high-dimensional and partial rather than all-or-nothing.

Equations

Ri(a)=Rimax⁡−ki (a−ai∗)2R_i(a) = R_i^{\max} - k_i\,(a - a_i^{*})^2
E[R](a)=p RA(a)+(1−p) RB(a)\mathbb{E}[R](a) = p\,R_A(a) + (1-p)\,R_B(a)
a†=p kAaA∗+(1−p) kBaB∗p kA+(1−p) kBa^{\dagger} = \frac{p\,k_A a_A^{*} + (1-p)\,k_B a_B^{*}}{p\,k_A + (1-p)\,k_B}
cost of aliasing=pRAmax⁡+(1−p)RBmax⁡−E[R](a†)\text{cost of aliasing} = p R_A^{\max} + (1-p) R_B^{\max} - \mathbb{E}[R](a^{\dagger})

Core update rule

const best = (p * A.k * A.best + (1 - p) * B.k * B.best) / (p * A.k + (1 - p) * B.k);
const blind = p * R(A, best) + (1 - p) * R(B, best);
const informed = p * A.peak + (1 - p) * B.peak;

Explained in Chapter 9: Actor-Critic

In the experiment, the two dashed curves are the return in each hidden situation, and the solid curve is the expected return over both. The best single action sits between the two optima. The gap between "if situation known" and "best blind return" is the cost of the actor not seeing enough. Move the reliability slider to give the actor extra information and the gap closes. The privileged critic, by itself, does not close it at all.

On Asimov, the situations that are hardest to distinguish from the actor's view are the ones its excluded signals would reveal: whether a foot is slipping (contact forces), how fast the body is drifting (linear velocity), and how the passive toes are loaded. Menlo's remark that the force-free policy is stable but reacts less aggressively to contact changes is consistent with this.

Ways to give the actor more information

If partial observability limits performance, the fix has to get more information to the actor at deployment:

  • Add sensors. Foot contact sensors, toe encoders or force sensing would put some privileged quantities on the robot. Each brings cost, fragility and its own noise and timing, which then has to be modelled in simulation.
  • Observation history. Stack the last few observations (or a longer window) into the actor's input. Many hidden quantities, like velocity or slipping, show up in how observations change over time. Asimov's previous-action input is a minimal version of this.
  • State estimation. Run a separate estimator (a Kalman filter fusing IMU and leg kinematics, or a learned network) that outputs estimates of velocity or contact, and give those to the actor. The policy must then be trained on estimates with realistic errors, not on ground truth.
  • Recurrent networks. Replace the MLP with an LSTM or GRU whose hidden state carries memory across steps, so the network learns its own history summary.
  • Teacher-student training. First train a teacher policy that does receive privileged information and therefore acts well. Then train a student policy, with only deployable inputs plus a history, to imitate the teacher. Lee et al. (2020) used this to train robust quadrupedal locomotion over challenging terrain. Rapid Motor Adaptation (RMA; Kumar et al., 2021) is a related approach: an adaptation module learns to estimate a latent summary of the environment from recent observation and action history.

These are general techniques from the literature. Menlo's reviewed pages document the asymmetric actor-critic setup above, not the use of any of these extensions for Asimov.

Code: an asymmetric actor-critic in PyTorch

Putting the two networks side by side, with separate normalizers because they see different inputs. RunningMeanStd, mlp and GaussianActor are the definitions from Chapter 8.

asymmetric_actor_critic.py
import torch
from torch import nn
 
ACTOR_OBS, PRIV_OBS, ACT_DIM = 45, 19, 12
CRITIC_OBS = ACTOR_OBS + PRIV_OBS            # 64
 
class Critic(nn.Module):
    def __init__(self):
        super().__init__()
        self.normalizer = RunningMeanStd(CRITIC_OBS)
        self.v = mlp([CRITIC_OBS, 512, 256, 128, 1])
 
    def forward(self, critic_obs: torch.Tensor) -> torch.Tensor:
        return self.v(self.normalizer(critic_obs)).squeeze(-1)
 
actor = GaussianActor(ACTOR_OBS, ACT_DIM, init_std=1.0)
critic = Critic()
 
def rollout_step(env):
    actor_obs, priv_obs = env.observations()        # (N, 45), (N, 19): priv only exists in sim
    critic_obs = torch.cat([actor_obs, priv_obs], dim=-1)   # (N, 64)
    action, logp = actor.act(actor_obs)             # the actor never sees priv_obs
    value = critic(critic_obs)
    reward, done = env.step(action)
    return actor_obs, critic_obs, action, logp, value, reward, done
 
def ppo_losses(batch, clip=0.2):                    # PPO as an example algorithm
    dist = actor.distribution(batch.actor_obs)
    logp = dist.log_prob(batch.actions).sum(-1)
    ratio = torch.exp(logp - batch.old_logp)
    adv = (batch.adv - batch.adv.mean()) / (batch.adv.std() + 1e-8)
    actor_loss = -torch.min(ratio * adv, ratio.clamp(1 - clip, 1 + clip) * adv).mean()
    critic_loss = (critic(batch.critic_obs) - batch.returns).pow(2).mean()
    return actor_loss, critic_loss
 
# Deployment: save only what the actor needs.
torch.save(actor.state_dict(), "actor.pt")          # weights + normalizer buffers + log_std
python

The single most important line is actor.act(actor_obs): the actor's input never includes priv_obs. A bug that leaks one privileged value into the actor's input would train a policy that looks excellent in simulation and fails on hardware. It is worth a unit test.

A practical example

Consider a commanded forward walk at 0.6 m/s across a patch where friction varies.

During training in simulation, the robot steps onto a slick region. Its feet slip and its actual velocity drops to 0.4 m/s. The critic sees the drop in base linear velocity, the changed contact forces and the toe deflection, and lowers its value estimate immediately. If the actor's next actions shorten the stride and the robot recovers faster than the critic expected, the advantages are positive and those actions are reinforced. Over millions of such episodes, the actor learns patterns in its own 45 inputs that precede and accompany slipping: changes in pitch rate, joint velocities that don't match the commanded joint motion, gravity tilting as a foot slides.

On the real robot, the critic is gone. The actor sees only the IMU, joint state, command and action history. If those patterns appear, it responds the way it learned to. If a slip produces no visible signature in those 45 numbers, the actor cannot respond to it, however good the critic was during training.

How this connects to the rest of the site

Limitations and common misconceptions

“The critic helps control the robot.”

The critic never produces actions and is not deployed. Its only effect is on how the actor's weights change during training.

“Giving the critic privileged information is cheating, so the policy won't transfer.”

The actor still receives only hardware-compatible inputs, in training and at deployment. Privileged information changes the quality of the learning signal, not the actor's interface.

“With a privileged critic, the actor effectively knows the full state.”

It does not. Partial observability is a property of the actor's inputs. If two situations look identical to the actor, it must act the same way in both, however well the critic scored them.

“A better critic always gives a better policy.”

A more accurate critic reduces noise in the advantage estimates, which usually helps. But the final policy is limited by the actor's observation, its capacity, the reward and the training procedure, and by how well the simulator matches the hardware.

What is not documented

Menlo's reviewed pages document the critic's inputs and shape. They do not document the RL algorithm, the discount factor, GAE parameters, reward terms or training hyperparameters. Values on this page such as γ=0.99\gamma = 0.99 and λ=0.95\lambda = 0.95 are common defaults, not Asimov's settings.

A further practical limitation: the critic can only use privileged quantities the simulator computes correctly. If simulated contact forces are unrealistic, the critic learns to trust unrealistic signals, which can bias the advantages. Asymmetric training makes simulator fidelity matter in the critic's inputs too.

Key takeaways

Key takeaways

  • The actor chooses actions; the critic estimates expected future reward (the value) so that each action can be judged against expectations through the advantage A=r+γV(s′)−V(s)A = r + \gamma V(s') - V(s), often smoothed with GAE.
  • Asimov uses an asymmetric actor-critic: the actor sees 45 hardware-compatible observations; the critic (64 → 512 → 256 → 128 → 1) sees those plus 19 privileged values.
  • The privileged values are base linear velocity, foot height, air time, contact state, contact forces, and passive toe position and velocity: all easy in simulation and unavailable or unreliable on hardware.
  • Privileged inputs make value estimates more accurate and advantages less noisy, as the in-browser TD(0) experiment shows.
  • Deployment needs only the actor, its normalizer and the 45 observations. No critic, privileged data, rewards or optimizer.
  • Privileged information does not solve partial observability. If the actor cannot tell two situations apart, it needs more information: sensors, history, state estimation, recurrence or teacher-student training.

References and further reading

  • Menlo, Reinforcement Learning for Locomotion: actor and critic observations, architectures and the asymmetric setup.
  • Menlo, Understanding Your Simulation Environment: timing and the observation path.
  • Menlo, Asimov locomotion-training guide: overview and later guides (reward design, domain randomization, deployment).
  • L. Pinto, M. Andrychowicz, P. Welinder, W. Zaremba and P. Abbeel, "Asymmetric Actor Critic for Image-Based Robot Learning," arXiv:1710.06542, 2017.
  • J. Lee, J. Hwangbo, L. Wellhausen, V. Koltun and M. Hutter, "Learning quadrupedal locomotion over challenging terrain," Science Robotics 5(47), eabc5986, 2020.
  • A. Kumar, Z. Fu, D. Pathak and J. Malik, "RMA: Rapid Motor Adaptation for Legged Robots," Robotics: Science and Systems, 2021. arXiv:2107.04034.
  • J. Schulman, P. Moritz, S. Levine, M. Jordan and P. Abbeel, "High-Dimensional Continuous Control Using Generalized Advantage Estimation," arXiv:1506.02438, 2015.
  • J. Schulman, F. Wolski, P. Dhariwal, A. Radford and O. Klimov, "Proximal Policy Optimization Algorithms," arXiv:1707.06347, 2017.
  • N. Rudin, D. Hoeller, P. Reist and M. Hutter, "Learning to Walk in Minutes Using Massively Parallel Deep Reinforcement Learning," PMLR 164, 2022. arXiv:2109.11978.
  • R. S. Sutton and A. G. Barto, Reinforcement Learning: An Introduction, 2nd ed. (MIT Press, 2018). Free online.