GitXplorerGitXplorer
r

ga-travelling-salesman

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
b6547ca8ee7ee6f351dabd6c6e28576c2c8a43d3

Create LICENSE

rryanguill committed 2 years ago
Unverified
e32bd71c8b7027346f490facab7b127beb342086

update readme, gitignore.

rryanguill committed 2 years ago
Unverified
92ed949fdc39859e187e957a0e0dd835c856720a

Tweaks from intellij analysis

rryanguill committed 12 years ago
Unverified
9a1f9c51fab8f56345c2cd0fabd2f6a0b8384bbf

changed to use strinbuffer in a few places, using some for each loops now, other cleanups

rryanguill committed 13 years ago
Unverified
4dba8ca5cea18bdfb7d5626eca2624a9b8f52384

fixed a few bugs, formatted code

rryanguill committed 13 years ago
Unverified
a79e4f10e00ace3c6fb0bc6de39bd08128eb0ca9

clearing results.txt

rryanguill committed 13 years ago

README

The README file for this repository.

This is a version of a genetic algorithm I have written in a few different languages. The purpose is to solve the travelling salesman problem by breeding and evolving a set of solutions.

To make it harder and more accurate to an evolution simulation, the actual cities are represented as certain genes, but the genes in the individual are random, meaning that the "city" genes that are actual phenotypic must be discovered, as well as then evolved to be in order.

At a high level, fitness is measured as having discovered the actual locations and minimizing distance, while penalizing visiting the same city more than once.

Mutation, chromosome shuffling and bonuses to reward fitness are options that can be adjusted to achieve very different performance characteristics.

On the first run, a default set of parameters will be written to the home directory, which can then be adjusted for future runs.

to compile: javac -classpath ./libs:./src -d ./out/production/ga-travelling-salesman ./src/Main.java

to run: java -Dfile.encoding=UTF-8 -classpath ./out/production/ga-travelling-salesman Main

This project was originally written using java 8, but has been tested up to Java 15.