, 나는 다음과 같이 적용과 :TSPTW 유전자 알고리즘 내가 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, ..)
나는 또한 사이클 크로스 오버로 테스트했습니다 및 정렬 크로스 오버
내가 알고 싶은 것은, 나의 발길은 맞습니까? 어떻게 인구 크기와 돌연변이 확률을 정확하게 지정할 수 있습니까?
귀하의 돌연변이가 잘못되었습니다. 돌연변이는 최악의 경우가 아니라 모든 어린이에게 일어날 수 있습니다 (마지막 단계에 대한 나의 독서가 정확하다면). 이것은 아마도 문제의 원인이 아니므로 대답이 아닙니다. – NWS
나는 이미 개체군에 더 좋은 아이들을 추가했다. 그래서 돌연변이가 개체군에 대해 이루어 졌을 때, 그것은 또한 더 좋은 아이들을 포함한다. – Yasmin
당신의 단계를 다시 살펴보면, 교차하는 방법과 새로운 개체군을 생성하는 방법에 대해 혼란스러워지고 있다고 생각된다. 읽었습니까 : http://en.wikipedia.org/wiki/Genetic_algorithm 및 기사 http://en.wikipedia.org/wiki/Selection_%28genetic_algorithm%29 & http://en.wikipedia.org/wiki/ Crossover_ % 28genetic_algorithm % 29? – NWS