文件名称:include
介绍说明--下载内容来自于网络,使用问题请自行百度
用遗传算法解根号2,求根号2,也就是求方程f(x)=x*x-2=0的正整数解,x=1时f(1)<0,x=2时f(2)>0,由介值定理,则1到2中间存在一个根,根据代数基本定理和根的对称性知这就是我们要找的根(废话,初中生都知道是1.414左右),由目标函数得到适应度函数,我们选择个体都在[1,2]之间,那适应度函数我可以取
j(x)=40/(2+|x*x-2|)-10,由x的取值范围知j的范围是(0,10)
x和y交叉就用取平均(x+y)/2,交叉概率取0.9,变异概率为0,-Using genetic algorithm for solving square root of 2, Roots, No. 2, that is, of equation f (x) = x* x-2 = 0 the positive integer solution, x = 1 Shi f (1) < 0, x = 2 Shi f (2) " 0, by the intermediate value theorem, then there is a 1-2 middle of the root, according to the fundamental theorem of algebra and the symmetry of the root to know that is what we are looking for the root (nonsense, junior high school students all know that 1.414 or so), from the target function to fitness function, we have chosen to individuals are in [1,2] between the fitness function that I can take j (x) = 40/(2+ | x* x-2 |)-10, from the x' s j known range of the range is (0,10) x and y cross on the use of taking the average (x+ y)/2, taking 0.9 crossover probability, mutation probability of 0,
j(x)=40/(2+|x*x-2|)-10,由x的取值范围知j的范围是(0,10)
x和y交叉就用取平均(x+y)/2,交叉概率取0.9,变异概率为0,-Using genetic algorithm for solving square root of 2, Roots, No. 2, that is, of equation f (x) = x* x-2 = 0 the positive integer solution, x = 1 Shi f (1) < 0, x = 2 Shi f (2) " 0, by the intermediate value theorem, then there is a 1-2 middle of the root, according to the fundamental theorem of algebra and the symmetry of the root to know that is what we are looking for the root (nonsense, junior high school students all know that 1.414 or so), from the target function to fitness function, we have chosen to individuals are in [1,2] between the fitness function that I can take j (x) = 40/(2+ | x* x-2 |)-10, from the x' s j known range of the range is (0,10) x and y cross on the use of taking the average (x+ y)/2, taking 0.9 crossover probability, mutation probability of 0,
相关搜索: 基本 遗传算法
(系统自动生成,下载前可以参看下载内容)
下载文件列表
include.doc
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
