diff options
author | Leo Tenenbaum <leonardomtenenbaum@gmail.com> | 2017-08-16 15:19:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-16 15:19:07 -0400 |
commit | 912d8daaecce3efd6d7bd62fc9a2b53ce8ac579f (patch) | |
tree | e001581fd0b1fea7014196ddd4898f41e3d10057 | |
parent | d3dab8d06646727e94e85e1919812b68dd23cf04 (diff) |
Update README.md
-rw-r--r-- | README.md | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1 +1,9 @@ # Genetic Algorithm Framework + +This is a framework for creating genetic algorithms. To use it, create a program which takes in a list of genes, and outputs a fitness for those genes. + +If batch gene proccessing is off, the input will be provided as a comma-separated list of numbers from 0 to 1. If it's on, it will be provided as a semicolon-separated list of comma-separated lists of numbers from 0 to 1. + +`fitness.py` is an example of a non-batch function. If you run `python fitness.py 0.4,0.5,0.6`, it will output 1.7 (0.4 + 0.5 + 0.6). So, if you set the run method to `python fitness.py %s`, it will maximize the sum of the genes (bringing all of them slowly to 1). + +`batch.py` is an example of a batch function. If you run `python batch.py "0.3,0.4;0.5,0.6"`, it will output `0.7,1.1`. This is identical to `fitness.py`, but since it can process multiple sets of genes at once, it will have better performance. To use it, set the run method to `python batch.py "%s"`, and turn batch genes on. |