机器学习_第03讲-1-2-2-PSO.ppt

在找到这两个最优值时,粒子根据如下的公式来更新自己的速度和新的位置:   v[] = w * v[] + c1 * rand() * (pbest[] - present[]) + c2 * rand() * (gbest[] - present[]) (a)   present[] = persent[] + v[] (b)   v[] 是粒子的速度, w是惯性权重,persent[] 是当前粒子的位置. pbest[] and gbest[] 如前定义 rand () 是介于(0, 1)之间的随机数. c1, c2 是学习因子. 通常 c1 = c2 = 2.   程序的伪代码如下    For each particle   ____Initialize particle END Do   ____For each particle   ________Calculate fitness value   ________If the fitness value is better than the best fitness value (pBest) in history   ____________set current value as the new pBest   ____End   ____ Choose the p

文档评论(0)

1亿VIP精品文档

相关文档