/Tensorflow-Neuroevolution

Neuroevolution Framework for Tensorflow 2.0, implementing among others the NE algorithm NEAT or custom hybrid-algorithms

Primary LanguagePythonApache License 2.0Apache-2.0

The Tensorflow-Neuroevolution Framework

Version 0.2 BETA

The TensorFlow-NeuroEvolution [abbr. TFNE] framework aims to provide a fast prototyping framework for neuroevolution algorithms realized with Tensorflow 2.x. While the framework is certainly optimized for high performance does the design focus on maintainability, modularity and extendability by allowing for a seamless interchange of the three main concerns of neuroevolution - the genome encoding, the neuroevolution algorithm and the evaluation environment.
TFNE comes with a variety of pre-implemented neuroevolution algorithms, encodings and environments that are all highly optimized and extensively documented. The phenotypes (Neural Networks encoded through the genome) created through the pre-implemented genome encodings make heavy use of Tensorflow and its internal optimization. The Tensorflow models are exclusively created through the keras functional API and therefore allow for high-performance as well as full compatibility with the rest of the Tensorflow ecosystem. This eliminates a common dread in other evolutionary frameworks in which the evolved genome and its phenotype is not compatible with other machine learning frameworks.
All neuroevolution algorithms are controlled through the central evolution engine, which initializes required libraries and initiates each step of the evolutionary process. The evolution engine allows for the usage of custom or prototyped algorithms, encodings or environments, given they adhere to the abstract interfaces supplied for each neuroevolution aspect.

Notes on BETA version, which will be fixed in the final release of v0.2:

  • CoDeepNEAT as of now only supports the basic speciation scheme
  • TFNE visualizer tool not yet published
  • Extensive readthedocs Documentation not yet created
  • Extensive tests not yet implemented

Pre-Implemented Algorithms, Encodings and Environments

Neuroevolution Algorithms:

  • (see v0.1) Neuroevolution of Augmenting Topologies (NEAT) [paper | doc | code]
  • HyperNEAT [paper | doc | code]
  • ES-HyperNEAT [paper | doc | code]
  • DeepNEAT [paper | doc | code]
  • CoDeepNEAT [paper | doc | code]

Genome Encodings:

  • (see v0.1) NEAT Encoding [doc | code]
  • CoDeepNEAT Encoding [doc | code]

Genome Encodings:

  • XOR Problem [doc | code]
  • (see v0.1) OpenAI Gym CartPole [doc | code]
  • CIFAR10 [doc | code]

Installation

TFNE requires Python 3.7 or later.
For the required Python packages, see ./requirements.txt
Installation of the system package graphviz is required for the usage of the TFNE visualizer.


Documentation

Online documentation: https://tfne.readthedocs.io
Offline documentation: ./documentation/build/html/index.html
Both documentations are identical.


Examples

For a variety of examples using different algorithms, encodings and environments, see: ./examples/
Example usage of TFNE in a video format will be recorded, uploaded and linked here in the coming months.


About

Project developed by Paul Pauls in collaboration with Rezsa Farahani.
We would like to thank Google as well as the Tensorflow Team, who have supported this project during the Google Summer of Code 2019 and 2020.