GithubHelp home page GithubHelp logo

genetic_part3's Introduction

Guide for GASolving

By Manon LEMAIRE and Zachary GAGNOU

Description:
This package is designed for solving genetic algorithm such as mastermind or tsp problems. In this package is included 5 modules:

  • GASolver_module.py
  • mastermind_module.py
  • cities_module.py
  • MasstermindProblem.py
  • TSPProblem.py

Generic scope

The generic code for solving these problems is in the GASolver_module.py file. It is composed of the following classes:

  • Individual: the individuals that compose a given population.
  • GAProblem: it calls the non generic code for solving a problem.
  • GASolver: it calls the generic code for solving a problem.

Specific scope

There are two examples of problems that can be solved with the gentic algorithm method: MASTERMIND and TSP.

For each problem, there is a specific class that inherits from the GAProblem class located in the problem files. With each problem, there is a module that contains elements for utility functions and the class to instantiate the problem. There is also problem file that contains the specific code for solving the problem. This is the file run for getting the solution.

Functions

The functions that are used for each problem are:

  • resetPopulation: it initiate the population.
  • evolveForOneGeneration: it evolves the population for one generation using 3 functions (sortPopulation, mutate and evaluate)
  • showGenerationSummary: it prints the generation.
  • getBestIndividual: it returns the best individual of the population.
  • evolveUntil: it evolves the population until a given condition is met.

genetic_part3's People

Contributors

zakenobi 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.