-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathbase.py
More file actions
34 lines (26 loc) · 916 Bytes
/
base.py
File metadata and controls
34 lines (26 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
'''
@author: <Name> // <username>
@Link: https://github.com/<username>/<repo>
@License: <LICENSE If any>
'''
def reward_function(params):
# Read input parameters ##############################
all_wheels_on_track = params["all_wheels_on_track"]
x = params["x"]
y = params["y"]
distance_from_center = params["distance_from_center"]
is_left_of_center = params["is_left_of_center"]
heading = params["heading"]
progress = params["progress"]
steps = params["steps"]
speed = params["speed"]
streering_angle = params["streering_angle"]
track_width = params["track_width"]
waypoints = params["waypoints"]
closest_waypoints = params["closest_waypoints"]
# Constants #########################################
REWARD_MIN = -1e5
REWARD_MAX = 1e5
# Logic #########################################
reward = 0
return float(reward)