1、 I 题目:题目:遗传算法求解旅行商问题的计算机仿真遗传算法求解旅行商问题的计算机仿真 II 遗传遗传算法求解算法求解 TSP 问题问题的计算机仿真的计算机仿真 摘要摘要 由于遗传算法在整体搜索策略和优化搜索方法上不依赖梯度信息或其他辅助知识,只 需要影响搜索方向的目标函数和相应的适应度函数,所以提供了一种求解复杂系统问题的 通用框架,因此遗传算法广泛应用于数学问题、组合优化、机械设计、人工智能等领域。 遗传算法(Genetic Algorithms,简称 GA)是模拟自然界生物自然选择和进化的机制 而发展起来的一种高度并行、自适应的随机搜索算法。特别适合于求解传统的搜索算法不 好处理的复杂的
2、最优解问题。旅行商问题(Traveling Salesman Problem)就是要决定一 条经过路线中所有城市当且仅当一次且距离最短的路线,即距离最短的 Hamilton 回路。 旅行商问题是一个具有十分广泛的实用背景和重要理论价值的组合优化问题。目前求解 TSP 问题的主要方法有模拟退火算法、 遗传算法、 Hopfield 神经网络算法、 启发式搜索法、 二叉树描述算法。 本文选用遗传算法求解45个城市的TSP问题, 基于Microsoft Visual C+ 环境,采用 Grefenstette 等提出的一种新的巡回路线编码方法,变异算子采用了常规的基 本位变异法,通过多组实验和数据近似
3、的求解出了 45 个城市的最优解,实现了计算机仿 真求解 TSP 问题。 关键字:旅行商关键字:旅行商问题问题;遗传算法遗传算法;变异变异算法;编码算法;编码方式方式 III The computer simulation of genetic algorithm to solve TSP problem Abstract Due to genetic algorithm on the overall search strategy and optimization search method does not depend on the gradient information or oth
4、er auxiliary knowledge, only need to influence the search direction of the objective function and the corresponding fitness function, and so provides a generic framework for solving complicated system problem, so the genetic algorithm is widely used in mathematical problem, combinatorial optimizatio
5、n, mechanical design, artificial intelligence, etc Genetic algorithm (based Algorithms, the GA) is mimic natural biological natural selection and evolution mechanism and developed a kind of highly parallel, adaptive random search algorithm. Particularly suitable for solving the traditional search al
6、gorithm is not good to deal with complex optimal solution of problem. Traveling Salesman Problem (ll Salesman Problem) is to determine a through route if and only if all cities in time and distance is the shortest route, the shortest distance of Hamilton loop. Traveling salesman problem is a very wide range of practical background and important theoretical value of the combinatorial optimization problem. At present the main method of solving TSP problem with simulated annealing algorith