utiasDSL / gym-pybullet-drones

PyBullet Gymnasium environments for single and multi-agent reinforcement learning of quadcopter control
https://utiasDSL.github.io/gym-pybullet-drones/
MIT License
1.15k stars 337 forks source link

Discrete action space implementation based on BaseRLAviary #204

Open Konjak2e8 opened 2 months ago

Konjak2e8 commented 2 months ago

I'm trying to customize a multi-drone RL environment with a discrete action space - specifically, drones can only fly in some certain directions in a fixed velocity - and I failed to find the way to define a discrete action space, nor can I find an example in the doc on branch master. Is there any solution to build a discrete action space based on BaseRLAviary?

JacopoPan commented 2 months ago

Hi @Konjak2e8

for your use case, I would build on top of VelocityAviary, where the input is a 4 dimensional vector (a reference direction + a reference magnitude speed) and look into Farama's docs to replace the Box (n-array/tensor) input for a Discrete one https://gymnasium.farama.org/api/spaces/