Laosun· 来源· @lzuren2001 · X·· 51 分钟前同新闻AI 评分75
同一新闻,精选展示《Karpathy 用 Claude Code 和 Opus 5.5 基于真实数据构建游戏地图》
正文
Karpathy 让 Claude 把美国的真实数据铺成一张《文明》风格的地图:Opus 5.5 跑了 7 个小时、写了 4.5 万行代码,推理档位开的是 medium。做完他自己说:“I don't exactly know where I was going with this”。【搬运拆解】
原帖里写明的几件事:
- 数据:31 个公开来源,包括人口普查局、BEA、BLS、EIA、NOAA、USGS、FEMA、CDC 等,全部对齐到同一张 25 公里的六边形网格上
- 换成游戏语言:金币产出就是 GDP;城市的区按真实产业分,圣何塞是学院区,底特律是“汽车城”;奇观按公开规则挑,国家公园看游客数,大学看研发经费
- 规模:19 种视图(收入、学历、信仰、灾害等),524 个都市区的城市视图,3,100 多个县的任意一列都能拉成表格和散点图,和地图联动
- 工具:Claude Code 桌面版,Opus 5.5 medium,打开 ultracode;预告片也是 Claude 做的
他自己写的两处边界:有几个州和领地,Claude 自己决定跳过了;他这周的 Claude 额度只剩一半,得换别人接着做。
地图部署在 http://karpathy.ai/usaciv,页面上能下载源码压缩包。 https://x.com/karpathy/status/2125779541952246039
I asked Claude to populate a Civilization-style game map with real data from the US. Opus 5.5 downloaded and parse a ton of public data and 7 hours and 45K lines of code later... it works :) - 31 real data sources including Census, BEA, BLS, EIA, NOAA, USGS, DoD, NPS, FAA, FEMA, CDC... - Real elevation, land cover, GDP, jobs, power plants, mines, ports, airports, bases, parks, universities, freight flows, disasters; all reconciled onto one 25 km hex grid. - The data is converted into Civilization language, e.g. Gold yield is GDP. A city's districts are its real industry specializations: San Jose gets a Campus, Detroit is "Motor city". Its citizens are its real workforce: 1 in 4 San Jose workers are engineers, coders or scientists, against 1 in 14 nationally. Wonders are chosen by published rules, such as national parks by visitor numbers and universities by R&D spending, etc etc. - 19 lenses (income, degrees, faith, disasters…), a City View for 524 metros, and nine advisors plus an Explorer. The Explorer turns any column for any of 3,100+ counties into a table and scatter plot, linked to the map. - Claude decided to skip a few states and territories sry - Built using Claude Code desktop app, Opus 5.5 on medium and turning on ultracode. It's deployed here: https://karpathy.ai/usaciv/ and the "?" has the source link too. I don't exactly know where I was going with this but it's really fun to browse and play with. Possibly it can be expanded or built into a game. I only have half of my weekly Claude quote left though so someone else will have to take over :D. Claude also made a trailer:在 X 查看被引用的帖子
来源:Laosun · x.com