Giter Club home page Giter Club logo

cope's Introduction

COntinuous Population Evolution (COPE)

COPE is an evolutionary algorithm much like a genetic algorithm. But unlike a classic genetic algorhtim, COPE does not generate a new generation from the last. It continuously generates new indivduals from the Population and inserts them back into the Population. This allows the genetic operators and evaluators to be applied to new individuals completely in parallel, and thus we can speed up the algorithm by adding more worker process to the pool.

Diagram

Cope Diagram

Population

The Population is the data structure that holds all the individuals of our population. It is implemented using a sortedList for fast selection and insertion.

Manager

The Manager is a separate process with selects two individuals and places them in the delivery queue. It will then check if the nursery queue has individuals waiting to be inserted into the population.

Worker Pool

Workers in the worker pool do all their work in parallel and so we can spin up many workers to increase the speed of the algorithm. They take a pair of individuals from the devlivery queue, apply genetic operators like crossover and mutation, to produce a new individual. This new individual has it's fitness evaluated so the manager can insert it back into the population in the correct position.

Setup

create a virtualenv using your preferred method

virtualenv -p python3 env
source env/bin/activate

install requirements

pip install -r requirements-dev.txt

Test

run the unit tests

./scripts/unit-test.sh

Examples

There are a couple example files for doing simple list genetic algorithms or gp etc.

python list_ga.py
python tree_ga.py
python gp.py

cope's People

Contributors

scrussell24 avatar

Stargazers

 avatar

Watchers

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