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: LocalIntrusionResponseGameConfig, defender_strategy: Policy, attacker_strategy: Policy = None)[source]

Bases: 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]) 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) 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: LocalIntrusionResponseGameConfig, attacker_strategy: Policy, defender_strategy: Policy = None)[source]

Bases: 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]) 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) 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: ndarray[Any, dtype[float64]], a_b1: ndarray[Any, dtype[float64]], s_1_idx: int, S: ndarray[Any, dtype[Any]], S_A: ndarray[Any, dtype[Any]], S_D: ndarray[Any, dtype[Any]])[source]

Bases: JSONSerializable

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

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

the attacker’s observation

attacker_state() int[source]
Returns

the attacker state

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

the defender’s observation

defender_state() int[source]
Returns

the defender state

static from_dict(d: Dict[str, Any]) 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) 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: ndarray[Any, dtype[Any]], O: ndarray[Any, dtype[int64]], Z: ndarray[Any, dtype[Any]], R: ndarray[Any, dtype[Any]], S: ndarray[Any, dtype[int64]], S_A: ndarray[Any, dtype[int64]], S_D: ndarray[Any, dtype[int64]], s_1_idx: int, zones: ndarray[Any, dtype[int64]], A1: ndarray[Any, dtype[int64]], A2: ndarray[Any, dtype[int64]], d_b1: ndarray[Any, dtype[float64]], a_b1: ndarray[Any, dtype[float64]], gamma: float, beta: float, C_D: ndarray[Any, dtype[Any]], eta: float, A_P: ndarray[Any, dtype[Any]], Z_D_P: ndarray[Any, dtype[Any]], Z_U: ndarray[Any, dtype[Any]])[source]

Bases: JSONSerializable

DTO representing the configuration of the local intrusion response game

attacker_action_space() Discrete[source]
Returns

the attacker’s action space

attacker_observation_space() Box[source]
Returns

the attacker’s observation space

defender_action_space() Discrete[source]
Returns

the defender’s action space

defender_action_space_stopping() Discrete[source]
Returns

the defender’s action space in the stopping POMDP

defender_observation_space() Box[source]
Returns

the defender’s observation space

defender_observation_space_stopping() Box[source]
Returns

the defender’s observation space

static from_dict(d: Dict[str, Any]) 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) 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: ndarray[Any, dtype[Any]], nodes: ndarray[Any, dtype[int64]], initial_zones: ndarray[Any, dtype[int64]], X_max: int, beta: float, gamma: float, zones: ndarray[Any, dtype[int64]], Z_D_P: ndarray[Any, dtype[Any]], C_D: ndarray[Any, dtype[Any]], A_P: ndarray[Any, dtype[Any]], Z_U: ndarray[Any, dtype[Any]], eta: float, gw_reachable: ndarray[Any, dtype[int64]])[source]

Bases: JSONSerializable

DTO representing the configuration of a workflow intrusion response game

attacker_action_space() MultiDiscrete[source]
Returns

the attacker’s action space

attacker_observation_space() Box[source]
Returns

the attacker’s observation space

defender_action_space() MultiDiscrete[source]
Returns

the defender’s action space

defender_observation_space() Box[source]
Returns

the defender’s observation space

static from_dict(d: Dict[str, Any]) 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) 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: WorkflowIntrusionResponseGameConfig, defender_strategies: List[Policy])[source]

Bases: 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]) 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) 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: WorkflowIntrusionResponseGameConfig, attacker_strategies: List[Policy])[source]

Bases: 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]) 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) 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