From 055713606d8a5ed498039c042ed0bc1651e5d8b6 Mon Sep 17 00:00:00 2001 From: Yann Bouteiller Date: Wed, 15 May 2024 16:17:38 -0400 Subject: [PATCH] Updated competition script --- tmrl/tuto/competition/competition_eval.py | 2 +- tmrl/tuto/competition/custom_actor_module.py | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tmrl/tuto/competition/competition_eval.py b/tmrl/tuto/competition/competition_eval.py index c08cbcb..35ec701 100644 --- a/tmrl/tuto/competition/competition_eval.py +++ b/tmrl/tuto/competition/competition_eval.py @@ -34,4 +34,4 @@ device=device_worker, obs_preprocessor=obs_preprocessor, standalone=True) - rw.run() + rw.run_episodes() diff --git a/tmrl/tuto/competition/custom_actor_module.py b/tmrl/tuto/competition/custom_actor_module.py index 710182d..f9b5271 100644 --- a/tmrl/tuto/competition/custom_actor_module.py +++ b/tmrl/tuto/competition/custom_actor_module.py @@ -43,6 +43,8 @@ "PORT": , If you are training over the Internet, please read the security instructions on the TMRL GitHub page. + +IMPORTANT: Set a custom 'RUN_NAME' in config.json, otherwise this script will not work. """ # Let us start our tutorial by importing some useful stuff. @@ -795,11 +797,11 @@ def train(self, batch): training_agent_cls = partial(SACTrainingAgent, model_cls=VanillaCNNActorCritic, - gamma=0.99, + gamma=0.995, polyak=0.995, - alpha=0.02, - lr_actor=0.000005, - lr_critic=0.00003) + alpha=0.01, + lr_actor=0.00001, + lr_critic=0.00005) # ===================================================================== @@ -870,7 +872,7 @@ def train(self, batch): max_samples_per_episode=max_samples_per_episode, obs_preprocessor=obs_preprocessor, standalone=args.test) - rw.run() + rw.run(test_episode_interval=10) elif args.server: import time serv = Server(port=server_port,