遗传算法介绍(内含实例)[2]

[入库:2005年8月19日] [更新:2007年3月24日]

本文简介:选择自 waterflier 的 blog

          matingpool.parents[i].father = matingpool.randompop();
        }

     //交叉后创建新的集团
     population.clean();
     foreach parent in matingpool.parents
     {
          //注意在copy 双亲的染色体时在某个基因座上发生的变异未表现.
          child1 = parent.mother.divheader + parent.father.divend;
          child2 = parent.father.divheader + parent.mother.divend;
          population.push(child1);
          population.push(child2);
     }

小结:
遗传算法中最重要的过程就是选择和交叉。
选择要能够合理的反映"适者生存"的自然法则,而交叉必须将由利的基因尽量遗传给下一代(这个算法很关键!)

本文关键:遗传算法介绍(内含实例)
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top