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: csle_common.dao.emulation_config.emulation_env_state.EmulationEnvState) csle_common.dao.emulation_config.emulation_env_state.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: csle_common.dao.emulation_config.emulation_env_state.EmulationEnvState) csle_common.dao.emulation_config.emulation_env_state.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: csle_common.dao.emulation_config.emulation_env_state.EmulationEnvState, defender_action: csle_common.dao.emulation_action.defender.emulation_defender_action.EmulationDefenderAction, attacker_action: csle_common.dao.emulation_action.attacker.emulation_attacker_action.EmulationAttackerAction) csle_common.dao.emulation_config.emulation_env_state.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: csle_common.dao.emulation_config.emulation_env_state.EmulationEnvState, defender_action: csle_common.dao.emulation_action.defender.emulation_defender_action.EmulationDefenderAction, attacker_action: csle_common.dao.emulation_action.attacker.emulation_attacker_action.EmulationAttackerAction) csle_common.dao.emulation_config.emulation_env_state.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’