Expanding Box Curriculum#

A simple curriculum that expands a zero-centered range from an initial range to a final range over a number of discrete steps. The curriculum increases the range to the next stage when a provided reward threshold is met.

class syllabus.curricula.expanding_box.ExpandingBox(*curriculum_args, steps: int = 5, success_threshold: float = 0.75, required_successes: int = 10, **curriculum_kwargs)[source]#

Bases: Curriculum

Base class and API for defining curricula to interface with Gym environments.

log_metrics(writer, logs, step=None, log_n_tasks=1)[source]#

Log metrics to writer.

sample(k: int = 1) List | Any[source]#

Sample k tasks from the curriculum.

update_task_progress(task: Any, progress: float | bool, env_id: int | None = None) None[source]#

Update the curriculum with a task and its success probability upon success or failure.