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),通过训练集由 ...
随机推荐
- springmvc配置不拦截静态资源
<mvc:resources mapping="/js/**" location="/js/"/>
- 关系数据库标准语言 SQL (ch.3)
3.1 SQL 概述 3.1.2 特点 1 综合统一 非关系型语言 的数据语言都分为 DDL Scheme Data Definitin Language, 模式DDL SubScheme Data ...
- js对象属性方法大总结
数组(Array):系列元素的有序集合: 详细演示请看:[js入门系列演示·数组 ] http://www.cnblogs.com/thcjp/archive/2006/08/04/467761.ht ...
- TSP
#include <iostream> #include <limits.h> #include <string.h>; using namespace std; ...
- arcgis访问百度地图
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- less知识点总结(二)
变量:以@开头,由于变量只能定义一次,其本质就是“常量”. @nice-blue: #5B83AD; @light-blue: @nice-blue + #; #header { color: @li ...
- Codeforces 414A
题目链接 首先考虑无解的情况: n / 2 > k 或者 n==1 且 k != 0 (因为两个数的最大公约数最小为1) 然后因为有 n / 2 组(把 a[i] 和 a[i+1] 看成一组), ...
- Significance A and B for protein ratios
实验设计中,一般会做三个生物学重复来确保结果的准确性,尤其在下游分析中.但有时会遇到没有生物学重复,而又需要进行差异分析的情况,这时一般建议考虑foldchange即可,因为根本无法进行T-test等 ...
- 【51NOD1028】大数乘法 V2
╰( ̄▽ ̄)╭ 给出2个大整数A,B,计算A*B的结果. (A,B的长度 <= 100000,A,B >= 0) (⊙ ▽ ⊙) 把大整数A看做一个次数界为lenA的多项式A(x),其中x ...
- python判断输入日期是该年的第几天
1.输入日期,判断日期是该年度的第几天 iyear = int(input("请输入年:\n")) imonth = int(input("请输入月:\n")) ...