thomashirtz / gym-hybrid

Collection of OpenAI parametrized action-space environments.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shape of action space

ddharshan opened this issue · comments

Hi,
I am trying to define interval in between continuous action space as self.action_space = Tuple((Discrete(2), Box(-10, 10, (2,)))), in this parameterized action space. could u please tell me how to define in your gym- environment?

parameters_min = np.array([0, -1])
parameters_max = np.array([1, +1])

    self.action_space = spaces.Tuple((spaces.Discrete(3),
                                      spaces.Box(parameters_min, parameters_max))) 

I defined as

self.action_space = spaces.Tuple((spaces.Discrete(3),spaces.Box(parameters_min, parameters_max, shape=(0.1, 0.1))))

but got the error as low shape doesn’t match provided shape

Duplicate from openai/gym#3135
Solution in the thread