HighwayEnv icon indicating copy to clipboard operation
HighwayEnv copied to clipboard

highway-v0 environment with high vehicle numbers and vehicle density

Open yubai111 opened this issue 3 years ago • 1 comments

thanks for your codes. it's really useful for me. But when i use your examles in google colab , i try to change the parmas about 'vehicle numbers and vehicle density'. the vehicles are always crashed , i don't know why . could you please help me? 32d579f5bf02bda8e33bdc31cd6695a

yubai111 avatar Apr 08 '21 12:04 yubai111

Mmmmh, right now the vehicle spawn mechanism is a bit simplistic, it ensures that the vehicles initially do not collide but their initial velocity are chosen randomly, which means that crashes may be unavoidable in some situations (if a fast vehicle is created very close to a slow one, it won't have the time to brake).

This only happens in dense traffic though, which probably require a more sophisticated initialization.

But simply initializing all vehicle speeds to a constant value, though unrealistic, should at least solve the issue.

eleurent avatar Apr 10 '21 11:04 eleurent