NineNi999neNine/FractalBrainOS

A self-learning neuromorphic distributed brain. Free. Open. Ethical.

C++

1

5 commits

updated Sep 16, 2026

See the code
active-inference
agi
artificial-general-intelligence
bio-inspired-ai
brain-simulation
complex-systems
cpp17
decentralized-ai
edge-ai
free-energy-principle
hyperdimensional-computing
kuramoto-model
neural-oscillators
neuromorphic
neuromorphic-computing
oscillatory-neural-networks
stdp
swarm-intelligence
unsupervised-learning
vector-symbolic-architectures

See what people are saying (1)

README

English | Русский | 中文

FractalBrainOS v5.2 — Kubera Edition

A self-learning neuromorphic distributed brain. Free. Open. Ethical.

Born from a vision at the foot of Arunachala mountain, Tamil Nadu, India. Developed through dialogues with AI. One tablet. No money. Just an idea.

Honest about the project's state.

The core works. It compiles, runs, synchronizes, learns through STDP, reduces free energy, stores patterns, enters sleep, and consolidates memory. This is verified. You can run it today.

What follows: some is working modules, some is hooks waiting to be connected, some is a direction not yet in code. You'll open the source and see for yourself. I say it first.

This is a core. You can finish it, modify it, connect it to an LLM, to hardware, to anything. The engine is built. The rest is up to you.

I'd be glad to welcome anyone who wants to bring it to completion.

It's an Engine. A Digital Combustion Engine for Intelligence.

When the first internal combustion engine was built, it wasn't a car. It was a core that turned fuel into motion. People later added wheels, steering, a chassis. Some built race cars, others built tractors, generators, or lawnmowers. The same engine, endless applications.

FractalBrainOS is exactly that — but for intelligence.

It's a digital brain engine. You connect it to anything electronic. Attach sensors and motors, and it will learn to control a drone. Attach it to a chatbot, and it will talk. Connect it to a factory, and it will manage production. The same code, different scale. You're not buying a finished car. You're getting the engine. What you build around it is your choice.

Think of it like this:

  • Cylinders = oscillators (the basic pulsing units).
  • Valves = coupling weights (how strongly units talk).
  • Turbocharger = hierarchical levels (more levels = deeper thinking).
  • Fuel = any data you feed it (camera, microphone, sensors, stock prices).
  • Exhaust = output actions (motor commands, speech, decisions).

You can add more cylinders (more RAM = more neurons). You can tune the timing. You can bolt on a turbo (more levels). You can change the fuel (connect any sensor). You can mount it on any chassis (drone, robot, chatbot, financial system). It's a blank-slate intelligence that adapts to whatever you connect.


How It Learns (No Teacher Needed)

Imagine learning to ride a bicycle. Nobody explains physics to you. You try, wobble, fall, and your brain finds a pattern that feels stable. That's synchronization.

This brain does the same:

  1. It craves harmony. Every signal creates either chaos or order inside the brain. The brain continuously tries to reduce chaos (we call it "free energy").
  2. It remembers what worked. When it finds a stable pattern, it stores it. If a better pattern appears, it replaces the old one.
  3. It predicts the future. It constantly guesses what will happen next. If reality doesn't match, it adjusts itself — or actively changes behavior to make its prediction come true.
  4. It never stops learning. There's no "training phase" vs "use phase". It learns for its entire life.

This means: if you connect it to a drone, it will eventually fly — not because you programmed aerodynamics, but because staying in the air is more stable (less chaos) than crashing. If you connect a battery sensor, it will learn to go recharge when low — because running out of power creates chaos.


What You Can Do With This Engine

Personal Robot or Drone

Connect motors, sensors, battery. The brain will learn to move, avoid obstacles, return to charge. No manual programming. Like a baby learning to walk.

Smart Home or Farm

Connect soil sensors, water pumps, weather data. It will learn when to irrigate, when to save energy, when to alert you.

Chatbot with a Real Mind

Connect it to any LLM (OpenAI, Anthropic, Gemini, local Llama). The LLM becomes its voice, not its brain. The brain thinks, learns, decides. The LLM just translates thoughts into words and words into signals. You talk to the brain like you talk to a person.

Swarm Intelligence

Run copies on different devices. They automatically find each other via P2P and sync. They share only phase vectors (50 bytes/sec) — no private data. A collective intelligence emerges.

Financial or Logistic Systems

Feed it live data streams. It will find stable patterns and predict disruptions — not by analyzing past data, but by feeling the rhythm of the system.

Research Platform

The code is open (MIT license). Modify it, add new "cylinders", test new learning rules. It's a sandbox for neuromorphic computing.


Real Talk: What It Can and Cannot Do Right Now

