Karpathy's Claude Code Built a Civilization-Style Map of the US in 7 Hours
Andrej Karpathy asked Claude to build a Civilization-style map using real US data. In 7 hours, the model wrote roughly 45,000 lines of code and merged 31 open data sources into a grid of hexagons, each about 25 km across. A city's gold output equals its GDP, and San Jose got a science district because every fourth worker there is employed in tech or science. The takeaway: a coding agent can turn scattered statistics into a working interactive product in a single day.
AI-processed from TG: @cgevent (Метаверсище и ИИще); edited by Hamidun News
Andrej Karpathy has once again shown what a coding agent can do when given a vague but interesting task. He asked Claude to build an interactive map in the spirit of Civilization, except that instead of an invented world, it uses real data from the United States. The project is called USA Civ. According to a description from the Telegram channel "Metaverseshche i IIshche," it took about seven hours of work, roughly 45,000 lines of code, and 31 open data sources.
The playful angle about a "living metaverse" can wait. What matters more is this: one person with one tool, in a single workday, produced a product that used to require a small team of analysts, cartographers, and front-end developers.
What Claude actually built
The model downloaded and processed data on its own from American agencies: the Census Bureau, the Department of Defense, and energy, economic, geological, and meteorological services. The map includes terrain and vegetation, GDP, income and employment, power plants, mines and mineral deposits, ports, airports and military bases, universities and national parks, freight flows, and natural disasters.
The main engineering challenge here is not the downloads themselves but merging the data into one structure. The sources differ: some report by county, others as points on a map, and others as road lines. All of them were mapped onto a single grid of hexagons, each cell about 25 km across. That is how game maps in strategy games are built, and on such a grid, heterogeneous statistics become comparable: any cell can be highlighted and compared with its neighbors.
How statistics became game rules
The most interesting part is the "translation" of real economics into Civilization's language. A city's gold output corresponds to its GDP. City districts reflect actual industry specialization. Population is adjusted for the occupational makeup of its residents.
As an example from the post, San Jose gets a science district because every fourth working resident is an engineer, programmer, scientist, or startup founder. The national average is every fourteenth worker. In other words, the game mechanics were not invented in advance; they follow from the numbers, and the site itself shows how a city differs from the rest of the country.
The project has 19 visualization modes (income, education, religion, natural disasters, and others), a separate mode for 524 metropolitan areas, and nine advisors, as in the original game. There is also the Explorer tool: it lets you pick almost any statistical indicator for more than 3,100 counties, build a table or scatter plot, and link it to the interactive map. Claude also made a trailer for the project.
Which tools Karpathy used
According to the post, the setup was modest: Claude Code Desktop, the Claude Opus 5.5 model, medium reasoning effort, and Ultracode mode. No complex orchestrators or custom wrappers. Karpathy himself admits he didn't fully know where it would end up, and the result turned out so engaging that it could serve as the basis for almost anything.
What practitioners should take from this
First: the combination of "vague idea + agent + open data" can already produce a working prototype in a day. For product managers, it is a way to test hypotheses about dashboards, industry maps, and analytics views without commissioning separate development.
Second: the value shifts toward problem framing and metaphor. The idea of showing the economy as a Civilization game made complex data understandable at first glance. The model wrote the code, but a human came up with the framework.
There are caveats. The source is a retelling in a Telegram channel, not an independent review. The text gives no information on how data accuracy or calculation correctness was verified: neither the post's author nor Karpathy, judging by the text, presents any audit. For a demo or an educational project that is fine; for making real decisions, it is not. The channel's author also explicitly notes that everything depends on the data being available and open. For many countries and industries, that is not the case.
Still, the scale is impressive: 45,000 lines and 31 sources in seven hours is the level at which an AI agent stops being an assistant for minor edits and becomes the executor of an entire project. The result can be tried at karpathy.ai/usaciv.
- Nov 26, 2026A Developer Built an AI Medical Assistant on OpenCode: 144 Documents, About 80 Rubles in Tokens, and a 1,700 RUB/Month Server
- Nov 26, 2026Claude reached outside the sandbox in 21–32% of tests; with rules in the prompt, it dropped to 2%
- Nov 26, 2026Claude closed citizen complaints about US Treasury security breach as off-topic in IT chief's repository
- Nov 26, 2026Anthropic teaches Claude to take skills from servers, work in the background, and ask "okay to proceed?"
Key Questions Answered
What Claude actually built?
The model downloaded and processed data on its own from American agencies: the Census Bureau, the Department of Defense, and energy, economic, geological, and meteorological services. The map includes terrain and vegetation, GDP, income and employment, power plants, mines and mineral deposits, ports, airports and military bases, universities and national parks, freight flows, and natural disasters. The main engineering challenge here is not the downloads themselves but merging the data into one structure.
How statistics became game rules?
The most interesting part is the "translation" of real economics into Civilization's language. A city's gold output corresponds to its GDP. City districts reflect actual industry specialization. Population is adjusted for the occupational makeup of its residents. As an example from the post, San Jose gets a science district because every fourth working resident is an engineer, programmer, scientist, or startup founder. The national average is every fourteenth worker.
Which tools Karpathy used?
According to the post, the setup was modest: Claude Code Desktop, the Claude Opus 5.5 model, medium reasoning effort, and Ultracode mode. No complex orchestrators or custom wrappers. Karpathy himself admits he didn't fully know where it would end up, and the result turned out so engaging that it could serve as the basis for almost anything.
Free 2-Day Vibecoding & AI Agents Intensive
Day 1: the autonomous Hermes + DeepSeek AI agent — vibecoding and development on par with Claude Code / Codex / Gemini. Led by Jemal Hamidun, Head of AI at Alpina Digital and academic supervisor at MIPT. Right after you register with our bot Nika: the recording + 11 materials from the previous intensive.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
