From 10b8bcaf029e138f56d50cfd0223c6d5383a476a Mon Sep 17 00:00:00 2001 From: ohwi Date: Sat, 6 Jul 2019 16:42:31 +0900 Subject: [PATCH] Bug fix code --- scripts/algorithms/td3/agent.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/algorithms/td3/agent.py b/scripts/algorithms/td3/agent.py index 7d53fec..6915b30 100644 --- a/scripts/algorithms/td3/agent.py +++ b/scripts/algorithms/td3/agent.py @@ -250,6 +250,10 @@ class Agent(AbstractAgent): action = self.select_action(state) next_state, reward, done = self.step(action) + ## DEBUG + if i_episode % 100 == 0: + print("[OBSERV] :{}".format(["{:.05f}".format(x) for x in next_state])) + if len(self.memory) >= self.hyper_params["BATCH_SIZE"]: experiences = self.memory.sample() loss = self.update_model(experiences)