Skip to content

Scenario

Bases: CybORGLogger

A dataclass that contains the initial state information.

Contains getter and setter functions that are used to inform the creation of environmental objects.

Attributes:

Name Type Description
agents Dict[str, ScenarioAgent]
allowed_subnets_per_mphase dict
hosts Dict[str, Host]
max_bandwidth int
mission_phases Tuple[int, int, int]
operational_firewall bool
predeployed bool
scenario_gen_type unknown
starting_sessions list
subnets Dict[str, Subnet]
team_agents dict
team_calc dict

Functions

__init__

__init__(agents: Dict[str, ScenarioAgent] = None, team_calcs: dict = None, team_agents: dict = None, hosts: Dict[str, Host] = None, subnets: Dict[str, Subnet] = None, mission_phases: Tuple[int, int, int] = None, allowed_subnets_per_mphase: dict = None, predeployed: bool = False, max_bandwidth: int = 1000)

Parameters:

Name Type Description Default
agents Dict[str, ScenarioAgent]
None
allowed_subnets_per_mphase dict
None
hosts Dict[str, Host]
None
max_bandwidth int

maximum bandwidth of agent communications

1000
mission_phases Tuple[int, int, int]
None
predeployed bool

by default False

False
subnets Dict[str, Subnet]
None
team_agents dict
None
team_calcs dict
None

get_agent_info

get_agent_info(agent_name: str) -> ScenarioAgent

gets ScenarioAgent object by agent name

get_end_turn_actions

get_end_turn_actions() -> dict

Returns the end turn action that is performed by an agent

get_host

get_host(hostname: str) -> Host

gets host object from hostname

get_host_subnet_names

get_host_subnet_names(hostname: str) -> List[str]

gets list of hosts in same subnet as hostname

get_reward_calculators

get_reward_calculators() -> dict

gets dictionary of teams and their reward calculators

get_subnet_hosts

get_subnet_hosts(subnetname: str) -> List[str]

gets list of hosts in subnet

get_subnet_nacls

get_subnet_nacls(subnetname: str) -> dict

gets dictionary of subnet info

get_subnet_size

get_subnet_size(subnetname: str) -> int

gets size of subnet

get_team_assignments

get_team_assignments() -> dict

Returns team agents dictionary

get_team_info

get_team_info(team_name: str) -> dict

gets dictionary of team info for team, including calculators and agents

get_teams

get_teams() -> list

gets a list of the team names

load classmethod

load(scenario_dict: dict, np_random: dict)

Class load method