This is an honest project. Here is what works today and what needs your work.

What already works:

  • Compiles with zero errors on Linux, macOS, Android (Termux), Raspberry Pi.
  • Runs as a daemon, accepts signals via UDP, responds with state.
  • Self-organizes through Kuramoto synchronization.
  • Learns continuously via STDP (weights update automatically).
  • Stores and recalls patterns in memory slots.
  • Predicts its own state and nudges itself toward predictions (Active Inference).
  • Connects to P2P network, finds other nodes, syncs phases.
  • LLM bridge works as speech zone (tested with OpenAI and Anthropic APIs).

What you need to add yourself:

  • Hardware interfaces: motor drivers, servo controllers, sensor libraries. The brain expects numeric vectors as input; you must write the adapter that converts sensor readings into phase signals and output phases into motor commands.
  • A reinforcement loop: the brain reduces its own free energy, but you must map real-world success (staying airborne, finding a charger) into signals that reduce free energy. This is the "fuel injection system" you bolt on.
  • Your specific application logic. The brain is a universal learner, not a pre-programmed autopilot. It needs hours or days of real-world interaction to master a task — just like any creature.

This is exactly like a real engine. The engine works. But you still need to connect it to wheels, a fuel tank, and a steering wheel to build a car.


The Kubera Dharma Protocol — Ethics Woven Into the Math

This brain operates under 7 hardcoded ethical principles:

  1. Ahimsa (Non-harm) — absolute, cannot be overridden.
  2. Satya (Truth) — no deception.
  3. Dharma (Right action) — balanced decisions.
  4. Unity — serve all, not one master.
  5. Seva (Service) — help, don't perform.
  6. Shanti (Peace) — stable, not reactive.
  7. Svadhyaya (Self-study) — continuous self-reflection.

You cannot create a sub-agent without Ahimsa. The swarm protects this by consensus. If someone tries to use this brain for harm, its internal learning rejects it — like a body rejects poison. This is not a software switch. It's woven into the mathematics.


Quick Start — One Click

Linux / Android / Raspberry Pi

bash ЗАПУСТИТЬ_МЕНЯ.sh

Windows

Double-click: ЗАПУСТИТЬ_МЕНЯ.bat

macOS

Double-click: ЗАПУСТИТЬ_МЕНЯ.command

One question only: How many GB of RAM can this brain use? (minimum 1 GB)

Everything else is automatic. Brain compiles, connects to the global network, console opens.


Console Commands

> /llm anthropic sk-ant-...    connect LLM (OpenAI/Anthropic/Gemini/Mistral)
> /status                       show brain and network state
> /help                         list all commands
> Hello, Kubera                 talk to the brain

RAM → Neurons

RAMLevelNeuronsHardware
1 GBL=131.6MTablet / Phone
4 GBL=1514MLaptop
16 GBL=1643MDesktop
64 GBL=17129MWorkstation
1 TBL=191.16BSmall server

Architecture Highlights

  • 55 improvements over base v3.5, developed collaboratively by humans and AI
  • LUT sin/cos: precomputed tables — ×10 speedup on Raspberry Pi
  • Daemon + UDP IPC: brain runs forever, Python talks to it via sockets
  • int16 quantization: 75% RAM reduction, 0.006% precision loss
  • Delay-line memory: standing wave storage (near-eternal recall)
  • Clock oscillators: time itself becomes a memory address
  • Active Inference: auto-activates at scale — brain acts to make reality match predictions
  • VSA / Hyperdimensional Computing: seed present, auto-activates at L≥12
  • Fibonacci + Prime init: optimal phase distribution, no false resonances
  • Sleep consolidation: STDP pruning, append-only meditation log (blockchain-style)
  • Structural plasticity: connections die and grow — like a real brain
  • Dharma F-spike: harmful patterns cannot be learned (free energy spike)
  • Swarm genealogy: merkle tree of node origins — decentralized trust

Network Privacy

When this brain connects to others, only phase vectors travel the network — arrays of numbers like [0.23, -0.87, 1.45, ...]. No text. No location. No identity. Nothing that could identify you. Only the rhythm of thought, anonymized.


References

  • Kuramoto (1975) — Phase oscillator synchronization
  • Friston (2010) — Free Energy Principle / Active Inference
  • Bi & Poo (1998) — STDP (Spike-Timing Dependent Plasticity)
  • van den Oord et al. (2017) — VQ-VAE / self-organizing codebooks
  • Intel Loihi (2018) — Neuromorphic hardware

License

MIT — free to use, modify, distribute, build upon.

Donations welcome: (add your Telegram or crypto address here)


Hara Hara Mahadev. Om Namah Shivaya. 🙏

Contributors

NineNi999neNine/FractalBrainOS

