Giter VIP home page Giter VIP logo

openga's Introduction

openGA

A free C++ Genetic Algorithm library


Download

Download link:

https://github.com/Arash-codedev/openGA/archive/v1.0.5.zip

Documentation

Documentation is available at:

https://github.com/Arash-codedev/openGA/blob/master/openGA.pdf

If you have found this library useful for your work, please cite the following paper:

openGA, a C++ Genetic Algorithm library

@inproceedings{mohammadi2017openga,
  title={OpenGA, a C++ Genetic Algorithm Library},
  author={Mohammadi, Arash and Asadi, Houshyar and Mohamed, Shady and Nelson, Kyle and Nahavandi, Saeid},
  booktitle={Systems, Man, and Cybernetics (SMC), 2017 IEEE International Conference on},
  pages={2051--2056},
  year={2017},
  organization={IEEE}
}

About

This library is easy to use. Examples are provided in the document. The library is placed in a single file for comfort of the user. The standard C++ libraries are sufficent for this library and you do not need to install additional library for compiling.

Demo

Youtube video:

Youtube video

Supported platforms

  • Linux
  • Windows
  • OSX

Automatic code generator

For the comfort of the client, openGA assist provides an interface to generate an automatic code. OpenGA assist is located at assist/index.html.

openGA assist

FAQ

Why does the crossover function generate a single offspring instead of two? This library calls crossover function two times instead of calling it once to create two offspring. This is to reduce the burden from the client programmer.

What is the shrink scale? The mutation jumps should reduce over generations to increase the accuracy of solution. Shrink scale is a generation dependent coefficient to scale the resolution.

After optimization, how to access the population? To have an access to the last generation, you can use an object field called last_generation. A particular usage example can be

best_solution = ga_obj.last_generation.chromosomes[ga_obj.last_generation.best_chromosome_index];

In the current implementation of openGA, only the middle cost of the last generation is stored. The reason is that keeping the entire generations can lead to a huge memory usage and eventually crashing the application after an out of memory error for particular applications which keep huge amount of data. If you are keen to keep the full information trace of all generations, you can perform it manually via the report function.

Does multi-threading always improve the performance? Multi-threading itself has an overhead. Therefore, it is helpful when the evaluation process is heavy enough. If the evaluation process is so fast, parallel programming is not necessary.

Instead of a function, can I set a class method as a GA operator or a cost function? Yes, C++ supports it. It can be achieved by using C++ standard library. For this purpose, you need to use std::bind and std::placeholders. For detailed implementation information search for C++ function template bind.

openga's People

Contributors

arash-codedev avatar lucbanda 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.