Skip to content

emiz98/firefly-algorithm-tsp

Repository files navigation

Evolutionary Discrete Firefly Algorithm for Traveling Salesman Problem

cover

Table of Contents


Introduction

The paper that was related to this implementation was published by Gilang Kusuma Jati and Suyanto. It addresses how to apply firefly algorithm (FA) for traveling salesman problem (TSP). Two schemes are studied, i.e. discrete distance between two fireflies and the movement scheme. Computer simulation shows that the simple form of FA without combination with other methods performs very well to solve some TSP instances, but it can be trapped into local optimum solutions for some other instances.

Features

🚀 Ability to instantiate Random TSP instances
🚀 Ability to select benchmarks Ulysses 16/22
🚀 Can tweak parameters (population, alpha etc.)
🚀 Toggle crossover to avoid premature convergence

Build Process

  • Clone or download the repo
  • to run the application

Tech Stack

Project Goals & Outcomes

✔️ Learning Javascript
✔️ Learning P5.JS
✔️ Learning to solve np-hard problems in a polynomial time
✔️ Learning to solve premature convergence.