Skip to content

🧬Implement genetic algorithm to resolve the TSP Problem.

License

Notifications You must be signed in to change notification settings

Cattle0Horse/Homework-Algorithm-TSPLIB95

Repository files navigation

Homework-Algorithm-TSPLIB95

This project aims to replicate and implement several classic algorithms for solving the traveling salesman problem, including:

  • Greedy Nearest Neighbor Algorithm
  • Christofides-Serdyukov Algorithm
  • Simulated Annealing Algorithm
  • Genetic Algorithm

I am planning to submit this project as my homework for the "Evolutionary Computation" course at WUST.

Getting Started

Prerequisites

pip install -r requirements.txt

Running the tests

An example is as follows:

problem = Problem('a280', verbose=True, vis=False)

solver = SimulatedAnnealing(
    t=1000, eps=1e-14, alpha=0.98, time_out=1,
    early_stop=problem.dimension, verbose=True)

solver.solve(problem)
print(problem.best_seen.length)

Informative Material

About

🧬Implement genetic algorithm to resolve the TSP Problem.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages