adamstirtan / ga-js

A demo of genetic algorithms in JavaScript solving the traveling salesman problem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Genetic Algorithm (GA) Visualization

This repository contains a web application that visualizes Genetic Algorthms (GA) for solving the traveling salesman problem. The application uses HTML and JavaScript to create an interactive demonstration of how a chromosome can be encoded to find a short path through a number of locations exactly once.

Demo

To see the GA visualization in action, you can visit the live demo at https://adamstirtan.github.io/ga-js/.

Features

  • Genetic algorithm visualization.
  • Canvas based TSP drawing
  • Dynamic control of GA hyperparameters (Crossover and mutation rate) as sliders

Using the Experiment

To run the application locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/adamstirtan/ga-js.git
  2. Open the index.html file in your web browser.

  3. Interact with the GA visualization using the parameters.

About

A demo of genetic algorithms in JavaScript solving the traveling salesman problem


Languages

Language:JavaScript 83.0%Language:HTML 17.0%