GithubHelp home page GithubHelp logo

sachahu1 / evolutionary_optimization Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 20.57 MB

A simple and generic evolutionary algorithm library to solve optimization problems.

Home Page: https://sachahu1.github.io/Evolutionary_Optimization/

Makefile 1.92% Shell 10.97% Batchfile 2.41% Python 84.70%
evolutionary-algorithms genetic-algorithm optimization-algorithms

evolutionary_optimization's Introduction

docs_pages_workflow

Evolutionary Optimization

This module can be used to solve optimization tasks. For instance, you could use this module to tune the hyper-parameters of a neural network or a decision tree.

Getting started

Installation

To install the package, simply run:

git clone https://github.com/sachahu1/Evolutionary_Optimization
cd Evolutionary_Optimization

Then, set up a virtual environment like so:

python3 -m venv ./venv

Activate your virtual environment:

source venv/bin/activate

And install the dependencies:

pip3 install -r requirements.txt

Using the package

First go to the right directory:

cd Evolutionary_Optimization/src

Then, run the code as follows:

python3 train_ea.py

Configuring your experiment

You can easily configure your own optimization problem through the Evolutionary_Optimization/src/config.py file. To do so, simply follow these steps:

  • Write your own test function which evaluates an individual's genotype into a phenotype (see these examples).
  • Write your own fitness function which evaluates an individual's phenotype and returns a fitness score (see these examples).
  • Define your own genotype in the format of a python Dict with the minimum and maximum values
  • Configure the parameters of your experiment

You're all set and ready to solve your optimization problem!

Examples

Below are a few examples of an evolutionary optimization task being solved. In these examples, the black dot represents the best individual in the population and the cross represents the worst individual.

Booth Function:

Bukin function:

Easom function:

Goldstein-Price function:

Rosenbrock function:

Documentation

You can consult our documentation here.

evolutionary_optimization's People

Contributors

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