CityBrainChallenge / KDDCup2021-CityBrainChallenge-starter-kit

77 stars 40 forks source link

`_get_reward()` method in `CBEngine.py` may be wrong #38

Open fstqwq opened 3 years ago

fstqwq commented 3 years ago

Since the shortest lane length is 30.0, and the minimum travel time calculated by length/speed_limit is 1.62s, it is possible that between 10 seconds a vehicle drives through a short lane. However, _get_reward() method only check the difference between two snapshots. It may be very inaccurate in the earlier stages.

zhyliu00 commented 3 years ago

Thanks for your comment.

  1. You can design your own reward function by using the "info" from env.step(), which is a trajectory for vehicles every 10 seconds.
  2. For the granularity of 10 seconds, you can modify it in "report_log_rate" in simulator.cfg. But it will slow down the simulator.