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

Concatenate operation for Spaces #4

Open
ryanjulian opened this issue Jun 11, 2018 · 1 comment
Open

Concatenate operation for Spaces #4

ryanjulian opened this issue Jun 11, 2018 · 1 comment

Comments

@ryanjulian
Copy link
Member

This is a common use case which leads to a lot of unnecessary munging.

e.g.

    def observation_space(self):
        task_ub, task_lb = self.task_space.bounds
        env_ub, env_lb = super(OneHotMultiTaskEnv,
                               self).observation_space.bounds
        return spaces.Box(
            np.concatenate([task_ub, env_ub]),
            np.concatenate([task_lb, env_lb]))

Could just be

    def observation_space(self):
        task = self.task_space
        obs = super(OneHotMultiTaskEnv,
                               self).observation_space
        return spaces.Box.concatenate(task, obs)

This will require some thought about how non-alike spaces interact, and should provide a feature for concatenating members of these spaces easily and consistent with this spec, once a space is described as a concatenation of other spaces.

Imported from ryanjulian/rllab#2

@ryanjulian
Copy link
Member Author

I'll let @krzentner decide if this is a worthy part of akro.

@ryanjulian ryanjulian transferred this issue from rlworkgroup/garage Dec 4, 2018
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