Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with FilteredEnv #10

Open
wulfebw opened this issue Dec 15, 2017 · 0 comments
Open

Bug with FilteredEnv #10

wulfebw opened this issue Dec 15, 2017 · 0 comments

Comments

@wulfebw
Copy link

wulfebw commented Dec 15, 2017

The filtering is incorrectly clipping the action values to between [-1,1].

Line 70 of FilteredEnv:

ac_f = np.clip(self.filter_action(action),self.action_space.low,self.action_space.high)

self.action_space.low and self.action_space.high are arrays with value -1 and 1:

self.action_space = gym.spaces.Box(-np.ones_like(acsp.high),np.ones_like(acsp.high))

self.filter_action(action) correctly converts to the range of the environment (e.g., in a 1D case) from [-1,1] to [lower bound, upper bound], but then it clips the value to be between [-1,1], when it should really clip it to be between [lower bound, upper bound].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant