#2472: integrating jupyter notebooks into documentation

This commit is contained in:
Czar Echavez
2024-05-09 13:43:55 +01:00
parent d02b7744ae
commit 81c523dc67
8 changed files with 94 additions and 12 deletions

View File

@@ -50,7 +50,7 @@
" cfg = yaml.safe_load(f)\n",
" make_cfg_have_flat_obs(cfg)\n",
"\n",
"env = PrimaiteGymEnv(game_config = cfg)\n",
"env = PrimaiteGymEnv(env_config = cfg)\n",
"obs, info = env.reset()\n",
"print('env created successfully')"
]
@@ -232,7 +232,7 @@
" if agent['ref'] == \"data_manipulation_attacker\":\n",
" agent['agent_settings'] = change\n",
"\n",
"env = PrimaiteGymEnv(game_config = cfg)\n",
"env = PrimaiteGymEnv(env_config = cfg)\n",
"env.reset()\n",
"for step in range(100):\n",
" step_num = env.game.step_counter\n",
@@ -261,7 +261,7 @@
"with open(data_manipulation_config_path(), 'r') as f:\n",
" cfg = yaml.safe_load(f)\n",
"\n",
"env = PrimaiteGymEnv(game_config = cfg)\n",
"env = PrimaiteGymEnv(env_config = cfg)\n",
"env.reset()\n",
"for ep in range(12):\n",
" env.reset()\n",
@@ -307,7 +307,7 @@
" if agent['ref'] == \"data_manipulation_attacker\":\n",
" agent.update(change)\n",
"\n",
"env = PrimaiteGymEnv(game_config = cfg)\n",
"env = PrimaiteGymEnv(env_config = cfg)\n",
"env.reset()\n",
"for ep in range(12):\n",
" env.reset()\n",
@@ -365,7 +365,7 @@
" if node['hostname'] in ['client_1', 'client_2']:\n",
" node['applications'] = change['applications']\n",
"\n",
"env = PrimaiteGymEnv(game_config = cfg)\n",
"env = PrimaiteGymEnv(env_config = cfg)\n",
"env.reset()\n",
"for ep in range(5):\n",
" env.reset()\n",
@@ -410,7 +410,7 @@
" if node['hostname'] in ['client_1', 'client_2']:\n",
" node['applications'] = change['applications']\n",
"\n",
"env = PrimaiteGymEnv(game_config = cfg)\n",
"env = PrimaiteGymEnv(env_config = cfg)\n",
"env.reset()\n",
"for ep in range(5):\n",
" env.reset()\n",