Giter Club home page Giter Club logo

genetic-algorithm-example-in-java's Introduction

goingAroundScotland

Solving the travelling salesman problem with Genetic Algorithm (in scotland)

Steps:

  1. Configure IO (Done)

  2. Initializing first generation (Done)

  3. Creating next generation (Done)

  4. Crossover and mutation (Done)

  5. Putting everything together! (Done)


How does the program read?

The program reads from a text file, currently known as "format.txt"

The first line represents no. of cities

The second line represents the city to start and end with (creating a circuit)

then from the third line, the program starts reading the distance between x and y cities and store it in a data structure for later use.


How to put the text for distance:

123

34 13

66 23 234

The distance between city 0 and city 1 is 123

The distance between city 0 and city 2 is 34

The distance between city 1 and city 2 is 13

The distance between city 0 and city 3 is 66

The distance between city 1 and city 3 is 23

The distance between city 2 and city 3 is 234


If I were to show it with a bit more description, it would look like this..

(City 0 -> City 1)

(City 0 -> City 2)(City 1 -> City 2)

(City 0 -> City 3)(City 1 -> City 3)(City 2 -> City 3)

genetic-algorithm-example-in-java's People

Contributors

polltery avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.