yawning_titan.agents.sinewave_red#

Functions

calculate_number_moves

Calculate the number of moves for the red agent to take.

Classes

SineWaveRedAgent

An agent which is based on the RedInterface provided by the YAWNING TITAN generic environment.

yawning_titan.agents.sinewave_red.calculate_number_moves(attack_strength)[source]#

Calculate the number of moves for the red agent to take.

Parameters:

attack_strength – Current red agent attack strength

Returns:

An int representing the number of moves the red agent can take that turn

class yawning_titan.agents.sinewave_red.SineWaveRedAgent(network_interface)[source]#

An agent which is based on the RedInterface provided by the YAWNING TITAN generic environment.

This agent is an example of how the generic RedInterface can be extended to include custom red team behaviour - in this case, action selection.

The agent uses a sine wave to allow the red agent to attack more randomly and in waves rather than constantly.

Initialise the red interface.

Parameters:

network_interface – Object from the NetworkInterface class

__init__(network_interface)[source]#

Initialise the red interface.

Parameters:

network_interface – Object from the NetworkInterface class

perform_action()[source]#

Chooses and then performs an action. This is called for every one of the red agents turns.

Returns:

A tuple containing the name of the action, the success status, the target, the attacking node and any natural spreading attacks