scottpletcher / deepracer Goto Github PK
View Code? Open in Web Editor NEWAWS DeepRacer Experimentation
License: MIT License
AWS DeepRacer Experimentation
License: MIT License
I am trying a version of self motivator and not getting good results.
Could you share the action space and hyperparameters that you used?
The params dictionary object contains the following key-value pairs:
{
"all_wheels_on_track": Boolean, # flag to indicate if the agent is on the track
"x": float, # agent's x-coordinate in meters
"y": float, # agent's y-coordinate in meters
"closest_objects": [int, int], # zero-based indices of the two closest objects to the agent's current position of (x, y).
"closest_waypoints": [int, int], # indices of the two nearest waypoints.
"distance_from_center": float, # distance in meters from the track center
"is_crashed": Boolean, # Boolean flag to indicate whether the agent has crashed.
"is_left_of_center": Boolean, # Flag to indicate if the agent is on the left side to the track center or not.
"is_offtrack": Boolean, # Boolean flag to indicate whether the agent has gone off track.
"is_reversed": Boolean, # flag to indicate if the agent is driving clockwise (True) or counter clockwise (False).
"heading": float, # agent's yaw in degrees
"objects_distance": [float, ], # list of the objects' distances in meters between 0 and track_length in relation to the starting line.
"objects_heading": [float, ], # list of the objects' headings in degrees between -180 and 180.
"objects_left_of_center": [Boolean, ], # list of Boolean flags indicating whether elements' objects are left of the center (True) or not (False).
"objects_location": [(float, float),], # list of object locations [(x,y), ...].
"objects_speed": [float, ], # list of the objects' speeds in meters per second.
"progress": float, # percentage of track completed
"speed": float, # agent's speed in meters per second (m/s)
"steering_angle": float, # agent's steering angle in degrees
"steps": int, # number steps completed
"track_length": float, # track length in meters.
"track_width": float, # width of the track
"waypoints": [(float, float), ] # list of (x,y) as milestones along the track center
}
Soo,
Can you help me for this "Iteration 1 - PurePursuit" car_orientation is not available so what can we do ther ?
and error at closest_waypoints
Here is my Code :
import math
def reward_function(params):
# self = params['self']
# steps = params['steps']
# on_track = params['on_track']
# progress = params['progress']
# throttle = params['throttle']
# steering = params['steering']
# track_width = params['track_width']
# distance_from_center = params['distance_from_center']
x = params['x']
y = params['y']
waypoints = params['waypoints']
heading = params['heading']
closest_waypoints = params['closest_waypoints']
reward = 1e-3
rabbit = [0, 0]
pointing = [0, 0]
rabbit = [waypoints[closest_waypoints+1]
[0], waypoints[closest_waypoints+1][1]]
radius = math.hypot(x - rabbit[0], y - rabbit[1])
pointing[0] = x + (radius * math.cos(heading))
pointing[1] = y + (radius * math.sin(heading))
vector_delta = math.hypot(pointing[0] - rabbit[0], pointing[1] - rabbit[1])
if vector_delta == 0:
reward += 1
else:
reward += (1 - (vector_delta / (radius * 2)))
return reward
I'm change heading instead of car_orientation .
But there still NOT Working any more.
Upon rewriting "PurePursuit" for the current Reward function's Code editor, I'm getting these errors:
can only concatenate list (not "int") to list
rabbit = [waypoints[closest_waypoints+1][0], waypoints[closest_waypoints+1][1]]
name 'math' is not defined
radius = math.hypot(x - rabbit[0], y - rabbit[1])
pointing[0] = x + (radius * math.cos(heading))
pointing[1] = y + (radius * math.sin(heading))
vector_delta = math.hypot(pointing[0] - rabbit[0], pointing[1] - rabbit[1])
Is this the latest conversion for the declaration of rabbit
?
rabbit = [waypoints[closest_waypoints[1]][0],waypoints[closest_waypoints[1]][1]]
or rabbit = [waypoints[closest_waypoints[0]][0],waypoints[closest_waypoints[0]][0]]
And also how can we use math
if it's not defined on the current AWS DeepRacer model's code editor?
Congrats to the first place in the Chicago Event!
I have tried out your SelfMotivator code before and have just seen that you won Chicago!
Well done. I guess you were able to create an even better model.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.