csle_defender.emulation package

Submodules

csle_defender.emulation.defender_stopping_middleware module

class csle_defender.emulation.defender_stopping_middleware.DefenderStoppingMiddleware[source]

Bases: object

Class that implements optimal stopping actions for the defender.

static continue_monitor(s: EmulationEnvState) EmulationEnvState[source]

Performs a “continue” action for the defender (continues monitoring)

Parameters
  • s – the current state

  • defender_action – the action to take

  • attacker_action – the previous action of the attacker

  • emulation_env_config – the emulation environment configuration

Returns

s_prime, reward, done

static stop_monitor(s: EmulationEnvState) EmulationEnvState[source]

Performs a stopping action for the defender (reports an intrusion)

Parameters
  • s – the current state

  • defender_action – the action to take

  • attacker_action – the previous action of the attacker

  • emulation_env_config – the emulation environment configuration

Returns

s_prime

csle_defender.emulation.defender_update_state_middleware module

csle_defender.emulation.emulated_defender module

class csle_defender.emulation.emulated_defender.EmulatedDefender[source]

Bases: object

Represents an emulated defender agent

static defender_stopping_action(s: EmulationEnvState, defender_action: EmulationDefenderAction, attacker_action: EmulationAttackerAction) EmulationEnvState[source]

Implements transition of a stopping action of the defender

Parameters
  • s – the current state

  • defender_action – the defender’s action

  • attacker_action – the previous action of the attacker

  • emulation_env_config – the emulation environment configuration

Returns

s’

static defender_transition(s: EmulationEnvState, defender_action: EmulationDefenderAction, attacker_action: EmulationAttackerAction) EmulationEnvState[source]

Implements the transition operator T: (s,a) -> s’

Parameters
  • s – the current state

  • defender_action – the defender action

  • attacker_action – the previous action of the attacker

Returns

s’

Module contents