Skip to content
/ ecga-tsp Public

Evolutionary Computation Group Assignment: The Traveling Salesperson Problem - Implementation

Notifications You must be signed in to change notification settings

hlmu/ecga-tsp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ecga-tsp

Evolutionary Computation Group Assignment: The Traveling Salesperson Problem - Implementation

Parser.py

Parse data in the data/ directory. Given the filename of a tsp file, return a dictionary containing the data given in the file.

TSPProblem.py

Write a class TSPProblem which represents the TSP problem. Your class should enable the construction of TSP problems from the files of the symmetric traveling salesperson problem of the TSPlib, which is available online:

Individual.py

Represent a possible solution to the TSP as a permutation of the given cities and implement it in a class Individual. Evolutionary algorithms often start with solutions that are constructed uniformly at random. Write a method that constructs such a solution in linear time – not in O(n log n) or even O(n2), but in O(n), where n is the number of cities.

Population.py

A population in an evolutionary algorithms represents a set of solutions. Implement a class Population for representing a population which is a set of individuals. Make sure that you can evaluate the quality of a solution with respect to a given problem.

config.py

Configuration file, including population size.

About

Evolutionary Computation Group Assignment: The Traveling Salesperson Problem - Implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages