yawning_titan.envs.specific.four_node_def.FourNodeDef#
- class yawning_titan.envs.specific.four_node_def.FourNodeDef(attacker_skill=90, red_start_node=0, objective_node=3, n_machines=4, attack_success_threshold=0.6)[source]#
Bases:
Env
Class that represents a simple four node connected network.
Methods
Override close in your subclass to perform any necessary cleanup.
Render the environment to the screen so that it can be played in realtime.
Reset the environment to the default state.
Sets the seed for this env's random number generator(s).
Take a time step and execute the actions for both Blue RL agent and hard-hard coded Red agent.
Attributes
Completely unwrap this env.
- action_space = None#
- observation_space = None#
- reward_range = (-inf, inf)#
- reset()[source]#
Reset the environment to the default state.
- Returns:
A new starting observation (numpy array)
- step(action)[source]#
Take a time step and execute the actions for both Blue RL agent and hard-hard coded Red agent.
- Parameters:
action – The action value generated from the Blue RL agent (int)
- Returns:
The next environment observation (numpy array) reward: The reward value for that timestep (int) done: Whether the epsiode is done (bool) notes: An empty notes dictionary
- Return type:
observation
- render(mode='human')[source]#
Render the environment to the screen so that it can be played in realtime.
- close()#
Override close in your subclass to perform any necessary cleanup.
Environments will automatically close() themselves when garbage collected or when the program exits.
- metadata = {'render.modes': []}#
- seed(seed=None)#
Sets the seed for this env’s random number generator(s).
Note
Some environments use multiple pseudorandom number generators. We want to capture all such seeds used in order to ensure that there aren’t accidental correlations between multiple generators.
- Returns:
- Returns the list of seeds used in this env’s random
number generators. The first value in the list should be the “main” seed, or the value which a reproducer should pass to ‘seed’. Often, the main seed equals the provided ‘seed’, but this won’t be true if seed=None, for example.
- Return type:
list<bigint>
- spec = None#
- property unwrapped#
Completely unwrap this env.
- Returns:
The base non-wrapped gym.Env instance
- Return type:
gym.Env