You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.
# Agent wants to perform no action:elifaction==None:
iflight=='green'andinputs['oncoming'] !='left': # No oncoming trafficviolation=1# Minor violation# (...)# Did the agent attempt a valid move?ifviolation==0:
ifaction==agent.get_next_waypoint(): # Was it the correct action?reward+=2-penalty# (2, 1)elifaction==Noneandlight!='green': # Was the agent stuck at a red light?reward+=2-penalty# (2, 1)else: # Valid but incorrectreward+=1-penalty# (1, 0)
This doesn't cover the case where the agent wants to turn left and there is oncoming traffic forward or right. The optimal policy would be to take no action (None), but None, right or forward would result in the same reward being applied: Valid but incorrect case.
The solution would be to expand:
# Agent wants to perform no action:elifaction==None:
iflight=='green'and (inputs['oncoming'] !='left'orwaypoint!='left'): # No oncoming trafficviolation=1# Minor violation
to:
elifaction==Noneandlight!='green'reward+=2-penalty# (2, 1)elifaction==Noneandlight=='green'andinputs['oncoming'] in ['forward', 'right']:
reward+=2-penalty# (2, 1)
While working on this project I detected a small flaw in the reward system.
File environment.py lines 328-341
This doesn't cover the case where the agent wants to turn left and there is oncoming traffic forward or right. The optimal policy would be to take no action (
None
), butNone
,right
orforward
would result in the same reward being applied: Valid but incorrect case.The solution would be to expand:
to:
and expand:
to:
The text was updated successfully, but these errors were encountered: