Constant Curriculum#

This class always samples the same default value. It can be helpful for debugging or used in a manually designed <Sequential>.

class syllabus.curricula.constant.Constant(default_task, *curriculum_args, require_step_updates=False, **curriculum_kwargs)[source]#

Bases: Curriculum

Used to to test API without a curriculum.

property requires_step_updates: bool#

Returns whether the curriculum requires step updates from the environment.

Returns:

True if the curriculum requires step updates, False otherwise

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

Sample k tasks from the curriculum.

update_on_episode(episode_return, length, task, progress, env_id=None) None[source]#

Update the curriculum with episode results from the environment.

update_on_step(task, obs, rew, term, trunc, info, progress, env_id=None) None[source]#

Update the curriculum with the current step results from the environment.

update_on_step_batch(step_results, env_id=None) None[source]#

Update the curriculum with a batch of step results from the environment.

update_task_progress(task, progress, env_id=None) None[source]#

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