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),通过训练集由 ...
随机推荐
- 为GitLab配置邮件服务
修改配置文件:/etc/gitlab/gitlab.rb ####################################################################### ...
- 【react】react-bookManager
作者可能是本意想要做一个图书管理系统,不过添加书籍的时候报错,所以简单的页面我们简单的看看 先上github地址:https://github.com/hesisi/react-bookManager ...
- TP5中隐藏入口文件的问题 - CSDN博客
使用phpstudy和linux部署的时候 tp5中的官方说明是在入口文件的同级目录下添加一个.htaccess文件 文件内容如下: <IfModule mod_rewrite.c>Opt ...
- 【二次元的CSS】—— 用 DIV + CSS3 画咸蛋超人(详解步骤)
[二次元的CSS]—— 用 DIV + CSS3 画咸蛋超人(详解步骤) 2016-05-17 HTML5cn 仅仅使用div作为身体的布局,用css3的各种transform和圆角属性来绘制各部位的 ...
- C++ operator new和new operator的区别
new operator 当你写这种代码: string *ps = new string("Memory Management"); 你使用的new是new operator. ...
- webpack学习之—— Configuration(配置)
你可能已经注意到,很少有 webpack 配置看起来很完全相同.这是因为 webpack 的配置文件,是导出一个对象的 JavaScript 文件.此对象,由 webpack 根据对象定义的属性进行解 ...
- selenium 常见问题之 nknown error: call function result missing ‘value’
运行时候出现错误提示如下: 出现该问题原因:chrome浏览器自动升级.导致和chromedriver支持的版本不匹配. 解决方案有两种(本人采用的是第一种方式解决办法.): 1.下载和当前使用的ch ...
- Mac 下终端命令行之基本命令总结(持续更新)
最近用Mac做一些开发,用到了一些命令行的内容,先将常用的命令行进行总结.由于会不断的用到新的,所以将会持续的总结进来.每一个命令行的使用可能都会比较复杂,我只会总结最常用的使用方法. echo命令 ...
- PHP数据加密和解密
encrypt.php <?php /** * Passport 加密函数 * * @param string 等待加密的原字串 * @param string 私有密匙(用于解密和加密) * ...
- Leetcode709.To Lower Case转换成小写字母
实现函数 ToLowerCase(),该函数接收一个字符串参数 str,并将该字符串中的大写字母转换成小写字母,之后返回新的字符串. 示例 1: 输入: "Hello" 输出: & ...