intelligent_traffic_lights
intelligent_traffic_lights copied to clipboard
What is Reward?
Hello. First of all, thank you for your public source. I have a question. I wonder what Reward means in this model. Usually, the queue is Reward for other models, but I think this model is different. What does Reward mean?
Hello. First of all, thank you for your public source. I have a question. I wonder what Reward means in this model. Usually, the queue is Reward for other models, but I think this model is different. What does Reward mean?
Hello. This is reward function
def _get_reward(self):
if self.time < 4:
return 0
self.r_w = 0.85 * self.waiting_time_float_av[-2] - self.waiting_time_float_av[-1]
# if self.r_w < 0:
# self.r_w *= 1.5
#
# self.r_av.append(self.r_w)
return self.r_w