Git Product home page Git Product logo

genetic-algorithm's Introduction

Genetic-Algorithm

The Genetic Algorithm (GA) belongs to the larger class of Evolutionary Algorithms which generates solutions to optimization problems using techniques inspired by natural evolution, such as inheritance, mutation and selection. GAs are mostly used for problems in which their seach domain is increasing exponentially as the input increases linearly. If n is very large then the time required to look through the entire search domain is sometimes equal to a few years, even with the fastest CPU. A GA generates a number of instances from the search domain and tries to find a solution near to the optimum solution. The generated set of instances then undergoes three main actions: Crossover, Mutation and Selection

Installation

Simply import the "Intelligent System Project" folder to your Java IDE. And run the 'is17080118.java' to execute the project.

Preview of the results

Original Matrix

_20180925212113

Similarity Matrix

After the iteration performed by the genetic Algorithm

_20180925212201

Ordering

The solution for this project is a one dimensional array of numbers that represents an ordering. The size of each ordering is equal to the toal number of individual items. No ordering is allowed to have a repeated number.

Fitness Function

The fitness function indicates how good an ordering is. The measure of the goodness of an ordering is called the fitness cost. Typically each problem has to define its own fitness function depending on the nature of the problem.

Population size

The GA initially starts with a number of randomly generated orderings. The number of initial random orderings is a parameter called the population size. The initial population of orderings is also called the first generation or generation 0.

Selection

Selection is a GA technique which tries to smartly select better orderings from the population for Crossover and Mutation.

Crossover

Crossover is a GA technique which randomly picks and removes two different orderings (parents) from the current population and creates two new orderings (children) and inserts them into a new population (next generation)

Mutation

Mutation is another GA technique that randomly picks and removes one ordering from the current population and applies small change on the ordering and inserts it into the next generation.

Reproduction

Reproduction randomly picks and removes one ordering from the current population and inserts it into a new population (next generation)

Generation

When all those steps are done and the current population is empty then the newly created population is called generation 1 and it is ready to undergo all those processes (selection, crossover, mutation and reproduction) again to create the next generation. The whole process continues until a certain number of generations are created and then from the very last generation the best ordering based on the fitness cost is selected as a final result. The number of required generations is set by user.

genetic-algorithm's People

Contributors

skarlet-witcher avatar

Forkers

sycomix

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.