gym_csle_intrusion_response_game.dao package

Submodules

gym_csle_intrusion_response_game.dao.intrusion_response_game_local_pomdp_attacker_config module

class gym_csle_intrusion_response_game.dao.intrusion_response_game_local_pomdp_attacker_config.IntrusionResponseGameLocalPOMDPAttackerConfig(env_name: str, local_intrusion_response_game_config: gym_csle_intrusion_response_game.dao.local_intrusion_response_game_config.LocalIntrusionResponseGameConfig, defender_strategy: csle_common.dao.training.policy.Policy, attacker_strategy: Optional[csle_common.dao.training.policy.Policy] = None)[source]

Bases: csle_common.dao.simulation_config.simulation_env_input_config.SimulationEnvInputConfig

DTO class representing the configuration of the local POMDP environment of the attacker for a specific node when facing a static defender strategy

static from_dict(d: Dict[str, Any]) gym_csle_intrusion_response_game.dao.intrusion_response_game_local_pomdp_attacker_config.IntrusionResponseGameLocalPOMDPAttackerConfig[source]

Converts a dict representation to an instance

Parameters

d – the dict to convert

Returns

the created instance

static from_json_file(json_file_path: str) gym_csle_intrusion_response_game.dao.intrusion_response_game_local_pomdp_attacker_config.IntrusionResponseGameLocalPOMDPAttackerConfig[source]

Reads a json file and converts it to a DTO

Parameters

json_file_path – the json file path

Returns

the converted DTO

to_dict() Dict[str, Any][source]

Converts the object to a dict representation

Returns

a dict representation of the object

gym_csle_intrusion_response_game.dao.intrusion_response_game_local_pomdp_defender_config module

class gym_csle_intrusion_response_game.dao.intrusion_response_game_local_pomdp_defender_config.IntrusionResponseGameLocalPOMDPDefenderConfig(env_name: str, local_intrusion_response_game_config: gym_csle_intrusion_response_game.dao.local_intrusion_response_game_config.LocalIntrusionResponseGameConfig, attacker_strategy: csle_common.dao.training.policy.Policy, defender_strategy: Optional[csle_common.dao.training.policy.Policy] = None)[source]

Bases: csle_common.dao.simulation_config.simulation_env_input_config.SimulationEnvInputConfig

DTO class representing the configuration of the local POMDP environment of the defender for a specific node when facing a static attacker strategy

static from_dict(d: Dict[str, Any]) gym_csle_intrusion_response_game.dao.intrusion_response_game_local_pomdp_defender_config.IntrusionResponseGameLocalPOMDPDefenderConfig[source]

Converts a dict representation to an instance

Parameters

d – the dict to convert

Returns

the created instance

static from_json_file(json_file_path: str) gym_csle_intrusion_response_game.dao.intrusion_response_game_local_pomdp_defender_config.IntrusionResponseGameLocalPOMDPDefenderConfig[source]

Reads a json file and converts it to a DTO

Parameters

json_file_path – the json file path

Returns

the converted DTO

to_dict() Dict[str, Any][source]

Converts the object to a dict representation

Returns

a dict representation of the object

gym_csle_intrusion_response_game.dao.intrusion_response_game_state_local module

class gym_csle_intrusion_response_game.dao.intrusion_response_game_state_local.IntrusionResponseGameStateLocal(d_b1: numpy.ndarray[Any, numpy.dtype[numpy.float64]], a_b1: numpy.ndarray[Any, numpy.dtype[numpy.float64]], s_1_idx: int, S: numpy.ndarray[Any, numpy.dtype[Any]], S_A: numpy.ndarray[Any, numpy.dtype[Any]], S_D: numpy.ndarray[Any, numpy.dtype[Any]])[source]

Bases: csle_base.json_serializable.JSONSerializable

Represents the state of the intrusion response game (A PO-POSG, i.e a partially observed stochastic game with public observations)

attacker_observation() numpy.ndarray[Any, numpy.dtype[Any]][source]
Returns

the attacker’s observation

attacker_state() int[source]
Returns

the attacker state

defender_observation() numpy.ndarray[Any, numpy.dtype[Any]][source]
Returns

the defender’s observation

defender_state() int[source]
Returns

the defender state

static from_dict(d: Dict[str, Any]) gym_csle_intrusion_response_game.dao.intrusion_response_game_state_local.IntrusionResponseGameStateLocal[source]

