stupidpythonprojects/evolutionary_algorithm
Jonas Weinz 69e7be0501 improvements on EA 2017-06-25 19:33:08 +02:00
..
README.md improvements on EA 2017-06-25 19:33:08 +02:00
ea.py improvements on EA 2017-06-25 19:33:08 +02:00
main.py improvements on EA 2017-06-25 19:33:08 +02:00

README.md

Evolutionary Algorithm Simulator

run the program:

usage: main.py [-h] [--offspringSize OFFSPRINGSIZE] [--P P] [--L L] [--f F]
               [--epsilon EPSILON] [--cycles CYCLES]

evolutionary algorithm simulation

optional arguments:
  -h, --help            show this help message and exit
  --offspringSize OFFSPRINGSIZE
                        size for new offspring
  --P P                 start population size
  --L L                 genome length
  --f F                 fitness function in python syntax. x[0] - x[L] are the arguments
  --epsilon EPSILON     epsilon for random mutation
  --cycles CYCLES       cycles to calculate

arguments can also be adjusted by the user at runtime. Example for a 2 dimensional fitness function:

./main.py --f "-abs(x[0] - 6) - abs(x[1] +5)" --L 2 --cycles 1000