metadriverse / metadrive

MetaDrive: Open-source driving simulator
https://metadriverse.github.io/metadrive/
Apache License 2.0
746 stars 107 forks source link

Can different action policies assign to different vehicles? #725

Open ZheruiHuang opened 4 months ago

ZheruiHuang commented 4 months ago

Is there a way to assign different action policies to different vehicles in a scenario? For example, can the ego car use the PPOExpertPolicy while other cars use replay/IDM? Can you provide a simple example?

QuanyiLi commented 3 months ago

Yes, of course. This step usually happens in the Manager where vehicles are spawned and policies are created and associated with vehicles. And each step the manager will query the policy to give an action to the vehicle. Thus, it is feasible to have arbitrary policy/vehicle mappings. An example is at here: https://metadrive-simulator.readthedocs.io/en/latest/system_design.html#example

Jus try adding more vehicles and assign different policies to them