Daily.rubijn.net

Reading notes7 min read

usaciv: Karpathy had Claude draw the US as a Civilization map, and the lesson is in the structure

On November 26, 2026, Andrej Karpathy published a map of the United States in the style of the game Civilization, built by Claude from 31 public data sources. He reports seven hours of unattended work and 45,000 lines of code. The useful part is not the map but the structure that lets anyone check every number, which is what let more than 50 people adapt it to their own countries.

Source
usaciv, the live map · usaciv source archive (README, DATA_CONTRACTS.md, tests) · BigGo Finance, November 29, 2026 · EarthCiv, list of adaptations · Europe-Civilization · chinaciv · @thehypekevin, TikTok (code walkthrough)
Tags

The 48 contiguous states drawn as a hexagon strategy map: terrain, rivers, state names and city banners with their population

The usaciv map. Image: project archive, Andrej Karpathy (MIT license).

On November 26, 2026, Andrej Karpathy, an AI researcher known for his years at OpenAI and Tesla, posted on X a map of the United States drawn like a game of Civilization, the strategy game where you build an empire one tile at a time. The terrain, cities, roads and factories all come from 31 public data sources. Claude, Anthropic’s AI, downloaded, cleaned and assembled all of it. Karpathy reports seven hours of unattended work and 45,000 lines of code.

The map itself is not the interesting part. Claude organized the work so that every number on screen traces back to a public file, and a formatting error stops everything before it reaches the screen. That organization is what let more than 50 people publish the same map for their own countries the very next day.

The takeaway: when you hand an AI a long task that mixes several sources, the useful question is not only “does it work?” but “can I check where each number comes from?”

A strategy map drawn from real data

usaciv covers the 48 contiguous states, cut into hexagons with a 25 km radius, about 1,600 km² each. Each tile gets terrain that is computed, not invented. Elevation from NOAA, the US ocean and atmosphere agency, decides whether a tile is mountains, hills or flat land. Land cover measured by the USGS, the geological survey, decides what is on it: forest, crops, desert or city. A tile becomes urban when at least 30% of its land is built up, according to the code.

As in the game, cities show five yields: Food, Production, Gold, Science and Culture. Gold is GDP published by the BEA, the Bureau of Economic Analysis. The other four are job counts by industry, taken from a large Census Bureau survey.

Each city also gets a badge for its specialty, computed from job data published by the BLS, the Bureau of Labor Statistics. The calculation compares an industry’s share of a city’s jobs with its share nationwide: a city where software weighs far more than average becomes a “Tech city”, a car town a “Motor city”.

The rest follows the same logic. The 40 largest freight flows between states are drawn as trade routes. The 52 “wonders” are picked by published rules: the most-visited national parks, the universities that spend the most on research, and a set of landmarks. Power plants, mines, ports, airports, military bases, highways and railroads complete the picture. The project’s README calls it a visualizer, “not a game”.

What Karpathy reports, and what can be checked

According to his post on X, quoted by BigGo Finance on November 29, Karpathy used Claude Opus 5.5 in the Claude Code desktop app, at medium effort, with Ultracode turned on. According to a code walkthrough posted on TikTok by the creator @thehypekevin, that mode lets Claude write small programs that start other Claude agents in the background. An agent, here, is an AI that carries out a chain of actions on its own (download, write code, test it) instead of answering one question.

One piece of context matters when reading these figures. According to BigGo, Karpathy joined Anthropic in May 2026, on its pre-training research team. The demonstration therefore comes from an employee of the company whose product it shows off.

What can be checked is the code. Karpathy did not create a GitHub repository: the code is an archive linked from the map’s help screen, under the MIT license. We opened it on December 2, 2026 and counted 42,157 lines of Python and JavaScript, the same order of magnitude as the 45,000 lines reported. The seven hours cannot be checked: the archive holds neither the prompt, the written request to Claude, nor the session log. As of the same date, no independent check of the figures shown on the map had been published.

An example: a missing number is not a zero

Here is an illustration. An agency publishes job counts by industry and by county, but withholds the value for a small county to protect confidentiality, because only one company works there. A hasty program fills the blank with 0. The map then shows that county with no jobs at all in that industry, which is false, and nothing flags it.

usaciv follows the opposite rule, written in its README: “Missing data stays missing: it is null, never 0.” The cell stays empty, and the interface can say it does not know. Estimates are marked as estimates. That sounds minor, yet it is the kind of call an AI left alone for hours can get wrong without anyone noticing.

The structure that makes the result checkable

The check blocks badly formed data before it reaches the screen, but it does not say whether the data is right.

The code always follows the same path, which the README sums up as source, interim file, builder, site data.

One program per source. The sources folder holds 28 small programs, one per data publisher. Each downloads the raw files and turns them into a clean, readable file that knows nothing about the map. Swapping in another country’s data therefore means swapping these programs, without touching the rest.

One shared grid. “Builders” then place that data on the same hexagon grid, in an equal-area projection, which keeps every tile’s surface comparable from north to south. They run in the order of their dependencies.

A contract and a check that stop everything. The file DATA_CONTRACTS.md, 834 lines long, describes the shape of every file the browser reads: which fields, of which type. A check program goes over every file and marks each line PASS, NOTE, WARN or FAIL. A single FAIL stops the build. On top of that come 176 automated tests, which we counted in the archive.

The same calculation in two languages, pinned by a test. The grid is computed twice: in Python while the data is prepared, in JavaScript in the browser. The two languages do not round 2.5 the same way: Python gives 2, JavaScript 3. A point lying exactly on a hexagon’s edge could therefore land in one tile on one side and in its neighbor on the other. The Python code was aligned with JavaScript, and a test on fixed points forces the two to agree.

Every number traces to a file. For each download, the program keeps the address, the size, the date and a fingerprint of the file, a kind of signature that changes when the content changes. The map’s Almanac page shows that list.

Why others could adapt it to their countries

The EarthCiv project keeps a list of the adaptations: more than 60 maps of more than 50 countries and territories, most of them built by more than 50 people the day after the announcement, according to its authors’ GitHub searches on November 26 and 27. Europe-Civilization covers the European Union and its neighbors, reusing usaciv’s engine, rendering and interface and rebuilding the data. chinaciv does the same for China.

The MIT license allows that reuse. The structure makes it practical: since the sources are isolated and the contract states what the browser expects, the job comes down to producing files that meet it. The check points out at once whatever is missing.

What the check does not guarantee

The contract checks the shape of the data, not its accuracy. A file can have every field, each of the right type, and still put a city in the wrong county. The check says the data is well formed, not that it is true. What helps fix that kind of error is that every source and every rule is published, so the chain can be traced back.

The map also has known gaps. According to BigGo, Karpathy acknowledged that the model skipped a few states and territories; the article does not say which. The README lists Alaska and Hawaii insets among possible improvements, which confirms they are missing.

If you hand an agent a task that merges data

The usaciv structure carries over to other tasks. Here is what to ask for, depending on your situation.

  • If your data comes from several publishers: ask for one program per source, writing an interim file you can open. You can then replace one source without touching the rest.
  • If a number can be missing: require that it stays empty, never replaced by zero, and that estimates are marked.
  • If the task runs for a long time without you: ask first for a contract (which files, which fields) and a check that stops everything at the first failure, and only then for the result.
  • If the same calculation runs in two places: ask for a test on fixed cases that forces both versions to give the same answer.
  • If someone else needs to be able to check: ask for the list of downloads, with address, date and fingerprint.
  • If accuracy matters: plan a human spot check. An automated check of the shape does not replace it.

Written with the help of Claude.