flow icon indicating copy to clipboard operation
flow copied to clipboard

bump the high of traffic light grid po env

Open eugenevinitsky opened this issue 5 years ago • 8 comments

Change the observation space to handle the fact that values go slightly outside of it.

eugenevinitsky avatar Nov 18 '19 18:11 eugenevinitsky

Pull Request Test Coverage Report for Build 5012

  • 12 of 12 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.356%

Totals Coverage Status
Change from base Build 5003: 0.0%
Covered Lines: 8666
Relevant Lines: 9591

💛 - Coveralls

coveralls avatar Nov 19 '19 19:11 coveralls

Once that's fixed, LGTM!

kjang96 avatar Nov 22 '19 02:11 kjang96

Actually I'm curious, what happens when there is no leader, so a vehicle's headway automatically returns min(1000, env.network.scenario_length..)? Your code doesn't actually change this logic, so I'm wondering about how this ever worked. Wouldn't you frequently have a leaderless vehicle returning a really high value?

kjang96 avatar Nov 22 '19 02:11 kjang96

Also caught one more spot that requires changing, in the update function in vehicle/traci.py around line 222 : self.__vehicles[veh_id]["headway"] = 1e+3 self.__vehicles[veh_id]["follower_headway"] = 1e+3

kjang96 avatar Nov 22 '19 02:11 kjang96

Oh I missed these reviews! These are all good; thank you!

eugenevinitsky avatar Nov 25 '19 02:11 eugenevinitsky

Actually I'm curious, what happens when there is no leader, so a vehicle's headway automatically returns min(1000, env.network.scenario_length..)? Your code doesn't actually change this logic, so I'm wondering about how this ever worked. Wouldn't you frequently have a leaderless vehicle returning a really high value?

This is actually intentional. We want there to be a default high value indicating that there's no vehicle in front

eugenevinitsky avatar Nov 25 '19 02:11 eugenevinitsky

Actually I'm curious, what happens when there is no leader, so a vehicle's headway automatically returns min(1000, env.network.scenario_length..)? Your code doesn't actually change this logic, so I'm wondering about how this ever worked. Wouldn't you frequently have a leaderless vehicle returning a really high value?

This is actually intentional. We want there to be a default high value indicating that there's no vehicle in front

Ah I see! So a def has_leader(veh_id) function could ostensibly look like if tailway(veh_id) > [some_high_value]: return False ? If it's a developer responsibility to modify their code such that they should be treating ultra-high returns of get_tailway or get_headway as "no leader" or "no tailway" maybe we should advertise that more. But maybe we do? I'm not sure

kjang96 avatar Nov 25 '19 03:11 kjang96

works like a charm

pengyuan-zhou avatar Aug 06 '20 21:08 pengyuan-zhou