LucasAlegre / sumo-rl

Reinforcement Learning environments for Traffic Signal Control with SUMO. Compatible with Gymnasium, PettingZoo, and popular RL libraries.
https://lucasalegre.github.io/sumo-rl
MIT License
734 stars 198 forks source link

Issue with ql_4x4grid #15

Closed simsimiSION closed 4 years ago

simsimiSION commented 4 years ago

Hi. When I test your experiment, I get something problem. When I running the code with this environment, I get

return self.radix_encode([phase, elapsed] + density_queue)
  File "/home/simsimi/桌面/sumo-rl-master/sumo_rl/environment/env.py", line 286, in radix_encode
    res = res * self.radix_factors[i] + values[i]
IndexError: list index out of range

Could you help me to solve this problem? Thanks.

LucasAlegre commented 4 years ago

Hi,

I solved this problems in my last commit: fb5c57b0664b8bf5d5673d84acb4dcc9c7a947e7

Cheers, Lucas