Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Limmen committed Aug 18, 2023
1 parent 9168128 commit 085d131
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import csle_agents.constants.constants as agents_constants

if __name__ == '__main__':
emulation_env_config = MetastoreFacade.get_emulation_by_name("csle-level9-003")
emulation_env_config = MetastoreFacade.get_emulation_by_name("csle-level9-002")
simulation_env_config = MetastoreFacade.get_simulation_by_name("csle-stopping-mdp-attacker-002")
experiment_config = ExperimentConfig(
output_dir=f"{constants.LOGGING.DEFAULT_LOG_DIR}ppo_test",
Expand Down Expand Up @@ -71,7 +71,10 @@
value=500, name=agents_constants.COMMON.MAX_ENV_STEPS,
descr="maximum number of steps in the environment (for envs with infinite horizon generally)"),
agents_constants.COMMON.L: HParam(value=3, name=agents_constants.COMMON.L,
descr="the number of stop actions")
descr="the number of stop actions"),
agents_constants.COMMON.RUNNING_AVERAGE: HParam(
value=100, name=agents_constants.COMMON.RUNNING_AVERAGE,
descr="the number of samples to include when computing the running avg")
},
player_type=PlayerType.ATTACKER, player_idx=1
)
Expand All @@ -80,7 +83,7 @@
player_type=PlayerType.DEFENDER, stage_policy_tensor=None)

agent = PPOAgent(emulation_env_config=emulation_env_config, simulation_env_config=simulation_env_config,
experiment_config=experiment_config)
experiment_config=experiment_config, save_to_metastore=False)
experiment_execution = agent.train()
MetastoreFacade.save_experiment_execution(experiment_execution)
for policy in experiment_execution.result.policies.values():
Expand Down

0 comments on commit 085d131

Please sign in to comment.