为满足游戏地图中最短路径搜索求解, 提出了一种优化的自适应遗传算法。该算法采用与游戏地图中节点数和弧段数相关联的节点复杂度算子, 结合种群的整体情况和进化潜力来设定自适应遗传算法的交叉率和变异率。实验表明, 该算法避免了搜索结果陷入局部最优解, 确保最短路径的搜索成功率及提高搜索速度, 在游戏引擎设计中具有一定的实用价值。
In order to meet the shortest-path searching in game map, this paper presented an optimized adaptive genetic algorithm. It used the environment operator which was associated with the number of nodes and arcs of the graph to set the crossover probability and the mutation probability considering the whole population distribution and evolutionary potential. Experiments show that the algorithm can avoid falling into local optimal solutions, ensure the search success rate, and improve the search speed. It provides some valuable work in game engine designing.