Skip to main content

Genetic Network Programming with Fractal Expansion

Project description

Run Tests PyPI Documentation Status LinkedIn

Fracnetics

Fracnetics is a high-performance C++ library with Python bindings for Genetic Network Programming (GNP) — an evolutionary approach that evolves directed graph structures for decision-making and control tasks.

Bridging evolution, networks, and fractals into one framework.


🔬 Overview

Fracnetics extends Genetic Network Programming (GNP) with variable-size networks and fractal geometry, designed to model adaptive, recursive, and self-similar network structures inspired by biological evolution and natural growth patterns.

It is designed for researchers and developers exploring:

  • Evolutionary network design
  • Obtain fully interpretable networks
  • Training agents in dynamic environments
  • Directed multigraph network architecture
  • variable-size networks based on Fabian Köhnke and Christian Borgelt, 2025
  • Complex systems with self-similar topology

🚀 Installation

pip install fracnetics

📓 Colab Tutorials

Small Tutorials Using Fracnetics

This notebooks demonstrate how to use the Fracnetics library to solve the CartPole environment problem from Gymnasium (a fork of OpenAI Gym) and the simple Irisdata classification.

CartPole Tutorial
Open in Colab

Iris Tutorial
Open in Colab


🦾 Features

  • Population Management

    • Create and manage a full population of Network individuals.
    • Graph-Based Evolution: Networks evolve as directed graphs with judgment nodes (conditional decisions) and processing nodes (actions), enabling node reuse and cyclic execution paths
  • Fitness Evaluation

    • Built-in support for OpenAI Gymnasium environments
    • Traverse a network path via callTraversePath and calculate any own fitness/ target function
  • Selection & Elitism: Tournament selection with configurable size.

  • Mutation Operators

    • Edge mutation (altering connections between nodes).
    • Boundary mutations (multiple variants):
      • Uniform
      • Normally distributed
      • Network-size dependent sigma scaling
      • Edge-count dependent sigma scaling
      • Fractal-based mutation
  • Crossover: Node exchange between individuals.

  • Innovative Opreators

    • Add/Delete Nodes – dynamic structural changes in networks.
    • Fractal Geometry Integration – hierarchical boundary generation via production rules (L-systems-style subdivision).

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

fracnetics-1.0.1.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

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

fracnetics-1.0.1-cp311-cp311-macosx_26_0_x86_64.whl (186.1 kB view details)

Uploaded CPython 3.11macOS 26.0+ x86-64

File details

Details for the file fracnetics-1.0.1.tar.gz.

File metadata

  • Download URL: fracnetics-1.0.1.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for fracnetics-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ab060c556a34dae2153bfa74eb95a5638f0b907334b6309dbc1e27e9c5c5731a
MD5 dc774cd5fa30d0f24cced462eae5ad0b
BLAKE2b-256 502dacdeea7efe13e2dc5e3ca77609922fd1a250022a3ba5ed820543a337ea85

See more details on using hashes here.

File details

Details for the file fracnetics-1.0.1-cp311-cp311-macosx_26_0_x86_64.whl.

File metadata

File hashes

Hashes for fracnetics-1.0.1-cp311-cp311-macosx_26_0_x86_64.whl
Algorithm Hash digest
SHA256 e1793a90a9272e87d622360cd4218c0b2b227f9b5af04ffbb1d8d7059fa53dd3
MD5 b0195636f9a7f386939126a1a4476020
BLAKE2b-256 434f99d72877a95affc8a2127f5dd49cba6fd0079a7dd3bf45d6700cbca8fa78

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