Computing Library › Reinforcement Learning
Reinforcement Learning

Domain Randomization

Randomizing simulator parameters during training forces policies robust enough to treat reality as one more variation.

Robustness by variety

Domain randomization trains a policy across a wide range of randomized simulator settings rather than a single best-guess model. By experiencing many variations of dynamics and appearance, the policy learns behavior that works under all of them, so the real world, if it falls within the training range, is just another sample the policy already handles.

What to randomize

Kronos motion — learning physics

Fixed versus adaptive

Static domain randomization fixes the ranges up front, but ranges too wide make the task unlearnable and too narrow fail to transfer. Automatic domain randomization starts narrow and widens each parameter as the policy masters the current range, growing difficulty in step with competence, the approach behind dexterous in-hand manipulation that transferred to real hardware.

python
# Automatic domain randomization: widen when performance is high
if recent_success_rate > threshold:
    ranges[param] = expand(ranges[param])   # harder next
elif recent_success_rate < low_threshold:
    ranges[param] = shrink(ranges[param])   # ease off

Two views of the transfer

One view treats the real world as inside the training distribution, so no adaptation is needed. Another treats randomization as producing a policy that can quickly infer and adapt to the true parameters at deployment, linking domain randomization to meta-RL and online system identification. Either way, broad randomization plus a conservative safety layer on hardware is the reliable sim-to-real recipe.