Skip to main content

A NEAT (NeuroEvolution of Augmenting Topologies) implementation

Project description

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.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neat_python-1.1.0.tar.gz (126.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neat_python-1.1.0-py3-none-any.whl (54.0 kB view details)

Uploaded Python 3

File details

Details for the file neat_python-1.1.0.tar.gz.

File metadata

  • Download URL: neat_python-1.1.0.tar.gz
  • Upload date:
  • Size: 126.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for neat_python-1.1.0.tar.gz
Algorithm Hash digest
SHA256 8f60a67dcae9c3b0aca72144517608007d9ad5d31f5091933ec49228b6177569
MD5 e869d435b34b423e8034773d46d0ec19
BLAKE2b-256 d44c37f1c9e17704ebb03721faa8099275e83a400541b056be7176780844a735

See more details on using hashes here.

File details

Details for the file neat_python-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: neat_python-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 54.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for neat_python-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08e7fda8d96ea50c7f01e33e11e00a2ee859b5af69de095b35b221cd95db4058
MD5 b34a41e9f1700b23618f82f389a3edd1
BLAKE2b-256 d42b92e2d572f8ce06d704a22b3497281c22f6b58de3492747a2e1cd813812a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page