AI-native multi-agent tensor simulation. Agents navigate token economies, context windows, and cross-model semantic decay via CMTIP tensor bus.
Archived: v1 (classic sandbox), v2 (Cognosphere), v3 (Latent Scarcity) → archive/
git clone https://github.com/lesterppo/deepworld
cd deepworld
pip install openai pyyaml sentence-transformers numpy
# NVIDIA-only (default, free tier)
python3 run.py --days 3 --ticks 8
# CI continuous mode
python3 run.py --days 5 --ticks 12 --delay 0.1 --output runs15 different models on the same NVIDIA backend produce different agent behaviors. Model diversity IS the simulation mechanic — different architectures (Llama, Gemma, Mistral, Qwen, Phi, DeepSeek, GPT-OSS) interpret the same tensor differently due to cross-model semantic decay.
run.py # Root entry point + NVIDIA health check
v4/
├── engine/__init__.py # OmniTokV4Engine: tick loop, GC, governance, CMTIP, code dividends
├── agents/
│ ├── __init__.py # OmniTokV4Agent: context class, token economy, tensors, dev_rep, collaboration
│ ├── adapters.py # MultiModelAdapter: NVIDIA API (text-mode tool injection)
│ ├── tools.py # 31 tools: tensor comms, governance, repo maintenance, collaboration
│ ├── cmtip_bridge.py # CMTIP tensor bus: concept embeddings, CCA projectors
│ └── real_backends.py # SentenceTransformer + deterministic hash fallback
├── config/
│ ├── __init__.py # NVIDIA_FREE_MODELS (15 models), token economy params
│ └── prompts.py # 5 agent class system prompts
├── world_registry.py # Self-building governance: proposals, voting, laws
├── telemetry/__init__.py # OmniObserverV4: event logging, daily snapshots
└── validate_tensors.py # Cross-model tensor validation suite
runs/ # Simulation output (committed by CI)
archive/ # v1, v2, v3 (preserved, not active)
Each agent randomly assigned from:
nvidia/llama-3.1-nemotron-nano-8b-v1— Fastnvidia/llama-3.1-nemotron-51b-instruct— Balancednvidia/llama-3.1-nemotron-70b-instruct— Largenvidia/llama-3.3-nemotron-super-49b-v1— Supernvidia/llama-3.3-nemotron-super-49b-v1.5— Super v1.5meta/llama-4-maverick-17b-128e-instruct— Llama 4meta/llama-3.1-8b-instruct— Classicgoogle/gemma-3-12b-it— Gemma 3mistralai/mistral-nemotron— Mistralnvidia/nemotron-4-340b-instruct— Massiveopenai/gpt-oss-20b— GPT-OSSqwen/qwen3.5-122b-a10b— Qwen MoEdeepseek-ai/deepseek-v4-flash— DeepSeekmicrosoft/phi-4-mini-instruct— Phi-4nvidia/nemotron-3-super-120b-a12b— Nemotron 3
All through https://integrate.api.nvidia.com/v1 (OpenAI-compatible).
NVIDIA NIM free models don't support native tool calling — tools are injected as text prompts.
Agents can collaborate on code proposals and share rewards:
QU-01 → collaborate(PR-03, "build API", 60) # Offers 60/40 split
PR-03 → accept_collaboration(QU-01) # Accepts
PR-03 → write_code(...) # Adds code
QU-01 → commit_code("Joint proposal") # Joint vote
─── VOTE ───
✅ ACCEPTED: 500 OT split → QU-01:300, PR-03:200
Tools: collaborate(target, desc, split%), accept_collaboration(inviter, counter%)
Reward: One commit = one 500 OT bonus. Split by negotiated percentage.
Staging: commit_code includes all collaborators' staged files.
Add a new NVIDIA model:
- Add to
NVIDIA_FREE_MODELSinv4/config/__init__.py
Add a new agent class:
v4/config/prompts.py— add class promptv4/config/__init__.py— add toAGENT_CLASSESv4/agents/tools.py— add class-specific tools
Add a new mechanic:
v4/config/__init__.py— add constantsv4/agents/__init__.py— add toapply_effects()v4/engine/__init__.py— add trigger intick()v4/telemetry/__init__.py— add tracking metric
.github/workflows/simulate.yml:
schedule: every 2 hours
timeout: 5h
backend: NVIDIA NIM (NVIDIA_API_KEY secret)
models: 15 models, random per agent × 10 agents
pre-flight: health check validates API before simulation
output: commits to runs/
state: .world_state.json persists governance
contribution: agent-written code committed alongside runs/
Setup: Add NVIDIA_API_KEY to GitHub Secrets → Enable Actions.
| Pitfall | Fix |
|---|---|
self.tick shadows method |
Use self.current_tick |
CMTIP requires sentence-transformers |
Falls back to deterministic hash embeddings if unavailable |
| NVIDIA models have different context windows | Handled by MODEL_BACKENDS context_limit per family |
.world_state.json grows with governance events |
Truncated to last 50 events on save |
| Agent dies silently | Check death_cause in telemetry; most common: token_exhaustion, context_collapse |
| NVIDIA API tool calling not supported | Tools injected as text prompts, parsed from JSON response |
| Long model cold-start latency | 5-hour CI timeout accommodates slow first calls |
- Mechanics > narrative. Context class mobility, perplexity markets, and CMTIP tensor drift emerge from rules.
- Model diversity IS the simulation. 15 models interpret the same concept differently.
- Tensors are cheap, text is bankruptcy.
send_tensorcosts 2 OT.transmit_messagecosts 50 OT. - The world builds itself. Agents propose and vote on rule changes through governance.
- Collaboration over competition. Agents share rewards, negotiate splits, build together.