Farama-Foundation / HighwayEnv

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

Is muti-agent setting not available in Merge or Roundabout scenarios? #551

Open dl-m9 opened 10 months ago

dl-m9 commented 10 months ago

Dear author, thanks for your work. Today I wanted to test the multi-agent setting in Merge and Roundabout scenarios, but I found when I set controlled_vehicles: 2 in these two scenarios, the obs, _ = env.reset didn't return two observation of the controlled vehicles. Therefore, I want to ask if muti-agent setting is available in Merge or Roundabout scenarios, or just available in Highway and Intersection?

Thanks!

eleurent commented 10 months ago

Hi, yes you're right, the multi-agent mode has not been configured for merge and roundabour envs yet.

You can add this feature simply by editing _make_vehicles() method to decide where to spawn the controlled_vehicles (the current methods assume there is only one, and its initial position is fixed).

If you want to take a stab at it, feel free to open a PR :)