##The DIY Guide to PyEvolve
Please make Pull Requests for good resources, or create Issues for any feedback! Thanks!
###Table Of Contents
PyEvolve is a genetic algorithm library, which is a biologically-inspired optimization technique. This library enables us to solve search problems such as hyperparameter tuning.
###Learn By Example The goal of this section is to get you hands on ASAP. If the hello world example confuses you, try out the theory section first.
pip install pyevolve
#####Hello World
- Define an eval function to calculate fitness
- Genome defines the encoding, initialization, mutation, crossover of the population
- GA assigns the search hyperparameters such as generations, mutation rate and crossover rate
#####Interactive Mode
- Visualizations of population and fitness
- Does not work on Macs, workaround
#####More Parameters
- Changed the range of the genomes here
- Gaussian mutator example here
- Selection algorithm is changed as well here
- Schaffer F6 is a harder eval func visualization
- Termination criteria for early stopping here and here
#####Maximize to Minimize
- Minimize instead of maximize here
- Scaling the fitness scores to better distinguish the good from the bad here
#####Callback
- Callback is called after every generation here
- Good for logging statistics of the population
#####2D Problem Example
- Good for grid search problems such as the N-Queen problem
- An extreme case for the normal G1DList
- Useful for binary string problems
#####Allele Example
- Alleles are designed for discrete and categorical data instead of real and continuous data
- Categorical data example here
#####Genetic Programming Example
- Genetic programming is a branch of genetic algorithms
- Computer programs are encoded as a set of genes that are then modified to produce a target output
###Theory The goal of this section is to explain the background behind the package
#####Genetic Algorithm
- Awesome tutorial
- Complete and detailed tutorial (First few pages are boring though)
- Quora discussions
#####Encoding
#####Selector
#####Mutator & Crossover
#####Genetic Programming
###Documentation The goal of this section is to reference more parameters and implementation details
- Git Repo, Official Documentation
- GSimpleGA - Code - Documentation
- Selectors - Code - Documentation
- Scaling - Code - Documentation
- Crossover - Code - Documentation
- Initializators - Code - Documentation
- G1DList - Code - Documentation
- G1DBinaryString - Code - Documentation
- G2DList - Code - Documentation