我正在使用遗传算法实现81个城市的TSPTW(带时间窗口的旅行推销员问题),我采用了以下步骤:
mutation prob=0.03
population size=100
-Generate random population according to the value of population size intialized
-Sort the generated population
-Looping for populations and determine two parents by roulette selection, apply crossover on the parents, get child and add it to children list
-I am saving the best solution over the algorithm
-Sort the Children, replace worst tour in populations with best one of children
until no good children is existing is better than worst solution in populations
-loop (1 to population size)in all populations and Apply mutation of each worst solution with solution i , if the mutated solution is better than the worst solution of children. I insert it in populations in its place according to its fitness function and remove the worst one.
我找不到一个好的结果,我运行了很长时间,但有时会出现卡住的情况,无法得到更好的结果。 我改变了参数(种群大小=20000,1000,100,变异概率=0.03、0.02等),并尝试了循环交叉和顺序交叉。 我想知道,我的步骤是否正确?如何正确指定种群大小和变异概率?