HighwayEnv
HighwayEnv copied to clipboard
highway-v0 environment with high vehicle numbers and vehicle density
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?
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.