Deepracer 学了就能云驾驭赛车? Deepracer机器学习进阶版干货分享!

Posted 架构师易筋

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Deepracer 学了就能云驾驭赛车? Deepracer机器学习进阶版干货分享!相关的知识,希望对你有一定的参考价值。





https://github.com/zgpeace/deepracer/tree/master/iterations



















get faster reward
https://github.com/scottpletcher/deepracer/blob/master/iterations/v3-GetFast.md

def reward_function(params):

    center_variance = params["distance_from_center"] / params["track_width"]

    left_lane = [13,14,15,16,17,18,19,20,21,22,23,24,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67]
    right_lane = [30,31,32,33,34,35,36,37]
    center_lane = [0,1,2,3,4,5,6,7,8,9,10,11,12,25,26,27,28,29,38,39,68,69]

    reward = 0
    
    if params["all_wheels_on_track"]:
        if params["closest_waypoints"][1] in left_lane and params["is_left_of_center"]:
            reward = 10
        elif params["closest_waypoints"][1] in right_lane and not params["is_left_of_center"]:
            reward = 10
        elif params["closest_waypoints"][1] in center_lane and center_variance < 0.3:
            reward = 10
        else:
            reward = 0.01
    else:
        reward = 0.01
        
    reward *= params["speed"]**2

    return float(reward)

最佳路径 for 2018
https://github.com/zgpeace/deepracer-k1999-race-lines/blob/master/racelines/reinvent_base-400-4-2019-10-11-161903.py

array([[2.88738855, 0.72646774],
       [3.16759122, 0.70478649],
       [3.45517317, 0.69217863],
       [3.75325158, 0.68581005],
       [4.07281434, 0.68360819],
       [4.50000223, 0.68376092],
       [4.54999507, 0.68377879],
       [5.11738115, 0.69080411],
       [5.44798256, 0.7112322 ],
       [5.71126558, 0.7422347 ],
       [5.94137211, 0.78496462],
       [6.1491271 , 0.84078035],
       [6.33675893, 0.91066736],
       [6.50351669, 0.99483994],
       [6.64762588, 1.09336367],
       [6.76714849, 1.20640158],
       [6.85790417, 1.33508669],
       [6.92193762, 1.47646609],
       [6.96026824, 1.62797346],
       [6.96689958, 1.7888072 ],
       [6.92976742, 1.95515434],
       [6.85379617, 2.11910271],
       [6.72693273, 2.26841633],
       [6.56582731, 2.3979065 ],
       [6.38075512, 2.50632652],
       [6.18037171, 2.5960265 ],
       [5.97126499, 2.67207187],
       [5.75829177, 2.74110301],
       [5.55841177, 2.81013238],
       [5.36004947, 2.88360578],
       [5.16333131, 2.96218803],
       [4.96844903, 3.04682634],
       [4.77552032, 3.13832543],
       [4.5846244 , 3.2374528 ],
       [4.39562481, 3.34419701],
       [4.20825035, 3.45789343],
       [4.02216522, 3.57740375],
       [3.83712807, 3.70184192],
       [3.68186141, 3.80970389],
       [3.52529227, 3.91179837],
       [3.36674073, 4.00606413],
       [3.20532486, 4.09041474],
       [3.0401252 , 4.16335643],
       [2.87024421, 4.22393077],
       [2.69486335, 4.27162279],
       [2.51319321, 4.30602365],
       [2.32452568, 4.32672382],
       [2.12696309, 4.33080298],
       [1.91810508, 4.31381212],
       [1.69471913, 4.26740868],
       [1.45416273, 4.17400849],
       [1.21119005, 4.00653223],
       [1.01922953, 3.74402202],
       [0.92220549, 3.42050544],
       [0.88926604, 3.10443889],
       [0.89600747, 2.82076036],
       [0.92404943, 2.56281185],
       [0.96605253, 2.32460305],
       [1.01802833, 2.11228544],
       [1.08079017, 1.91512981],
       [1.15513698, 1.73107571],
       [1.24162317, 1.56014807],
       [1.34112998, 1.40323884],
       [1.45472589, 1.2610932 ],
       [1.58653095, 1.13641183],
       [1.74472608, 1.03228688],
       [1.92655529, 0.94305481],
       [2.13282228, 0.86779425],
       [2.36411252, 0.80679887],
       [2.61751276, 0.75992145],
       [2.88738855, 0.72646774]])

比较全面的函数
https://github.com/zgpeace/Capstone_AWS_DeepRacer/blob/master/Reward_Function/reward_function.py


参考

https://www.bilibili.com/video/BV1BV411s7BH

https://www.bilibili.com/video/BV1BV411s7BH?p=2&spm_id_from=pageDriver

以上是关于Deepracer 学了就能云驾驭赛车? Deepracer机器学习进阶版干货分享!的主要内容,如果未能解决你的问题,请参考以下文章

DeepRacer 根据路线计算Action Space RaceLine_Speed_ActionSpace

函数式编程 | 学了就能分配女朋友?

AWS DeepRacer ROS 架构 模拟环境和真实赛道的区别

载着 AI 梦想向前奔跑!2022 Amazon DeepRacer 自动驾驶联赛未完待续!

翻译:使用 AWS Deep Racer 的日志分析工具

【学了就忘】Git操作 — 56.忽略文件补充