Skip to content

Bug with FilteredEnv #10

Description

@wulfebw

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].

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions