RandomSelectRedAgent
Bases: BaseAgent
Red Agent that random selects an action (with parameters) to execute.
Attributes:
Name | Type | Description |
---|---|---|
step |
int
|
number of steps the agent has taken in the environment |
last_action |
str or Action
|
the previous action that was executed |
print_output |
bool
|
option as to if action info is printed to the terminal |
disable_withdraw |
bool
|
when true, the Withdraw action is removed from the list of possible actions, so that the agent will no longer perform Withdraw. |
Other Parameters:
Name | Type | Description |
---|---|---|
name |
str
|
name of the agent |
np_random |
numpy.random._generator.Generator
|
numpy random generator initialised on creation of scenario. This allows for the seed to be consistent with the CybORG() seed parameter |
Functions
get_action
Chooses a valid action randomly from the action space, along with corresponding parameters - picked randomly when given options.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
observation |
dict
|
agent observation from last action |
required |
action_space |
dict
|
agent action space |
required |
Raises:
Type | Description |
---|---|
ValueError
|
There are no valid actions for the agent to take. Sleep should always be a valid action, so will only occur in error. |