From 89e5f1369ede186f878d9976d557d01ccc0add83 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Mon, 17 Oct 2022 23:00:01 +0200 Subject: [PATCH] Made Value-Func Rendering way more efficient --- columbus/env.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/columbus/env.py b/columbus/env.py index dc4b17d..637a963 100644 --- a/columbus/env.py +++ b/columbus/env.py @@ -316,7 +316,7 @@ class ColumbusEnv(gym.Env): self.agent.pos = agentpos self.agent.speed = agentspeed - V = value_func(th.Tensor(obs)) + V = value_func(th.Tensor(np.array(obs))) V /= max(V.max(), -1*V.min())*2 V += 0.5 @@ -408,6 +408,8 @@ class ColumbusEnv(gym.Env): self.draw_confidence_ellipse = not self.draw_confidence_ellipse elif keys[pygame.K_r]: self.reset() + elif keys[pygame.K_t]: + self._reset_paths() elif keys[pygame.K_p]: self.paused = not self.paused else: