知衡· 来源· @XgXg47735 · X·· 56 分钟前同新闻AI 评分82
同一新闻,精选展示《Karpathy 用 Claude Code 和 Opus 5.5 基于真实数据构建游戏地图》
正文
Karpathy 刚发了一段 30 秒的录屏:整个美国,被做成了一张《文明》风格的策略游戏地图。
地图不是美术画的,上面的数字来自公开数据。按 @karpathy 自己的说法,他让 Claude(Opus 5.5)去下载、解析一大堆公开数据,跑了 7 个小时、写了 4.5 万行代码,最后跑通了。用的还是他的普通个人订阅。
视频里能看到这几层:
- 地形:每个六边形格子按真实海拔和地表覆盖上色,角落标着 NOAA、USGS 的数据出处
- 城市:每座城下面挂着人口、收入中位数、增长率,纽约都会区那一栏写着 2.44 万亿美元 GDP、2010 万人
- 滤镜:一共 19 种,可以按收入、学历、人口密度给整张地图换色
- 贸易路线:州际货运量最大的 40 条线,排第一的是纽约到波士顿,一年 619 亿美元
- 点开圣何塞,侧边弹出面板:当地每 4 个上班的人里就有 1 个是工程师、程序员或科学家,全美是每 14 个里 1 个
片尾一行字:31 个公开数据源,每个数字都能追溯。
比起游戏本身,更值得抄的是他派给 AI 的这个活儿的形状:目标好玩,数据公开,结果对不对一眼就能看出来。哪座城人口离谱了,地图上马上露馅,AI 闷头跑 7 个小时也有个靶子。
这就像让实习生去做一个沙盘,规定每块地皮都得贴上出处标签,他就不太敢瞎编。
想自己试的话,先从一个州、三四个数据源开始,让 AI 在每个数字旁边标上出处,再挑几个你熟悉的地方对一对。
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 查看被引用的帖子
来源:知衡 · x.com