vwxyzjn / cleanrl

High-quality single file implementation of Deep Reinforcement Learning algorithms with research-friendly features (PPO, DQN, C51, DDPG, TD3, SAC, PPG)
http://docs.cleanrl.dev
Other
4.91k stars 566 forks source link

Is action masking supported in PPO? #402

Closed aqibsaeed closed 1 year ago

aqibsaeed commented 1 year ago

Hi, Thanks for the great work. Could you please let me know, if the current PPO implementation has action masking?

vwxyzjn commented 1 year ago

Kind of. Please use https://github.com/vwxyzjn/ppo-implementation-details/blob/main/ppo_multidiscrete_mask.py

I did not include it in CleanRL because I did not want to include the gym-microrts dependency.

aqibsaeed commented 1 year ago

Thanks alot!