From 912d8daaecce3efd6d7bd62fc9a2b53ce8ac579f Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Wed, 16 Aug 2017 15:19:07 -0400 Subject: Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index ba145d2..7ebf5f1 100644 --- a/README.md +++ b/README.md @@ -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. -- cgit v1.2.3