Converts a dict representation of the DTO into an instance

Parameters

d – the dict to convert

Returns

the created instance

static from_json_file(json_file_path: str) gym_csle_intrusion_response_game.dao.intrusion_response_game_state_local.IntrusionResponseGameStateLocal[source]

Reads a json file and converts it to a DTO

Parameters

json_file_path – the json file path

Returns

the converted DTO

reset() None[source]

Resets the state

Returns

None

state_vector() Any[source]
Returns

the state vector

to_dict() Dict[str, Any][source]

Converts the object to a dict representation

Returns

a dict representation of the object

gym_csle_intrusion_response_game.dao.local_intrusion_response_game_config module

class gym_csle_intrusion_response_game.dao.local_intrusion_response_game_config.LocalIntrusionResponseGameConfig(env_name: str, T: numpy.ndarray[Any, numpy.dtype[Any]], O: numpy.ndarray[Any, numpy.dtype[numpy.int64]], Z: numpy.ndarray[Any, numpy.dtype[Any]], R: numpy.ndarray[Any, numpy.dtype[Any]], S: numpy.ndarray[Any, numpy.dtype[numpy.int64]], S_A: numpy.ndarray[Any, numpy.dtype[numpy.int64]], S_D: numpy.ndarray[Any, numpy.dtype[numpy.int64]], s_1_idx: int, zones: numpy.ndarray[Any, numpy.dtype[numpy.int64]], A1: numpy.ndarray[Any, numpy.dtype[numpy.int64]], A2: numpy.ndarray[Any, numpy.dtype[numpy.int64]], d_b1: numpy.ndarray[Any, numpy.dtype[numpy.float64]], a_b1: numpy.ndarray[Any, numpy.dtype[numpy.float64]], gamma: float, beta: float, C_D: numpy.ndarray[Any, numpy.dtype[Any]], eta: float, A_P: numpy.ndarray[Any, numpy.dtype[Any]], Z_D_P: numpy.ndarray[Any, numpy.dtype[Any]], Z_U: numpy.ndarray[Any, numpy.dtype[Any]])[source]

Bases: csle_base.json_serializable.JSONSerializable

DTO representing the configuration of the local intrusion response game

attacker_action_space() gymnasium.spaces.discrete.Discrete[source]
Returns

the attacker’s action space

attacker_observation_space() gymnasium.spaces.box.Box[source]
Returns

the attacker’s observation space

defender_action_space() gymnasium.spaces.discrete.Discrete[source]
Returns

the defender’s action space

defender_action_space_stopping() gymnasium.spaces.discrete.Discrete[source]
Returns

the defender’s action space in the stopping POMDP

defender_observation_space() gymnasium.spaces.box.Box[source]
Returns

the defender’s observation space

defender_observation_space_stopping() gymnasium.spaces.box.Box[source]
Returns

the defender’s observation space

static from_dict(d: Dict[str, Any]) gym_csle_intrusion_response_game.dao.local_intrusion_response_game_config.LocalIntrusionResponseGameConfig[source]

Converts a dict representation to an instance

Parameters

d – the dict to convert

Returns

the created instance

static from_json_file(json_file_path: str) gym_csle_intrusion_response_game.dao.local_intrusion_response_game_config.LocalIntrusionResponseGameConfig[source]

Reads a json file and converts it to a DTO

Parameters

json_file_path – the json file path

Returns

the converted DTO

to_dict() Dict[str, Any][source]

Converts the object to a dict representation

Returns

a dict representation of the object

gym_csle_intrusion_response_game.dao.workflow_intrusion_response_game_config module

class gym_csle_intrusion_response_game.dao.workflow_intrusion_response_game_config.WorkflowIntrusionResponseGameConfig(env_name: str, adjacency_matrix: numpy.ndarray[Any, numpy.dtype[Any]], nodes: numpy.ndarray[Any, numpy.dtype[numpy.int64]], initial_zones: numpy.ndarray[Any, numpy.dtype[numpy.int64]], X_max: int, beta: float, gamma: float, zones: numpy.ndarray[Any, numpy.dtype[numpy.int64]], Z_D_P: numpy.ndarray[Any, numpy.dtype[Any]], C_D: numpy.ndarray[Any, numpy.dtype[Any]], A_P: numpy.ndarray[Any, numpy.dtype[Any]], Z_U: numpy.ndarray[Any, numpy.dtype[Any]], eta: float, gw_reachable: numpy.ndarray[Any, numpy.dtype[numpy.int64]])[source]

