Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

giuse/simple_ga

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
4 Commits
 
 
 
 
 
 

Repository files navigation

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.

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.