behavior planning——11 create a cost function speed penalty
A key part of getting transitions to happen when we want them to is the design of reasonable cost functions.
we want to penalize and reward the right things. I am going to work through an example of one way you might think about
designing a cost function. let is consider how we would design a cost function for vehicle speed. on one hand ,we want to
get to our destination quickly, but on the other hand, we do not want to break the law. an essential quantity we have to control is the desired velocity of the car.
some velocities are more beneficial,some are even illegal.let is fill in this graph and try to assign some costs to every velocity.
for the sake of simplicity, let is assume that all of the cost functions will have an output between zero and one.
We will adjust the importance of each cost function later by adjusting the weithts.
let is say the speed limit for the road we are on is here, well ,we know that if we ate going well above the speed limit, that should be maximum cost.
and maybe we want to set an ideal zero cost speed thst is slightly below the speed limit so that we have some buffer.
and then we can think about how much we want to penalize not moving at all.obviously ,not moving is bad. but maybe not as bad as breaking the speed limit, so we would put it here.
to keep it simple, we could just say there is a linear cost between zero and the target speed.

and since breaking the law is a binary thing, let is just say any speed greater than or equal the speed limit has maximal cost. And again, we can arbitrarily connect these points with a linear funcion and the flat maximum cost for anything above
the speed limit. now ,in practice ,we might actually want to parametrize some of these quantities so that we could later adjust them until we got the right behavior.
so first, we might define a parameter called stop cost for the zero-velocity case and a parameter called buffer velocity which would probably be a few miles per hour.
then, out overall cost function has three domains. If we are going less than the target speed, the cost function would look like this.

if we are above the speed limit, the cost is just one.And if we are between the cost would look like this .

behavior planning——11 create a cost function speed penalty的更多相关文章
- behavior planning——14.implement a cost function in C++
n most situations, a single cost function will not be sufficient to produce complex vehicle behavior ...
- behavior planning——13. implement a cost function in C++
In the previous quizzes, you designed a cost function to choose a lane when trying to reach a goal i ...
- behavior planning——15.cost function design weightTweaking
Designing cost functions is difficult and getting them all to cooperate to produce reasionable vehic ...
- machine learning(11) -- classification: advanced optimization 去求cost function最小值的方法
其它的比gradient descent快, 在某些场合得到广泛应用的求cost function的最小值的方法 when have a large machine learning problem, ...
- behavior planning——12.example cost funtion -lane change penalty
In the image above, the blue self driving car (bottom left) is trying to get to the goal (gold sta ...
- logistic回归具体解释(二):损失函数(cost function)具体解释
有监督学习 机器学习分为有监督学习,无监督学习,半监督学习.强化学习.对于逻辑回归来说,就是一种典型的有监督学习. 既然是有监督学习,训练集自然能够用例如以下方式表述: {(x1,y1),(x2,y2 ...
- Linear regression with one variable - Cost function intuition I
摘要: 本文是吴恩达 (Andrew Ng)老师<机器学习>课程,第二章<单变量线性回归>中第8课时<代价函数的直观认识 - 1>的视频原文字幕.为本人在视频学习过 ...
- behavior planning——10 behaior planning pseudocode
One way to implement a transition function is by generating rough trajectories for each accessible & ...
- loss function与cost function
实际上,代价函数(cost function)和损失函数(loss function 亦称为 error function)是同义的.它们都是事先定义一个假设函数(hypothesis),通过训练集由 ...
随机推荐
- JSP内置对象解析
out对象:(PrintWriter类的实例) 用来向客户端输出信息,除了输出各种信息外还负责对缓冲区进行管理: 主要方法: print / println void 输出数据 newLine() v ...
- 2019.9.18 csp-s模拟测试46 反思总结
神志不清: 回去休息(x)继续考试(√) 非常爆炸的一次考试.看错题码完T1回去再看发现自己过于幼稚,T2读完题看着16mb的空间秒出正解然后逻辑出现致命失误100pts->0pts,T3看了一 ...
- hive语句on和where一点小问题
hive join 后面必须=(0.13版本后支持,不支持like,<>),on后面如需加条件语句必须放到where中不然会产生错误结果 (可以一对多,一对一,不可以多对多‘会出现数据翻倍 ...
- linux查看现在在运行的进程 $ pstree -a$ ps aux
这都是查看现有进程的. ps aux 的结果比较杂乱 pstree -a 的结果比较简单明了,可以看到正在运行的进程及相关用户.
- Leetcode61. Rotate List旋转链表
给定一个链表,旋转链表,将链表每个节点向右移动 k 个位置,其中 k 是非负数. 示例 1: 输入: 1->2->3->4->5->NULL, k = 2 输出: 4-& ...
- RSA 2019安全大会:企业资产管理成行业新风向标,云上安全占优势
美国时间3月4-8日,国际知名信息安全峰会RSA Conference在美国旧金山开幕,云安全及云可以为企业提供更可靠的资产管理方式成为大会热点. 此次峰会共吸引全球700多家机构参展,其中近42%为 ...
- farv
http://weishu.me/ https://github.com/jimupon/VirtualXposed O: ? api 26 - vdex N: speed-profile M: ...
- HDU 1690 最短路
#include<stdio.h> #include<string.h> #include<queue> #include<algorithm> usi ...
- jquery购物评分
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- Kafka 集群安装
Kafka 集群安装 环境: Linux 7.X kafka_2.x 在linux操作系统中,kafka安装在 /u04/app目录中 1. 下载 # wget https://mirrors.cnn ...