Farama-Foundation / HighwayEnv

A minimalist environment for decision-making in autonomous driving
https://highway-env.farama.org/
MIT License
2.59k stars 741 forks source link

Hybrid action space #556

Open striving19 opened 8 months ago

striving19 commented 8 months ago

Hi! Is it possible to add a hybrid action space to highwayenv like Parameterized DQN?

eleurent commented 8 months ago

It is possible to add one, but it would have to be added to action.py so you can specify what the parts of the action space (space() method) are and how they affect the environment dynamics (act(action) method).

For inspiration, you can take a look at the MultiAgentAction which kind of a hybrid space made of a tuple of several subspaces (here it's assumed to be the same atomic space repeated for each agent, but you can change that)

https://github.com/Farama-Foundation/HighwayEnv/blob/17059b8b7da6ba49e9cfbf1a1715f50ac4d8e8d3/highway_env/envs/common/action.py#L301