yawning_titan.envs.generic.core.blue_action_set#

Classes

BlueActionSet

A class representing a Blue Agents action set.

class yawning_titan.envs.generic.core.blue_action_set.BlueActionSet(network_interface)[source]#

A class representing a Blue Agents action set.

Initialise a blue agents action set.

Parameters:
  • network_interface – Object that allows the class to interact with the network

  • settings_file – Dictionary containing configuration data

__init__(network_interface)[source]#

Initialise a blue agents action set.

Parameters:
  • network_interface – Object that allows the class to interact with the network

  • settings_file – Dictionary containing configuration data

reduce_node_vulnerability(node)[source]#

Reduce the vulnerability of the target node.

Will not reduce the vulnerability past the lower bound setting in the configuration file:

  • BLUE: node_vulnerability_min

Parameters:

node – The node to reduce the vulnerability of as an instance of Node.

Returns:

The name of the action taken (“reduce_vulnerability”) and the Node the action was taken on.

restore_node(node)[source]#

Restore a node to its starting state: safe and with its starting vulnerability.

Parameters:

node – the node to restore

Returns:

The name of the action (“restore_node”) The name of the node the action was taken on

make_safe_node(node)[source]#

Make a target node safe.

Can also affect the vulnerability of the node. There are settings that can change how this action works in the configuration file:

  • BLUE: making_node_safe_modifies_vulnerability

  • BLUE: vulnerability_change

  • BLUE: making_node_safe_gives_random_vulnerability

Parameters:
  • action (The name of the) –

  • safe (The name of the node to make) –

scan_all_nodes()[source]#

Scan all of the nodes within the environment and attempt to get their states.

The blue agents ability to see intrusions is based on the values in the config file:
  • BLUE: chance_to_discover_intrusion_on_scan

  • BLUE: chance_to_discover_intrusion_on_scan_deceptive_node

Returns:

The name of the action (“scan”) The node the action was performed on (None: as scan affects all nodes, not just 1)

isolate_node(node)[source]#

Isolate a node by disabling all of its connections to other nodes.

Parameters:

node – the node to disable

Returns:

The name of the action (“isolate”) The node affected

reconnect_node(node)[source]#

Enable all of the connections to and from a node.

Parameters:

node – the node to enable to connections to

Returns:

The name of the action (“connect”) The node affected

do_nothing()[source]#

Do Nothing.

Returns:

The name of the action (“do_nothing”) The nodes affected (None: as do nothing affects no nodes)

add_deceptive_node(edge)[source]#

Add a deceptive node into the environment.

Deceptive nodes are the same as standard nodes except they have a 100% chance (by default) to be able to detect attacks from the red agent. A deceptive node is added on an edge between two nodes.

Parameters:

edge – The edge to place the deceptive node on

Returns:

The name of the action performed (“add_deceptive_node” or “do_nothing” depending on if action is valid) A pair of nodes that the deceptive node was placed between (or None if no action performed)