Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ•ธ๏ธ Arachne โ€“ The Algorithm of Everything

"Everything you see is a result. Every result is a fabric. And every fabric is Arachne."

License: CC BY-NC-SA 4.0


๐Ÿ“– What is Arachne?

Arachne is a probabilistic knowledge network framework inspired by quantum mechanics. It models reality as a spiderweb of interconnected nodes (entities) and edges (relationships), where every connection carries a probabilityโ€”representing uncertainty, causality, and choice.

Core Concepts

Concept Description
Nodes Entities (people, places, events, ideas)
Edges Relationships with probabilities (0.0 โ€“ 1.0)
Superposition Nodes can exist in multiple states simultaneously
Collapse Measurement selects one state from superposition
Entanglement Changes in one node instantly affect another
Prediction Most probable path through the web
Learning Adaptive weights via Bayesian updates
Decision Trees Visualising optimal paths to a target

๐Ÿš€ Features

  • โœ… Graph-based knowledge representation with memory-mapped storage (up to 1M nodes, 5M edges)
  • โœ… Quantum-inspired states: superposition, collapse, entanglement
  • โœ… Prediction engine for most probable paths
  • โœ… Adaptive learning via Bayesian probability updates
  • โœ… Batch simulation for sensitivity analysis
  • โœ… Decision tree generation for optimal path selection
  • โœ… ASCII & SVG visualisations of the network
  • โœ… CLI interface with 20+ commands
  • โœ… Export to JSON, Graphviz, D3.js
  • โœ… Thread-safe with read-write locks

๐Ÿ› ๏ธ Installation

git clone https://github.com/yourusername/arachne.git
cd arachne
make
sudo make install  # optional

Dependencies

  • GCC (or any C99 compiler)
  • POSIX-compliant system (Linux, macOS, WSL)
  • pthread library (included with most systems)

๐ŸŽฎ Usage

CLI Mode

./arachne [database_name.arachne]

Basic Commands

add "Israel" 100                     # Add node with value
add "Hamas" 85
link 0 1 "conflict" 0.95             # Add edge with probability
show 0                               # Display node details
stats                                # Show network statistics
predict 0 5                          # Predict path from node 0 (depth 5)
batch 0 4 "Hamas" 0.30 0.95 0.10    # Sensitivity analysis
decision 1 4 "Peace_Agreement"       # Decision tree to target
tree 0 3                             # ASCII probability tree
paths 1 "Peace_Agreement" 6          # All paths to target
report 0 5                           # Generate text report
debug                                # Debug all edges
unify                                # Create Universe root node
export graphviz > graph.dot          # Export to Graphviz
export json > graph.json             # Export to JSON
quit                                 # Exit

Example Session

./arachne
add "Israel" 100
add "Hamas" 85
add "Peace_Agreement" 10
link 0 1 "conflict" 0.95
link 1 2 "leads_to" 0.70
predict 0 4

Output:

๐Ÿ”ฎ Prediction:
  0. "Israel" (1.00)
  1. "Hamas" (0.95)
  2. "Peace_Agreement" (0.67)

๐Ÿ“Š Example: Middle East Conflict Network

We applied Arachne to ACLED conflict data (2016โ€“2026) to model the Gaza conflict.

Network Overview

  • 30+ nodes (countries, organisations, regions)
  • 60+ edges (conflict, alliances, mediation)
  • Probabilities derived from real event data

Key Insight

The most probable path from Israel leads to:

Israel โ†’ Hamas โ†’ Escalation โ†’ Humanitarian_Crisis โ†’ Ceasefire โ†’ Peace_Agreement

Probability: 40.7%

Sensitivity Analysis

Batch simulation showing path changes with different probabilities:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Probability โ”‚ Path Length โ”‚        First Step            โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚     30%     โ”‚      5      โ”‚  Gaza_Civilians              โ”‚
โ”‚     40%     โ”‚      5      โ”‚  Gaza_Civilians              โ”‚
โ”‚     50%     โ”‚      5      โ”‚  Gaza_Civilians              โ”‚
โ”‚     60%     โ”‚      5      โ”‚  Hamas                       โ”‚
โ”‚     70%     โ”‚      5      โ”‚  Hamas                       โ”‚
โ”‚     80%     โ”‚      5      โ”‚  Hamas                       โ”‚
โ”‚     90%     โ”‚      5      โ”‚  Hamas                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Critical threshold: ~55% โ€“ below this, the path shifts to Gaza_Civilians.


๐Ÿงฌ Philosophical Background

Arachne is named after the Greek myth of Arachne โ€“ a weaver who challenged Athena and was turned into a spider. This reflects the project's core idea: everything is a web of probabilities, and whoever holds the threads shapes reality.

Key Philosophical Questions

  • Truth โ€“ Is truth just a probability that became real?
  • Superposition โ€“ Do we exist in multiple states until measured?
  • Entanglement โ€“ How do our decisions affect others across space and time?
  • Imagination โ€“ Are alternative realities just probabilities not yet realised?

Abstract

This paper presents Arachne, a novel framework that models reality as a probabilistic spiderweb of interconnected nodes and edges. Inspired by quantum mechanicsโ€”superposition, collapse, and entanglementโ€”Arachne represents entities as nodes and relationships as probabilistic edges. The system supports prediction of most probable paths, adaptive learning from events, decision-tree analysis, and exploration of alternative realities. We demonstrate Arachne on a Middle East conflict network (based on ACLED data), showing how it can model complex geopolitical dynamics and identify critical thresholds for peace. The framework is implemented in C with memory-mapped storage, supporting up to 1M nodes and 5M edges. While not a true quantum system, Arachne offers a practical, extensible model for reasoning about uncertainty, causality, and choice in interconnected systems.


๐Ÿ—บ๏ธ Roadmap

Feature Status
Core graph engine โœ… Done
Quantum states (superposition, collapse) โœ… Done
Entanglement โœ… Done
Prediction engine โœ… Done
Learning (Bayesian updates) โœ… Done
Batch simulation โœ… Done
Decision trees โœ… Done
ASCII/SVG visualisation โœ… Done
JSON/Graphviz/D3 export โœ… Done

๐Ÿค Contributing

Contributions are welcome!

Development Setup

git clone https://github.com/yourusername/arachne.git
cd arachne
make
make test

๐Ÿ“„ License

This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0).

License: CC BY-NC-SA 4.0

You are free to:

  • Share โ€“ copy and redistribute the material in any medium or format
  • Adapt โ€“ remix, transform, and build upon the material

Under the following terms:

  • Attribution โ€“ You must give appropriate credit
  • NonCommercial โ€“ You may not use the material for commercial purposes
  • ShareAlike โ€“ If you remix, transform, or build upon the material, you must distribute your contributions under the same license

๐Ÿ“ง Contact


โญ Support

If you find Arachne useful, please:

  • โญ Star this repository
  • ๐Ÿ› Report issues
  • ๐Ÿ”ง Submit pull requests
  • ๐Ÿ“– Cite the paper in your work

๐Ÿ•ธ๏ธ Final Words

"Everything you see is a result. Every result is a fabric. And every fabric is Arachne."

This is reality. This is imagination. This is everything.


๐Ÿ•ธ๏ธ Arachne v1.0.0 โ€“ The Algorithm of Everything

About

The Fabric of Existence

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages