Skip to main content

Tests Docs Coverage Status Downloads

About

NEAT (NeuroEvolution of Augmenting Topologies) is a method developed by Kenneth O. Stanley for evolving arbitrary neural networks. This project is a pure-Python implementation of NEAT with no dependencies beyond the standard library. It was forked from the excellent project by @MattKallada.

For further information regarding general concepts and theory, please see the publications page of Stanley's current website.

neat-python is licensed under the 3-clause BSD license. It is currently only supported on Python 3.8 through 3.14, and pypy3.

Features

  • Pure Python implementation with no dependencies beyond the standard library
  • Supports Python 3.8-3.14 and PyPy 3
  • Reproducible evolution - Set random seeds for deterministic, repeatable experiments
  • Parallel fitness evaluation using multiprocessing
  • Network export to JSON format for interoperability
  • Comprehensive documentation and examples

Getting Started

If you want to try neat-python, please check out the repository, start playing with the examples (examples/xor is a good place to start) and then try creating your own experiment.

The documentation is available on Read The Docs.

You can also ask questions via the experimental support agent!

Network Export

neat-python supports exporting trained networks to a JSON format that is framework-agnostic and human-readable. This allows you to:

  • Convert networks to other formats (ONNX, TensorFlow, PyTorch, etc.) using third-party tools (the beginnings of a conversion system can be found in the examples/export directory)
  • Inspect and debug network structure
  • Share networks across platforms and languages
  • Archive trained networks independently of neat-python

Example:

import neat
from neat.export import export_network_json

# After training...
winner_net = neat.nn.FeedForwardNetwork.create(winner, config)

# Export to JSON
export_network_json(
    winner_net,
    filepath='my_network.json',
    metadata={'fitness': winner.fitness, 'generation': 42}
)

See docs/network-json-format.md for complete format documentation and guidance for creating converters to other frameworks.

Citing

Here are APA and Bibtex entries you can use to cite this project in a publication. The listed authors are the originators and/or maintainers of all iterations of the project up to this point. If you have contributed and would like your name added to the citation, please submit an issue.

APA

McIntyre, A., Kallada, M., Miguel, C. G., Feher de Silva, C., & Netto, M. L. neat-python [Computer software]

Bibtex

@software{McIntyre_neat-python,
author = {McIntyre, Alan and Kallada, Matt and Miguel, Cesar G. and Feher de Silva, Carolina and Netto, Marcio Lobo},
title = {{neat-python}}
}

Thank you!

Many thanks to the folks who have cited this repository in their own work.

Release files for neat-python 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for neat-python 2.0.0
File Size Uploaded
neat_python-2.0.0.tar.gz 126.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for neat-python 2.0.0
File Interpreter ABI Platform
neat_python-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 180.1 kB

Release files / neat_python-2.0.0.tar.gz

Download URL neat_python-2.0.0.tar.gz
Size 126.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fcfb5020aa3df5c12638865296589159939db08e9aa4191d9cf4e5b242a5d9cf
BLAKE2b-256 checksum
How to use checksums
782d6d3d96cde074bcbdc3fae08383bb6a9b2da2f98c405d16acceccc36c14c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / neat_python-2.0.0-py3-none-any.whl

Download URL neat_python-2.0.0-py3-none-any.whl
Size 54.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ba18bec7b1d1dfa659348e28156f36007ebc111d46eb4ddc07a128377b459f7
BLAKE2b-256 checksum
How to use checksums
b2a6e85e39f593e3bd8ccc2dc57abf60c9a51fbc542616531629d988c05de484
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.92

2 release files

0.91

2 release files

0.9

2 release files

0.8

3 release files

0.7

3 release files

0.6

3 release files

0.5

3 release files

0.4

2 release files

0.3

2 release files

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page