70 likes | 189 Vues
Explore the shortest closed circuit visiting all locations using an NP-Hard Genetic Algorithm in Java, presented by Jakob Haug Oftebro, Ulrik Sagen, and Eirik Aasved Holst. Learn the sequential and parallel GA pseudocode for efficient population evolution.
E N D
Travelling Salesperson ProblemA Java mpj-expressapproach By Jakob Haug Oftebro, Ulrik Sagen and Eirik Aasved Holst
The problem • What is theshortestclosedcircuitthatvisits all locations? • O(n!) • NP-Hard
Genetic algorithm PSEUDOCODE FOR SEQUENTIAL GA: Generate initial population while(not finished){ evaluatefitness evolvepopulation }
IN PARALLEL PSEUDOCODE FOR PARALLEL GA: while(outerloop){ //onrootprocessor mixPopulation() for(innerloop){ //oneachprocessor evaluatefitness evolvesubPopulation } }
PARALLELISM • Population = n • subPopulation = n/#processors