/go-tsp

Travelling salesman problem solved with Genetic Algorithm using Go

Primary LanguageGoMIT LicenseMIT

go-tsp

Travelling salesman problem solved with Genetic Algorithm using Go.

How to run

The program can be ran 2 ways

  1. go run main.go
    or
  2. go build : an executable file is generated
    ie: go-tsp.exe. Run the file.

Results

The program will create a folder called tsp(*can be defined in program), which stores the results based on the seed number provided. The results are images(.png) of the tours that outperform their predecessors.
ie: ./tsp/[seed number]/[images....png]

Sample Results:
Alt text

Documentation

The program can be tweaked by modifying the global variables in

  • main.go
  • geneticAlgorithm/geneticAlgBase.go

Resources