-
Notifications
You must be signed in to change notification settings - Fork 5
Introduction
Note: the documentation covers versions >= 0.2.*. Older releases are not in any way compatible with updated APIs, and I prefer to pretend they have never existed at all (I hope you haven't had the opportunity to use them).
As the name might suggest, genetic is a package for genetic algorithms. In a nutshell, genetic algorithms (genalgs) are quite simple:

- start with a population of individuals,
- select a subset of them for mating,
- recombine genomes within selected mating groups,
- introduce mutations to recombined genomes,
- apply selective pressure to end up with an updated population,
- rinse and repeat
The devil, as it often happens, is in the details. Each one of these steps (along with several unmentioned others) corresponds to a set of rules. Consider step 5, for example. We can decide to replace the entire parent generation with offsprings before applying selection or we can add newcomers to a joint selection pool. In the second case we can make it even more interesting by putting a deterministic/stochastic limit on the number of generations someone can survive regardless of fitness. In other words, we can come up with a seemingly endless set of possible rule combinations. The question is, how do we make a framework that is flexible enough to make our wildest (well, maybe not the wildest) dreams come true without rewriting the entire algorithm from scratch. This package tries to answer the question as best as my chicken brain allows by avoiding the black-box paradigm. The main goal is to achieve simplicity without sacrificing flexibility. In this respect, the package is heavily inspired by the functional programming paradigm and tries to provide typed APIs so as to make all interfaces clean and explicit.