An open API service indexing awesome lists of open source software.

https://github.com/giuse/simple_ga

Simple Genetic Algorithm for demonstration purposes
https://github.com/giuse/simple_ga

demo evolutionary-algorithm evolutionary-algorithms evolutionary-computation example genetic-algorithm rubyml tutorial

Last synced: 6 days ago
JSON representation

Simple Genetic Algorithm for demonstration purposes

Awesome Lists containing this project

README

          

# Genetic Algorithm in Ruby

Solving the 1-max problem with a simple GA, wrote as a quick-hack live machine learning demonstration.

The first commit already has basic features, then I show how simple additions (elitism and more mutation) rapidly increase performance.

I like to use GAs to explain Machine Learning:
- Based on an intuition everybody is familiar with (natural evolution)
- No math is involved (uncommon in ML), hence none is required from the audience
- The execution loop is absolutely straightforward
- The genetic operators provide a natural way to organize the code into small-sized functions
- Once cleaned up there is very little code at all

Code style is uneven because focus was put on teaching/explaining rather than execution.