Skip to content

ScenarioGenerator

The ScenarioGenerator class is an abstract class that defines the interface for other ScenarioGenerator classes.

Attributes:

Name Type Description
update_each_step bool

default True

background_image str

path for render image, default None

Functions

create_scenario

create_scenario(np_random) -> Scenario

Creates a scenario object that can be used to initialise the state

Raises:

Type Description
NotImplementedError

Abstract method that should be implemented by child classes

validate_scenario

validate_scenario(scenario: Scenario)

Takes in a scenario object and raises errors if the scenario is misconfigured or missing important information

Parameters:

Name Type Description Default
scenario Scenario

scenario to be validated

required

Raises:

Type Description
ValueError

CybORG does not currently support multiple types of interfaces on a single host

AssertionError

Scenario validation assertions