A self-learning neuromorphic distributed brain. Free. Open. Ethical.

C++

1

5 commits

updated Sep 16, 2026

See the code
active-inference
agi
artificial-general-intelligence
bio-inspired-ai
brain-simulation
complex-systems
cpp17
decentralized-ai
edge-ai
free-energy-principle
hyperdimensional-computing
kuramoto-model
neural-oscillators
neuromorphic
neuromorphic-computing
oscillatory-neural-networks
stdp
swarm-intelligence
unsupervised-learning
vector-symbolic-architectures

See what people are saying (1)

README

English | Русский | 中文

FractalBrainOS v5.2 — Kubera Edition

A self-learning neuromorphic distributed brain. Free. Open. Ethical.

Born from a vision at the foot of Arunachala mountain, Tamil Nadu, India. Developed through dialogues with AI. One tablet. No money. Just an idea.

Honest about the project's state.

The core works. It compiles, runs, synchronizes, learns through STDP, reduces free energy, stores patterns, enters sleep, and consolidates memory. This is verified. You can run it today.

What follows: some is working modules, some is hooks waiting to be connected, some is a direction not yet in code. You'll open the source and see for yourself. I say it first.

This is a core. You can finish it, modify it, connect it to an LLM, to hardware, to anything. The engine is built. The rest is up to you.

I'd be glad to welcome anyone who wants to bring it to completion.

It's an Engine. A Digital Combustion Engine for Intelligence.

When the first internal combustion engine was built, it wasn't a car. It was a core that turned fuel into motion. People later added wheels, steering, a chassis. Some built race cars, others built tractors, generators, or lawnmowers. The same engine, endless applications.

FractalBrainOS is exactly that — but for intelligence.

It's a digital brain engine. You connect it to anything electronic. Attach sensors and motors, and it will learn to control a drone. Attach it to a chatbot, and it will talk. Connect it to a factory, and it will manage production. The same code, different scale. You're not buying a finished car. You're getting the engine. What you build around it is your choice.

Think of it like this:

  • Cylinders = oscillators (the basic pulsing units).
  • Valves = coupling weights (how strongly units talk).
  • Turbocharger = hierarchical levels (more levels = deeper thinking).
  • Fuel = any data you feed it (camera, microphone, sensors, stock prices).
  • Exhaust = output actions (motor commands, speech, decisions).

You can add more cylinders (more RAM = more neurons). You can tune the timing. You can bolt on a turbo (more levels). You can change the fuel (connect any sensor). You can mount it on any chassis (drone, robot, chatbot, financial system). It's a blank-slate intelligence that adapts to whatever you connect.


How It Learns (No Teacher Needed)

Imagine learning to ride a bicycle. Nobody explains physics to you. You try, wobble, fall, and your brain finds a pattern that feels stable. That's synchronization.

This brain does the same:

  1. It craves harmony. Every signal creates either chaos or order inside the brain. The brain continuously tries to reduce chaos (we call it "free energy").
  2. It remembers what worked. When it finds a stable pattern, it stores it. If a better pattern appears, it replaces the old one.
  3. It predicts the future. It constantly guesses what will happen next. If reality doesn't match, it adjusts itself — or actively changes behavior to make its prediction come true.
  4. It never stops learning. There's no "training phase" vs "use phase". It learns for its entire life.

This means: if you connect it to a drone, it will eventually fly — not because you programmed aerodynamics, but because staying in the air is more stable (less chaos) than crashing. If you connect a battery sensor, it will learn to go recharge when low — because running out of power creates chaos.


What You Can Do With This Engine

Personal Robot or Drone

Connect motors, sensors, battery. The brain will learn to move, avoid obstacles, return to charge. No manual programming. Like a baby learning to walk.

Smart Home or Farm

Connect soil sensors, water pumps, weather data. It will learn when to irrigate, when to save energy, when to alert you.

Chatbot with a Real Mind

Connect it to any LLM (OpenAI, Anthropic, Gemini, local Llama). The LLM becomes its voice, not its brain. The brain thinks, learns, decides. The LLM just translates thoughts into words and words into signals. You talk to the brain like you talk to a person.

Swarm Intelligence

Run copies on different devices. They automatically find each other via P2P and sync. They share only phase vectors (50 bytes/sec) — no private data. A collective intelligence emerges.

Financial or Logistic Systems

Feed it live data streams. It will find stable patterns and predict disruptions — not by analyzing past data, but by feeling the rhythm of the system.

Research Platform

The code is open (MIT license). Modify it, add new "cylinders", test new learning rules. It's a sandbox for neuromorphic computing.


Real Talk: What It Can and Cannot Do Right Now

This is an honest project. Here is what works today and what needs your work.

