Running the experiment and analyzing the results

The following command should be issued in the Chapter3 directory to start the experiment:

$ python xor_experiment.py
Don't forget to activate the XOR_neat virtual environment with $ conda activate XOR_neat. Otherwise, errors about missing a neat package will be raised.

After the preceding command is entered in your Terminal application of choice, the NEAT algorithm starts execution, and the Terminal window starts to show intermediate results in real time. For each generation, the output is as follows:

 ****** Running generation 43 ******                     Population's average fitness: 6.01675 stdev: 2.53269Best fitness: 14.54383 - size: (4, 7) - species 2 - id 5368Average adjusted fitness: 0.238Mean genetic ...

Get Hands-On Neuroevolution with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.