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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. behavior planning——15.cost function design weightTweaking

    Designing cost functions is difficult and getting them all to cooperate to produce reasionable vehic ...

  4. machine learning(11) -- classification: advanced optimization 去求cost function最小值的方法

    其它的比gradient descent快, 在某些场合得到广泛应用的求cost function的最小值的方法 when have a large machine learning problem, ...

  5. 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 ...

  6. logistic回归具体解释(二):损失函数(cost function)具体解释

    有监督学习 机器学习分为有监督学习,无监督学习,半监督学习.强化学习.对于逻辑回归来说,就是一种典型的有监督学习. 既然是有监督学习,训练集自然能够用例如以下方式表述: {(x1,y1),(x2,y2 ...

  7. Linear regression with one variable - Cost function intuition I

    摘要: 本文是吴恩达 (Andrew Ng)老师<机器学习>课程,第二章<单变量线性回归>中第8课时<代价函数的直观认识 - 1>的视频原文字幕.为本人在视频学习过 ...

  8. behavior planning——10 behaior planning pseudocode

    One way to implement a transition function is by generating rough trajectories for each accessible & ...

  9. loss function与cost function

    实际上,代价函数(cost function)和损失函数(loss function 亦称为 error function)是同义的.它们都是事先定义一个假设函数(hypothesis),通过训练集由 ...

随机推荐

  1. 从0开始学习 GitHub 系列之「04.向GitHub 提交代码」

    之前的这篇文章「从0开始学习 GitHub 系列之「Git速成」」相信大家都已经对 Git 的基本操作熟悉了,但是这篇文章只介绍了对本地 Git 仓库的基本操作,今天我就来介绍下如何跟远程仓库一起协作 ...

  2. Kryo官方文档-中文翻译

    Kryo作为一个优秀的Java序列化方案,在网上能找到不少测评,但未见系统的中文入门或说明文档.官方文档是最好的学习文档.虽然英文不差,但啃下来毕竟没母语来的舒服.这里抽出时间做些翻译,以方便大家查阅 ...

  3. 项目ITP(七) javaWeb 整合 Quartz 实现动态调度 而且 持久化

    版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/u010378410/article/details/36255511 项目ITP(七) javaWe ...

  4. vue-waterfall2 基于Vue.js 瀑布流组件

    vue-waterfall2 1.宽度自适应,数据绑定特效(适用于上拉加载更多) 2.自定义程度高 3.使用极为简便,适用于PC/移动端 4.提供resize(强制刷新布局-适用于下拉刷新)/mix( ...

  5. Python PEP8标准

    1.编码 如无特殊情况,文件一律使用utf-8编码 如无特殊情况,文件头部必须添加# -*- coding:utf-8 -*- 标志 2.代码 统一使用四个空格缩进 每行代码不超过80个字符 自然语言 ...

  6. PHP-xdebug+PHPStorm的debug安装(未完)

    PHP的xdebug安装 一.首先去phpinfo()查看自己的php是32还是64位的,再根据php版本在下面的网站https://xdebug.org/download.php选择xdebug插件 ...

  7. request.getcontextPath() 详解 和 <link标签>

    classpath:只会到你的class路径中查找找文件; classpath*:不仅包含class路径,还包括jar文件中(class路径)进行查找. 绝对路径: D:\磊弟资料\最代码\智父子考试 ...

  8. mysql通过日志恢复数据库

    案例:http://www.linuxidc.com/Linux/2012-11/74005.htm http://blog.csdn.net/ssrc0604hx/article/details/1 ...

  9. thinkphp5.0中英文切换

    首先来看下它的配置: // 是否开启多语言 'lang_switch_on' => true, //语音列表 'lang_list' => ['zh-cn','en-us'], // 获取 ...

  10. 2019-11-1-asp-dotnet-core-简单开发P2P中央服务器

    title author date CreateTime categories asp dotnet core 简单开发P2P中央服务器 lindexi 2019-11-01 19:40:33 +08 ...