This commit is contained in:
johnjim0816
2021-12-22 11:19:13 +08:00
parent c257313d5b
commit 75df999258
55 changed files with 605 additions and 403 deletions

View File

@@ -68,7 +68,7 @@
" self.result_path = curr_path+\"/results/\" +self.env+'/'+curr_time+'/results/' # path to save results\n",
" self.model_path = curr_path+\"/results/\" +self.env+'/'+curr_time+'/models/' # path to save models\n",
" self.train_eps = 200 # max training episodes\n",
" self.eval_eps = 50\n",
" self.test_eps = 50\n",
" self.batch_size = 5\n",
" self.gamma=0.99\n",
" self.n_epochs = 4\n",
@@ -144,7 +144,7 @@
" print(f'Env:{cfg.env}, Algorithm:{cfg.algo}, Device:{cfg.device}')\n",
" rewards= []\n",
" ma_rewards = [] # moving average rewards\n",
" for i_ep in range(cfg.eval_eps):\n",
" for i_ep in range(cfg.test_eps):\n",
" state = env.reset()\n",
" done = False\n",
" ep_reward = 0\n",