Skip to content
Using a SOM (self-organizing map / kohonen map) to solve the traveling salesman problem, implemented in Ruby.
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
base
docs
input initial commit
som
.gitignore
README.md
ann.rb
settings.rb

README.md

RubySOM

Implementation of a Self-Organizing Map (SOM) for aproximating a solution to the Traveling Salesman Problem. Written as part of a series of exercises in the course IT3708 Subsymbolic Methods in AI at NTNU.

The problem dataset is specified in TSPLIB format as text files under /input, and new datasets must be added to settings.rb before use. Output is generated as a series of graphs depicting the state of the SOM in each iteration.

Run as

ruby ann.rb <task>

where <task> is one of those specified in settings.rb.

The implementation is discussed in our assignment report.

Example: Traveling Salesman in Luxembourg

Example output from the luxembourg problem:

ruby ann.rb luxembourg

SOM output as animated GIF

Requirements

Something went wrong with that request. Please try again.