问题
I want to setup an RL agent on the OpenAI CarRacing-v0
environment, but before that I want to understand the action space. In the code on github line 119 says:
self.action_space = spaces.Box( np.array([-1,0,0]), np.array([+1,+1,+1])) # steer, gas, brake
How do I read this line? Although my problem is concrete wrt CarRacing-v0
I would like to understand the spaces.Box()
notation in general
回答1:
Box
means that you are dealing with real valued quantities.
The first array np.array([-1,0,0]
are the lowest accepted values, and the second np.array([+1,+1,+1])
are the highest accepted values. In this case (using the comment) we see that we have 3 available actions:
- Steering: Real valued in
[-1, 1]
- Gas: Real valued in
[0, 1]
- Brake: Real valued in
[0, 1]
来源:https://stackoverflow.com/questions/44404281/openai-gym-understanding-action-space-notation-spaces-box