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.0.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.0-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.0.tar.gz.

File metadata

  • Download URL: fracnetics-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 b8e14f1d028d761f5a1c99c516b25468eaadfc4f505b7c89f5c0b6bafb7feda0
MD5 18a86a69d67ccad0305fe69d1152d054
BLAKE2b-256 74788754623a5d3c8568048a7cebb684862c693a9470dd7728427e2ceb74021f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fracnetics-1.0.0-cp311-cp311-macosx_26_0_x86_64.whl
Algorithm Hash digest
SHA256 4f4f62c9c3a7c40a3d26fe5916f71f7d2e027385c3cc21a3f16cd19a07789880
MD5 0a14169b851dc0684ed0a0298a0ba345
BLAKE2b-256 4689451e997a606f7abe5893209abd0ce09b4a815da7efeeb120f168a9807807

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