Skip to content
Snippets Groups Projects
Commit d086e47b authored by mkoenig's avatar mkoenig
Browse files

mod clipping

parent 72a2932c
No related branches found
No related tags found
No related merge requests found
......@@ -86,7 +86,7 @@ class RLPolicyController(BasePolicyController):
action = self.agent.get_action(obs)
self.speed.value = alpha * self.speed.value + (1 - alpha) * np.clip(
action[0], -0.2, 0.7
action[0], -1.0, 1.0
)
self.steer.value = np.clip(action[1] * 1.3, -1.0, 1.0)
......@@ -147,7 +147,7 @@ class AttentionPolicyController(BasePolicyController):
obs = self.cam.get_frame()
action = self.agent.get_output(obs)
self.speed.value = self.speed.value * alpha + (1 - alpha) * np.clip(
action[0], -0.6, 0.7
action[0], -1.0, 1.0
)
self.steer.value = np.clip(action[1] * 1.0, -1.0, 1.0)
print("speed action:", action[0])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment