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. python基础--文件相关操作

    文件操作方式的补充: “+”表示的是可以同时读写某个文件 r+:可读可写 w+:可读可写 a+:可读可写 x:只写模式[不可读:不存在则创建,存在则报错] x+:可读可写 文件内的光标移动: 1.re ...

  2. ifconfig配置IP地址和子网掩码

    ifconfig eth0 192.168.2.10 ifconfig eth0 192.168.2.10 netmask 255.255.255.0

  3. linux一些配置的记录

    ssh 登录设置主机的别名 这样不用写那么多东西了 在/etc/ssh/ 下的ssh_config 和 sshd_config 两个文件 前一个是配置客户端的配置文件 另一个是服务器端的配置文件 主要 ...

  4. day18 9.转账汇款案例(1)

  5. 依赖注入的方式(DI)

    方式: 接口注入: setter方法注入: 构造方法注入: 接口注入: public class ClassA { private InterfaceB clzB; public void doSom ...

  6. 下载并安装Cent OS 6.5

    到官网下载centos 6.5指引 官网:https://www.centos.org/     [当然也可以通过百度搜索,然后打开] 进入官网,选择"Get CentOS Now" ...

  7. 【python之路18】内置函数,补充请看【python之路46】

    1.abs(number)表示某个数字的绝对值 print(abs(-123)) #打印出123 2.all(iterable) 表示可迭代的参数全部为True那么返回True,否则返回False r ...

  8. Java static 关键字学习

    static:意为静态的,简单理解就是公共的.独立于实例变量之外的1.概述:static是Java中常用的关键字,一般用于变量.方法.静态代码块.内部类上.静态导包2.用法: a.用于变量上表示该变量 ...

  9. 什么? 1XIN = 21BTC

    什么? 1XIN = 21BTC 最初看到这个标题,我还回去考证一下. 原来是 Mixin Network 的宣传广告. BTC 是多少? 2100万枚. XIN 是 100 万枚. 所以才有了 1X ...

  10. phpcms推送文章同时推送自定义字段

    首先进入phpcms后台,模型管理-字段管理里,新建字段,新建字段必须是主表字段,如图所示 2 来到网站根目录,寻找phpcms\modules\content\classes\push_api.cl ...