#1522: refactor red_agent_identifier -> random_red_agent so that it is a boolean + documentation
This commit is contained in:
@@ -9,7 +9,7 @@ agent_identifier: STABLE_BASELINES3_A2C
|
||||
|
||||
# RED AGENT IDENTIFIER
|
||||
# RANDOM or NONE
|
||||
red_agent_identifier: "NONE"
|
||||
random_red_agent: False
|
||||
|
||||
# Sets How the Action Space is defined:
|
||||
# "NODE"
|
||||
|
||||
@@ -9,7 +9,7 @@ agent_identifier: STABLE_BASELINES3_A2C
|
||||
|
||||
# RED AGENT IDENTIFIER
|
||||
# RANDOM or NONE
|
||||
red_agent_identifier: "RANDOM"
|
||||
random_red_agent: True
|
||||
|
||||
# Sets How the Action Space is defined:
|
||||
# "NODE"
|
||||
|
||||
@@ -21,7 +21,7 @@ class TrainingConfig:
|
||||
agent_identifier: str = "STABLE_BASELINES3_A2C"
|
||||
"The Red Agent algo/class to be used."
|
||||
|
||||
red_agent_identifier: str = "RANDOM"
|
||||
random_red_agent: bool = False
|
||||
"Creates Random Red Agent Attacks"
|
||||
|
||||
action_type: ActionType = ActionType.ANY
|
||||
|
||||
@@ -277,7 +277,7 @@ class Primaite(Env):
|
||||
self.reset_environment()
|
||||
|
||||
# Create a random red agent to use for this episode
|
||||
if self.training_config.red_agent_identifier == "RANDOM":
|
||||
if self.training_config.random_red_agent:
|
||||
self.create_random_red_agent()
|
||||
|
||||
# Reset counters and totals
|
||||
|
||||
Reference in New Issue
Block a user