Implementation of standard, diffusion and migration models of genetic algorithms.
Project description
geneticalgs
Implementation of standard, migration and diffusion models of genetic algorithms (GA) in python 3.5.
Benchmarking was conducted by COCO platform v15.03.
The project summary may be found in project_summary.pdf.
Link to GitHub
Link to PyPI.
Link to Read The Docs.
Implemented features
standard, diffusion and migration models
with real values (searching for global minimum or maximum of the specified function)
with binary encoding combination of some input data
old population is completely replaced with a new computed one at the end of each generation (generational population model)
two types of fitness value optimalization
minimization
maximization
three parent selection types
roulette wheel selection
rank wheel selection
tournament
may be specified mutation probability
may be specified any amount of random bits to be mutated
may be specified crossover probability
different types of crossover
single-point
two-point
multiple point up to uniform crossover
elitism may be turned on/off (the best individual may migrate to the next generation)
Content description
/geneticalgs/ contains source codes
/docs/ contains sphinx source codes
/2.7/ contains files converted from python 3.5 to python 2.7 using 3to2 module as COCO platform used in benchmarking supports only this version of python. These files (not installed package geneticalgs) are used in benchmarking. Must be copied in the directory with my_experiment.py or my_timing.py.
/2.7/benchmark/ contains the following files:
my_experiment.py is used for running benchmarking. Read more here.
my_timing.py is used for time complexity measurements. It has the same run conditions as the previous file.
pproc.py is a modified file from COCO platform distribution that must be copied to bbob.v15.03/python/bbob_pproc/ in order to post-process measured data of migration GA (other models don’t need it). It is necessary due to unexpected format of records in case of migration GA.
/benchmarking/ contains measured results and the appropriate plots of benchmarking.
/time_complexity/ contains time results measured using my_timing.py.
/examples/ contains examples of using the implemented genetic algorithms.
/tests/ contains pytest tests
Requirements
Installation
Install package by typing the command
python -m pip install geneticalgs
If you have problems installing NumPy it is strongly recommended to use Anaconda.
Running tests
You may run tests by typing from the package directory
python setup.py test
Documentation
Go to the package directory and then to docs/ and type
pip install -r requirements.txt
Then type the following command in order to generate documentation in HTML
make html
And run doctest
make doctest
License
Licensed under Apache License Version 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file geneticalgs-1.0.1.tar.gz
.
File metadata
- Download URL: geneticalgs-1.0.1.tar.gz
- Upload date:
- Size: 33.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5648727ed8257fbe8afa5676006a02389a3d465ebb088ddbc0928cc57715050 |
|
MD5 | 740e0707c755c8281700c223bccfda98 |
|
BLAKE2b-256 | c469c10e895024de6a7bf9abdff2a18d0551c99f7b77302c60d79eb1fe05066f |