- 博客(1)
- 资源 (1)
- 收藏
- 关注
原创 python实现的遗传算法实例(一)
def b2d(b): #将二进制转化为十进制 x∈[0,10] t = 0 for j in range(len(b)): t += b[j] * (math.pow(2, j)) t = t * 10 / 1023 return tpopsize = 50 #种群的大小#用遗传算法求函数最大值:#f(x)=10*sin(5x)+7*cos(4x) x∈[0
2014-04-12 16:34:36 37894 23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人