Bases: csle_base.json_serializable.JSONSerializable

DTO representing the configuration of a workflow intrusion response game

attacker_action_space() gymnasium.spaces.multi_discrete.MultiDiscrete[source]
Returns

the attacker’s action space

attacker_observation_space() gymnasium.spaces.box.Box[source]
Returns

the attacker’s observation space

defender_action_space() gymnasium.spaces.multi_discrete.MultiDiscrete[source]
Returns

the defender’s action space

defender_observation_space() gymnasium.spaces.box.Box[source]
Returns

the defender’s observation space

static from_dict(d: Dict[str, Any]) gym_csle_intrusion_response_game.dao.workflow_intrusion_response_game_config.WorkflowIntrusionResponseGameConfig[source]

Converts a dict representation to an instance

Parameters

d – the dict to convert

Returns

the created instance

static from_json_file(json_file_path: str) gym_csle_intrusion_response_game.dao.workflow_intrusion_response_game_config.WorkflowIntrusionResponseGameConfig[source]

Reads a json file and converts it to a DTO

Parameters

json_file_path – the json file path

Returns

the converted DTO

to_dict() Dict[str, Any][source]

Converts the object to a dict representation

Returns

a dict representation of the object

gym_csle_intrusion_response_game.dao.workflow_intrusion_response_pomdp_attacker_config module

class gym_csle_intrusion_response_game.dao.workflow_intrusion_response_pomdp_attacker_config.WorkflowIntrusionResponsePOMDPAttackerConfig(env_name: str, game_config: gym_csle_intrusion_response_game.dao.workflow_intrusion_response_game_config.WorkflowIntrusionResponseGameConfig, defender_strategies: List[csle_common.dao.training.policy.Policy])[source]

Bases: csle_common.dao.simulation_config.simulation_env_input_config.SimulationEnvInputConfig

DTO representing the configuration of a workflow intrusion response POMDP when the attacker faces a static defender opponent

static from_dict(d: Dict[str, Any]) gym_csle_intrusion_response_game.dao.workflow_intrusion_response_pomdp_attacker_config.WorkflowIntrusionResponsePOMDPAttackerConfig[source]

Converts a dict representation to an instance

Parameters

d – the dict to convert

Returns

the created instance

static from_json_file(json_file_path: str) gym_csle_intrusion_response_game.dao.workflow_intrusion_response_pomdp_attacker_config.WorkflowIntrusionResponsePOMDPAttackerConfig[source]

Reads a json file and converts it to a DTO

Parameters

json_file_path – the json file path

Returns

the converted DTO

to_dict() Dict[str, Any][source]

Converts the object to a dict representation

Returns

a dict representation of the object

gym_csle_intrusion_response_game.dao.workflow_intrusion_response_pomdp_defender_config module

class gym_csle_intrusion_response_game.dao.workflow_intrusion_response_pomdp_defender_config.WorkflowIntrusionResponsePOMDPDefenderConfig(env_name: str, game_config: gym_csle_intrusion_response_game.dao.workflow_intrusion_response_game_config.WorkflowIntrusionResponseGameConfig, attacker_strategies: List[csle_common.dao.training.policy.Policy])[source]

Bases: csle_common.dao.simulation_config.simulation_env_input_config.SimulationEnvInputConfig

DTO representing the configuration of a workflow intrusion response POMDP when the defender faces a static defender opponent

static from_dict(d: Dict[str, Any]) gym_csle_intrusion_response_game.dao.workflow_intrusion_response_pomdp_defender_config.WorkflowIntrusionResponsePOMDPDefenderConfig[source]

Converts a dict representation to an instance

Parameters

d – the dict to convert

Returns

the created instance

static from_json_file(json_file_path: str) gym_csle_intrusion_response_game.dao.workflow_intrusion_response_pomdp_defender_config.WorkflowIntrusionResponsePOMDPDefenderConfig[source]

Reads a json file and converts it to a DTO

Parameters

json_file_path – the json file path

Returns

the converted DTO

to_dict() Dict[str, Any][source]

Converts the object to a dict representation

Returns

a dict representation of the object

Module contents