Domain Randomization#
Domain Randomization simply uniformly samples tasks from the task space. It can be a strong baseline in environments with relatively small task spaces.
- class syllabus.curricula.domain_randomization.BatchedDomainRandomization(batch_size: int, task_space, warmup_batches: int = 5, **kwargs)[source]#
Bases:
Curriculum
A simple but strong baseline for curriculum learning that uniformly samples a task from the task space.
- sample(k: int = 1) Any [source]#
Sample k tasks from the curriculum.
- Parameters:
k – Number of tasks to sample, defaults to 1
- Returns:
Either returns a single task if k=1, or a list of k tasks
- update_on_episode(episode_return, length, task, progress, env_id: int | None = None) None [source]#
Update the curriculum with episode results from the environment.
- Parameters:
episode_return – Episodic return
length – Length of the episode
task – Task for which the episode was completed
progress – Progress toward completion or success rate of the given task. 1.0 or True typically indicates a complete task.
env_id – Environment identifier
- class syllabus.curricula.domain_randomization.DomainRandomization(task_space: TaskSpace, random_start_tasks: int = 0, task_names: Callable | None = None, record_stats: bool = False)[source]#
Bases:
Curriculum
A simple but strong baseline for curriculum learning that uniformly samples a task from the task space.
- class syllabus.curricula.domain_randomization.SyncedBatchedDomainRandomization(batch_size: int, task_space, warmup_batches: int = 1, uniform_chance: float = 0.05, **kwargs)[source]#
Bases:
Curriculum
A simple but strong baseline for curriculum learning that uniformly samples a task from the task space.