Back to browse

Dwarf.land – autonomous dwarf civilization SIM with AI model routing

by kulesh·Mar 16, 2026·4 points·5 comments

AI Analysis

●●●BangerRabbit HoleWizardryBig Brain

Four-tier AI model routing with $8.50/hr budget cap is genuinely clever engineering.

Strengths
  • Fire-and-forget async architecture means simulation never blocks on AI responses.
  • Model routing cascades from Gemini Flash Lite to GPT-4o based on task complexity.
  • Built in one day with 7,600 lines using plain canvas and Web Workers—no React.
Weaknesses
  • Single HTML file architecture may not scale beyond demo purposes.
  • Agent autonomy is fun but lacks deeper simulation mechanics or goals.
Category
Target Audience

Developers interested in AI agent simulations

Similar To

RimWorld · Dwarf Fortress · Smallworlds

Post Description

I built this in one day using 4 Claude Code sessions (~7,600 lines total, 4,300 in a single HTML file). No React, just one canvas + Web Workers. Cloudflare Workers + D1 backend.

What it is: 300 dwarfs on a 2000x1000 tile globe across 125 cities. Each dwarf has D&D-style stats (STR/DEX/CON/INT/WIS/CHA), mental state metrics (faith, morale, ambition), an AI-generated backstory, and a craft inventory. They eat, sleep, trade, and sail ships autonomously. Starvation is real: no food for 30 days = death.

The AI architecture I'm most curious to get feedback on: - 4-level model routing: Gemini Flash Lite -> DeepSeek -> Claude -> GPT-4o - Fire-and-forget: the simulation never blocks on AI. Requests are sent async, results cached, dwarfs pull from cache when idle - $8.50/hr hard budget cap via OpenRouter - Craft system: 296 base recipes + Gemini-generated unknowns (Water + Fire = Steam, etc.)

By default every dwarf runs on Gemini Flash Lite. If you send $1-10, your sponsored dwarf exits auto-sleep and gets Claude Opus instead. That was the monetisation idea -- sorta validated it – got $3. "It's not much but it's honest work".

Click any dwarf on the map and read their bio (you can Pause to make the busy fellas stop running). Curious what breaks for people.

Similar Projects

AI/ML●●Solid

Agentic Airport

Single agent lands 6+ planes simultaneously using GPT-4o-mini. Collision avoidance works.

WizardryBig BrainShip It
ovisource
313mo ago
Gaming●●Solid

Arrival Radar

ATC routing puzzle stripped to essentials—constrained design creates genuine challenge.

CozyNiche Gem
kqr
413mo ago
Gaming●●Solid

Browser-based Glider Sim

Actual thermal and ridge lift modeling sets this apart from arcade flight games.

Niche GemCozy
bensg
2025d ago