The basic idea behind NEAT is to evolve both network topology (structural adaptation) and weights/biases (parametrical adaptation).
As a starting point, you can check the XOR experiment in the examples folder.
This repository is the 2007 academic implementation (version 0.1), now updated for Python 3.10+.
It is not the PyPI package neat-python (that name belongs to CodeReclaimers/neat-python).
This tree keeps the original CTNN / Izhikevich / integrate-and-fire phenotypes and pole-balancing experiments.
- Python >= 3.10
- Optional:
matplotlibandpydotfor plots and network diagrams (uv sync --extra viz)
uv syncOr, after packaging:
uv pip install -e .cd examples/xor
uv run python xor2.pyVersion 0.1 was developed only for academic purposes in 2007. The Python code was based on the C++ version by Kenneth O. Stanley and his paper on NeuroEvolution of Augmented Topologies. A C++ neural module was included for speed; this release defaults to the pure-Python implementations so a compiler is not required.
The original C++ sources remain in the tree (neat/nn/nn_cpp, neat/iznn, neat/ifnn, examples/pole_balancing/double_pole/dpole.cpp) but are not built. The double-pole integrator is now a Python port (dpole.py).
Paper: Structural and Parametric Evolution of Continuous-Time Recurrent Neural Networks.
- Create a pip package (project name:
neat-python-classic) once this port is stable. - Probably use PyTorch or TensorFlow, with a slightly different genome encoding to accommodate these changes.
- Add more activation functions and expand the ability of each neuron to adapt its own activation function.