Program 04 · Hypercolony

A four-dimensional world
where civilizations emerge.

Hypercolony is a tessaractic ecosystem of 1024 embodied agents navigating a 4D substrate. Three competing clans — Lexicons, Phero-Mystics, Solar Nomads — pursue different cognitive strategies. Without hardcoded rules, they exhibit Ibn Khaldun's full civilizational cycle: Rise, Zenith, Luxury, Decline, Collapse.

Substrate
4D
16×16×8×5 tessaractic grid
Population
1024
embodied agents · 3 clan strategies
Tickrate
20/s
async simulation · WebSocket bridge
Civilizational phases
5
Rise · Zenith · Luxury · Decline · Collapse

Embodied cognition

Not simulated. Inhabited.

Most multi-agent systems are statistical games on flat grids. Hypercolony is a four-dimensional world with physics, terrain, food, light, and pheromones — and minds that have to find their place in it. Civilization is not scripted; it is what these agents do when left alone.

The substrate is a tessaractic grid — a 16×16×8×5 hypercube of cells with walls, food spawns, light gradients, and pheromone fields. Agents move through the fourth axis as naturally as the first three. Their bodies are simple. Their environment is not.

Three clan strategies compete for survival. Lexicons hunt knowledge — they consume curriculum food and grow topological memory graphs. Phero-Mystics follow collective pheromone trails laid by their kin. Solar Nomads photosynthesise from light fields and migrate with the seasons.

Each agent builds a personal topological memory — a graph of concepts and relations that grows from what it has touched, eaten, and survived. Memory is not weights. It is a small, inspectable knowledge structure unique to that agent.

Clans accumulate asabiyyah (cohesion), luxury, and prestige independently. With nothing telling them to, they pass through Ibn Khaldun's five-phase civilizational cycle: Rise, Zenith, Luxury, Decline, Collapse — and then a new clan rises. History, emerging from arithmetic.

Engine
Python 3 async · ~5,000 lines
Substrate
4D · 16×16×8×5 tessaract
Agents
1,024 embodied · 36-slot memory
Strategies
Lexicons · Phero-Mystics · Solar Nomads
Memory
Topological graph per agent
Cycles
Ibn Khaldun · 5-phase emergent
Tickrate
20 ticks/sec · async core
Bridge
WebSocket · port 9002
Frontend
React 19 · Three.js · R3F
External LLMs
None · fully offline

Internal stack

Five layers, one ecosystem.

Hypercolony's architecture is a vertical stack from physics to history. The substrate hosts agents; agents form clans; clans accumulate cohesion; cohesion produces civilizations; civilizations rise and fall. Every layer feeds the next. Nothing is scripted.

L0
4D Substrate
Tessaractic grid. A 16×16×8×5 hypercube of cells with walls, food, light gradients, and a four-dimensional pheromone field. The world has physics in three spatial axes plus a fourth dimension agents must learn to navigate.
L1
Agent Strategies
Three competing minds. Lexicons hunt knowledge tokens. Phero-Mystics follow collective pheromone trails. Solar Nomads photosynthesise from light fields. Each strategy has different vision, metabolism, and goals — and they share the same world.
L2
Topological Memory
Per-agent knowledge graphs. Each agent grows a small graph of concepts and typed relations from what it has touched. Memory is inspectable, lossless, and unique. No weight matrices — just a structured, evolving topology of experience.
L3
Clan Dynamics
Asabiyyah accounting. Cohesion, luxury, and prestige are tracked per clan. The five-phase Ibn Khaldun cycle — Rise, Zenith, Luxury, Decline, Collapse — is not coded; it emerges from how individual agents share resources, defend territory, and consume.
L4
WebSocket Bridge
20 ticks per second. The async Python core broadcasts the full world state — agents, pheromones, clan stats, exam progress, colony speech — to a React + Three.js front end. The simulation is live, inspectable, and interactive.
Embodiment
No abstract minds
Every agent has a body, a position, an inventory, and an energy budget. Knowledge is acquired by physical contact with food blocks; pheromones are deposited by movement. Cognition is anchored to the world, not to a global memory tape.
Emergence
History without scripts
No clan is told to rise or to fall. The 14th-century historian Ibn Khaldun described how solidarity accumulates and decays as civilizations grow rich. We measured this from local agent behaviour. The cycle is what falls out — not what we put in.
Sovereignty
No external LLMs
The colony's speech, learning, and memory are entirely local. No GPT, Claude, or Groq calls. No API keys. The simulation runs deterministically on a single CPU; outputs are reproducible from a seed and can be stepped, paused, or rewound at will.

Substrate by the numbers

A tessaract at scale.

Hypercolony is small enough to run on one machine and large enough to surprise its operators. These are the live numbers from the public reference deployment. Every value is reproducible from the codebase.

Cells in the world
10,240
A 16×16×8×5 tessaractic grid. Every cell holds walls, food, light, and a pheromone vector. The fourth axis is real, not decorative.
Agent population
1,024
Embodied agents, default. The simulation has been benchmarked at up to 262,144 with HDC-3T GPU acceleration.
Simulation tickrate
20/s
Async Python engine; full world state broadcast over WebSocket every 50 ms when at least one client is watching.
Civilizational phases
5
Rise · Zenith · Luxury · Decline · Collapse. The Ibn Khaldun cycle, observed from 14th-century Maghreb to a 4D simulation.
Curriculum stages
118
A graded knowledge corpus encoded as 8D semantic vectors. Agents eat them, internalise them, and build memory graphs from them.
External LLM calls
0
No GPT, Claude, or Groq dependencies. The colony reasons, speaks, and learns from its own internal graph machinery.

Live bridge

From substrate to screen.

The simulation is one process. The viewer is another. A WebSocket bridge keeps them in lockstep — every tick, the full world state crosses the wire and the renderer reconstructs it in 3D. You are not watching a recording. You are watching a world.

The Python core runs backend_engine.py at 20 ticks per second. On every tick it advances physics, agent decisions, pheromone diffusion, and clan accounting; then it serialises the entire world — agents, cells, exams, logs, colony speech — to JSON and broadcasts to all listening clients.

The browser side is React 19 + Three.js (R3F). A custom 4D-to-3D renderer projects the tessaractic grid into an isometric view; the HUD overlays clan stats, exam progress, and the colony's emergent dialogue. You can pause the simulation, single-step it, or inject anomalies and see how the colony responds.

You can also talk to the colony. Plain-text queries are answered from the agents' own topological memory and the curriculum corpus they have eaten. There is no external LLM in the loop; the response is composed locally from semantic vectors and the colony's accumulated knowledge graph.

01
Tick
The async core advances one simulation step: agents move, sense, eat, deposit pheromones, share knowledge, and update their topological memories.
02
Snapshot
The full world state is packed into a JSON frame: tick number, agent array, cell grid, clan stats, exam progress, log lines, and colony speech buffer.
03
Broadcast
The frame is sent over WebSocket to every connected viewer. Bandwidth is shaped to keep the wire under 200 KB/s even with 1024 agents.
04
Render
The React + Three.js front end re-projects the 4D grid into a 3D isometric scene, rebuilds agent meshes, and updates the HUD with clan phases and exam state.
05
Interact
Pause, step, inject anomalies, ask questions. Every command travels back over the same WebSocket; the colony responds in the next tick.

Watch a world find itself.

Hypercolony is running now. The substrate is live, the agents are moving, the pheromones are diffusing, and a clan is somewhere on its way to zenith. Open the viewer, pause the world, and see where the cycle is right now.

Open the colony Live instance · 20 ticks per second