/genetic-algorithm-pixel-plant

Generating a random pixel plant and optimizing it with a genetic algorithm

Primary LanguagePython

genetic-algorithm-pixel-plant

Prerequisites

webcolors

install it with

pip3 install webcolors

Run

To run the genetic algorithm do:

python3 optimal-pixel-plant.py <execution_mode> <num_generations> <pop_size>

execution_mode is the expected behavior on each of the homework problems (1, 2 or 3)

num_generations is the total number of generations to run

pop_size is the initial population size

Examples

  • With 1000 generations and population size 10

  • With 1000 generations and population size 30