Skip to content

This Project Solves the Traveling Sales Person Problem using genetic algorithm with chromosomes decoded as cycles (solutions) of traveling Order 1 crossover, Swap mutation, complete generation replacement, Roulette Wheel Technique for choosing and negative of cycle distance for fitness.

License

Notifications You must be signed in to change notification settings

AminFadaee/Traveling_Salesman_Genetic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traveling Salesman Genetic

This Project Solves the Traveling Sales Person Problem using genetic algorithm with the following properties:

  • Chromosomes decoded as cycles (solutions) of traveling
  • Order 1 crossover
  • Swap mutation
  • Complete generation replacement
  • Roulette Wheel Technique for choosing parents
  • Negative of cycle distance as fitness

Documentation

The code is documented using Google Style Docstring but for a detailed documentation read the documentation.md

Requirements

  • Python Version 3+
  • numpy
  • matplotlib

Running:

Run the project by running TSPG.py

Here is the results for input1.txt :

some

and input2.txt :

some

Both runs use the following parameters:

  • n = 20
  • k = 100
  • max_generation = 1000
  • crossover_probability = 0.99
  • mutation_probability = 0.01

License

The MIT License. Copyright (c) 2017 Amin Fadaee

About Author

Amin Fadaee

About

This Project Solves the Traveling Sales Person Problem using genetic algorithm with chromosomes decoded as cycles (solutions) of traveling Order 1 crossover, Swap mutation, complete generation replacement, Roulette Wheel Technique for choosing and negative of cycle distance for fitness.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages