Skip to content

ScenarioAgent

Bases: CybORGLogger

A dataclass for handling scenario information of an agent

Is essentially a wrapper around the definition for a single agent in the scenario dictionary, and provides a consistent interface to agent data without having to remember string keys, etc.

Functions

__init__

__init__(agent_name: str, team: str, starting_sessions: List[Session], actions: list, osint: dict, allowed_subnets: list, agent_type: BaseAgent = None, active: bool = True, default_actions: tuple = None, internal_only: bool = False)

Parameters:

Name Type Description Default
agent_name str

Name of the agent

required
team str

the name of the team the agent is a part of

required
starting_sessions List[Session]

the list of sessions the agent starts with

required
actions list

the list of actions an agent may perform

required
osint dict

the information the agent begins a game with

required
agent_type BaseAgent

the class that selects the default actions of the agent

None
active bool

determines if the agent starts active or inactive at the start of the game

True
default_actions tuple

the action_class, action_kwargs for actions being performed at the end of a turn by this agent

None
internal_only bool

marks if an agent is restricted from using the external cyborg interfaces, useful if you want to enforce a default behaviour for that agent

False

get_action_classes staticmethod

get_action_classes(actions)

Getter method for action classes contained in CybORG.Simulator.Actions

load classmethod

load(agent_name: str, agent_info: dict)

Class load method