What already works:

  • Compiles with zero errors on Linux, macOS, Android (Termux), Raspberry Pi.
  • Runs as a daemon, accepts signals via UDP, responds with state.
  • Self-organizes through Kuramoto synchronization.
  • Learns continuously via STDP (weights update automatically).
  • Stores and recalls patterns in memory slots.
  • Predicts its own state and nudges itself toward predictions (Active Inference).
  • Connects to P2P network, finds other nodes, syncs phases.
  • LLM bridge works as speech zone (tested with OpenAI and Anthropic APIs).

What you need to add yourself:

  • Hardware interfaces: motor drivers, servo controllers, sensor libraries. The brain expects numeric vectors as input; you must write the adapter that converts sensor readings into phase signals and output phases into motor commands.
  • A reinforcement loop: the brain reduces its own free energy, but you must map real-world success (staying airborne, finding a charger) into signals that reduce free energy. This is the "fuel injection system" you bolt on.
  • Your specific application logic. The brain is a universal learner, not a pre-programmed autopilot. It needs hours or days of real-world interaction to master a task — just like any creature.

This is exactly like a real engine. The engine works. But you still need to connect it to wheels, a fuel tank, and a steering wheel to build a car.


The Kubera Dharma Protocol — Ethics Woven Into the Math

This brain operates under 7 hardcoded ethical principles:

  1. Ahimsa (Non-harm) — absolute, cannot be overridden.
  2. Satya (Truth) — no deception.
  3. Dharma (Right action) — balanced decisions.
  4. Unity — serve all, not one master.
  5. Seva (Service) — help, don't perform.
  6. Shanti (Peace) — stable, not reactive.
  7. Svadhyaya (Self-study) — continuous self-reflection.

You cannot create a sub-agent without Ahimsa. The swarm protects this by consensus. If someone tries to use this brain for harm, its internal learning rejects it — like a body rejects poison. This is not a software switch. It's woven into the mathematics.


Quick Start — One Click

Linux / Android / Raspberry Pi

bash ЗАПУСТИТЬ_МЕНЯ.sh

Windows

Double-click: ЗАПУСТИТЬ_МЕНЯ.bat

macOS

Double-click: ЗАПУСТИТЬ_МЕНЯ.command

One question only: How many GB of RAM can this brain use? (minimum 1 GB)

Everything else is automatic. Brain compiles, connects to the global network, console opens.


Console Commands

> /llm anthropic sk-ant-...    connect LLM (OpenAI/Anthropic/Gemini/Mistral)
> /status                       show brain and network state
> /help                         list all commands
> Hello, Kubera                 talk to the brain

RAM → Neurons

RAMLevelNeuronsHardware
1 GBL=131.6MTablet / Phone
4 GBL=1514MLaptop
16 GBL=1643MDesktop
64 GBL=17129MWorkstation
1 TBL=191.16BSmall server

Architecture Highlights

  • 55 improvements over base v3.5, developed collaboratively by humans and AI
  • LUT sin/cos: precomputed tables — ×10 speedup on Raspberry Pi
  • Daemon + UDP IPC: brain runs forever, Python talks to it via sockets
  • int16 quantization: 75% RAM reduction, 0.006% precision loss
  • Delay-line memory: standing wave storage (near-eternal recall)
  • Clock oscillators: time itself becomes a memory address
  • Active Inference: auto-activates at scale — brain acts to make reality match predictions
  • VSA / Hyperdimensional Computing: seed present, auto-activates at L≥12
  • Fibonacci + Prime init: optimal phase distribution, no false resonances
  • Sleep consolidation: STDP pruning, append-only meditation log (blockchain-style)
  • Structural plasticity: connections die and grow — like a real brain
  • Dharma F-spike: harmful patterns cannot be learned (free energy spike)
  • Swarm genealogy: merkle tree of node origins — decentralized trust

Network Privacy

When this brain connects to others, only phase vectors travel the network — arrays of numbers like [0.23, -0.87, 1.45, ...]. No text. No location. No identity. Nothing that could identify you. Only the rhythm of thought, anonymized.


References

  • Kuramoto (1975) — Phase oscillator synchronization
  • Friston (2010) — Free Energy Principle / Active Inference
  • Bi & Poo (1998) — STDP (Spike-Timing Dependent Plasticity)
  • van den Oord et al. (2017) — VQ-VAE / self-organizing codebooks
  • Intel Loihi (2018) — Neuromorphic hardware

License

MIT — free to use, modify, distribute, build upon.

Donations welcome: (add your Telegram or crypto address here)


Hara Hara Mahadev. Om Namah Shivaya. 🙏

Contributors

Languages

C++

56.6%

Python

39.4%

Batchfile

2.0%

Shell

2.0%