baselines icon indicating copy to clipboard operation
baselines copied to clipboard

How to define multi-dimensional action_space for deepq

Open kaihuchen opened this issue 9 years ago • 3 comments

I am trying to use the deepq model for training a simulated car in an Unreal environment. My initial goal is to get the car to learn to drive around the given environment autonomously for as long as possible at good speed while avoiding any obstacles. I want to define three possible controls for deepq: throttle, brake, and steering. However, I found that deepq expects an n attribute for its self.action_space variable, which means that I am unable to use multi-discrete or Box for defining self.action_space, which means that I am allowed to define only one control.

My question here is: is there anyway for me to define more than one control for deepq?

kaihuchen avatar Oct 08 '17 18:10 kaihuchen

Same issue here. Can not pass Box element to action space for my environment.

Azael05x avatar Oct 09 '17 14:10 Azael05x

In its simplest form, Q-learning only works for discrete action spaces. There are some ways to adapt Q-learning to continuous action spaces, but those are currently not implemented in this repository. You are likely to have better results with PPO.

unixpickle avatar Dec 16 '17 00:12 unixpickle

As a side note: it is often possible to turn your action space into a discrete list of options. For example, if you have a tuple of three discrete action spaces, you could use a cartesian product to turn this into a single discrete action space.

unixpickle avatar Dec 16 '17 00:12 unixpickle