Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TTC related reward in function: "_on_highway_reward" #3

Open
lilin96 opened this issue Mar 19, 2024 · 0 comments
Open

TTC related reward in function: "_on_highway_reward" #3

lilin96 opened this issue Mar 19, 2024 · 0 comments

Comments

@lilin96
Copy link

lilin96 commented Mar 19, 2024

if ttc != c_util.INFINITY and ttc < self.TTC_threshold:
if action == "accelerate":
r_lc = 1.2
reward += 1.2
elif action == "change_left" and tr_util.change_lane_chance(vehicleID=agent, change_direction=1):
r_lc = 0.6
reward += 0.6

     if action == "change_right" and tr_util.change_lane_chance(vehicleID=agent, change_direction=-1):
        r_lc = 0.3
         reward += 0.3
     else:
        r_lc = -1
        cost += 1

what is the meaning of these code? why there exists a front vehicle in current lane, if the controlled vehicle accelerate and then the reward increase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant