Skip to main content

Evolutionary graph-based optimization library with Python bindings

Project description

graphevol

A scalable topology-evolution engine powered by a high-performance Rust backend.

graphevol provides fast graph-based neuroevolution in Python, with structural mutations, pruning, configurable operations, and a JAX/PyTorch/NumPy-friendly workflow.


Features

  • Fast Rust backend for graph topology evolution
  • Six structural mutation operators
  • Configurable GA via YAML (population, mutation rates, pruning, crossover, etc.)
  • Customizable unary & binary operations (ops.yaml)
  • Clean Python API for research workflows
  • Good performance with JAX, NumPy, PyTorch

Installation

pip install graphevol

(Optional) Install Graphviz for visualization:

Linux

sudo apt install graphviz

macOS

brew install graphviz

Quick Start

import graphevol as ge

# Generate default YAML configs
ge.generate_default_settings("ga.yaml", "ops.yaml")

genus = ge.PyGenus(
    seed=0,
    input_dim=4,
    output_dim=2,
    ga_config_path="ga.yaml",
    ops_path="ops.yaml",
)

genomes = genus.next_generation() # weights and function's expression (str)
scores = rollout_fn(genomes)

genus.selection(scores)

⚙ Configuration

graphevol uses two YAML files:

ga_config.yaml

ops.yaml


Documentation

Full documentation & examples:
https://github.com/otyanokosaisai/graphevol


License

MIT License.


Contributions

Issues & PRs are welcome.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

graphevol-0.0.1-cp312-cp312-manylinux_2_39_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

File details

Details for the file graphevol-0.0.1-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

  • Download URL: graphevol-0.0.1-cp312-cp312-manylinux_2_39_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.12, manylinux: glibc 2.39+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for graphevol-0.0.1-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 c069807aedb01a74c8a9f1877ea9604a81f7a49a8bafa0b83aeb1b410f049238
MD5 7e59e147e027e7291d5cdb040716cca2
BLAKE2b-256 a2e0cd25ca0bd0f673f32ff460e52a32281d2f6c0b258245ae7412b3a8f9b8ec

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