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 . 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 . 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 , separate from the actor's .
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: .
Why the critic estimates expected future reward
Reinforcement learning (Chapter 7) gives the robot a reward 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:
The discount factor (typically 0.95–0.99) makes rewards in the near future count more than rewards far away. With 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:
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:
Read it in words. is what the critic expected before the action. is what it believes after seeing one real reward and where the robot ended up. The difference 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 depends heavily on the critic being accurate. The opposite extreme uses the full observed return, , 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 :
With this is the one-step TD error: low variance, but biased whenever the critic is wrong. With 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 close to a target return, such as . Its loss is a squared error.
- The actor is trained by policy gradient: increase in proportion to . 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:
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, returnsSymmetric 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.
| Symmetric | Asymmetric | |
|---|---|---|
| Critic input | Same as actor | Actor input plus privileged state |
| Requires | Nothing extra | A simulator that exposes the state |
| Value estimates | Limited by the actor's partial view | Can use the true state |
| Deployed network | Actor | Actor (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 index | Privileged group | Size | What it tells the critic |
|---|---|---|---|
| 45–47 | Base linear velocity | 3 | How fast the torso is actually moving: is the command being tracked? |
| 48–49 | Foot height | 2 | Whether each swing foot is clearing the ground |
| 50–51 | Foot air time | 2 | How long each foot has been in the air: gait timing |
| 52–53 | Foot contact state | 2 | Which feet are on the ground right now (0 or 1) |
| 54–59 | Foot contact forces | 6 | How load is shared and whether a foot is about to slip |
| 60–61 | Toe joint positions | 2 | How far each passive toe is bent |
| 62–63 | Toe joint velocities | 2 | How 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.
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.
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 on a surface whose friction 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 . Both are evaluated on held-out episodes they never trained on.
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 cuts the best possible error to roughly a third.
- The variance of the TD error , 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 , the critic must predict the average outcome over all surfaces for a given command, and every individual episode deviates from that average. With , 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 . 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
- MuJoCo environment200 Hz physics
- Hardware-compatible observations45 values
- Actor45→512→256→128→12
- 12 joint actionssampled with noise
- Simulated robot50 Hz policy steps
Evaluating
- MuJoCo environmentground truth available
- Hardware observations + privileged observations45 + 19 = 64 values
- Critic64→512→256→128→1
- Value estimateexpected future reward
Learning
- Rewards + value estimatesadvantages, e.g. GAE
- RL optimizatione.g. PPO (algorithm not documented)
- Actor and critic weight updatesgradient steps
And the deployment architecture on the real robot:
Deployment (on the robot)
- Real robot sensorsIMU, joint encoders
- + Movement command + Action historysoftware
- 45-dimensional observationsame layout and normalizer as training
- Trained actorfrozen weights, mean action
- 12 joint actionscommanded joint targets
- Low-level actuator controllerdetails not documented
- Physical robotlegs and passive toes
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.
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.
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.
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_stdThe 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
- Chapter 4: Sensors explains why linear velocity and contact force are hard to measure on hardware.
- Chapter 5: Communication covers the timing of the signals the actor does receive.
- Chapter 6: Asimov simulation describes the simulator that provides privileged ground truth.
- Chapter 7: Reinforcement learning introduces returns, value functions and policy gradients.
- Chapter 8: Locomotion policy details the actor and its 45 observations.
- Research explores a proposed idea about what information a policy should see during training.
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 and 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 , 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.