yaochenkun / TSP-genetic-algorithm

An implementation of TSP by Genetic Algorithm in Java.采用遗传算法解决TSP旅行商问题的Java版程序。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TSP-GeneticAlgorithm

An implementation of TSP(Traveling Salesman Problem) by Genetic Algorithm in Java.

Details

  • Solve TSP in Java.
  • Adopt Object-Oriented.
  • Divide into 4 Classes: GeneticAlgorithm, SpeciesNode, SpeciesList and Constant.
  • Verify respectively in 3 different size of cities: 10 cities, 20 cities and 31 cities.

Classes

  • GeneticAlgorithm: controls the whole algorithm's life cycle and do some genetic operation including select, cross, mutate.
  • SpeciesNode: contains the sequence of gene, the length of route and fitness of this species.
  • SpeciesList: represents a list(group) of species(SpeciesNode)
  • Constant: contains the data of map, the max length of every group of species, the max number of generations, the probability of cross, mutate and so on.

For More

If you want to learn more information about this implementation, please visit the following three sites(but a pity only in Chinese):

About

An implementation of TSP by Genetic Algorithm in Java.采用遗传算法解决TSP旅行商问题的Java版程序。


Languages

Language:Java 100.0%