gym_csle_apt_game.dao package
Submodules
gym_csle_apt_game.dao.apt_game_attacker_mdp_config module
- class gym_csle_apt_game.dao.apt_game_attacker_mdp_config.AptGameAttackerMdpConfig(env_name: str, apt_game_config: AptGameConfig, defender_strategy: Policy, apt_game_name: str = 'csle-apt-game-v1')[source]
Bases:
SimulationEnvInputConfig
DTO class representing the configuration of the MDP environnment of the attacker when facing a static defender policy
- static from_dict(d: Dict[str, Any]) AptGameAttackerMdpConfig [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) AptGameAttackerMdpConfig [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO
gym_csle_apt_game.dao.apt_game_config module
- class gym_csle_apt_game.dao.apt_game_config.AptGameConfig(env_name: str, T: ndarray[Any, dtype[Any]], O: ndarray[Any, dtype[int64]], Z: ndarray[Any, dtype[Any]], C: ndarray[Any, dtype[Any]], S: ndarray[Any, dtype[int64]], A1: ndarray[Any, dtype[int64]], A2: ndarray[Any, dtype[int64]], b1: ndarray[Any, dtype[float64]], N: int, p_a: float, save_dir: str, checkpoint_traces_freq: int, gamma: float = 1)[source]
Bases:
SimulationEnvInputConfig
DTO class containing the configuration of the APT game
- static from_dict(d: Dict[str, Any]) AptGameConfig [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) AptGameConfig [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO
gym_csle_apt_game.dao.apt_game_defender_pomdp_config module
- class gym_csle_apt_game.dao.apt_game_defender_pomdp_config.AptGameDefenderPomdpConfig(env_name: str, apt_game_config: AptGameConfig, attacker_strategy: Policy, apt_game_name: str = 'csle-apt-game-v1')[source]
Bases:
SimulationEnvInputConfig
DTO class representing the configuration of the POMDP environnment of the defender when facing a static attacker policy
- static from_dict(d: Dict[str, Any]) AptGameDefenderPomdpConfig [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) AptGameDefenderPomdpConfig [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO
gym_csle_apt_game.dao.apt_game_state module
- class gym_csle_apt_game.dao.apt_game_state.AptGameState(b1: ndarray[Any, dtype[float64]])[source]
Bases:
JSONSerializable
Represents the state of the optimal APT game
- attacker_observation() Tuple[ndarray[Any, dtype[Any]], int] [source]
- Returns
the attacker’s observation
- static from_dict(d: Dict[str, Any]) AptGameState [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) AptGameState [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO