Update normalized_actions.py

This commit is contained in:
Pranjal Tandon
2019-02-20 14:44:44 +05:30
committed by GitHub
parent f9a716b292
commit f8b7fe9968
+1 -1
View File
@@ -3,7 +3,7 @@ import gym
class NormalizedActions(gym.ActionWrapper):
def _action(self, action):
def action(self, action):
action = (action + 1) / 2 # [-1, 1] => [0, 1]
action *= (self.action_space.high - self.action_space.low)
action += self.action_space.low