kelvin· 来源· @kelvin2070156 · X·· 4 天前同新闻AI 评分70
同一新闻,精选展示《Karpathy 用 Claude Code 和 Opus 5.5 基于真实数据构建游戏地图》
正文
Andrej Karpathy让Claude用美国真实数据,填一张文明风格的地图。Opus 5.5拉了一批公开数据,大约7小时、4.5万行代码之后,它能跑了。
长帖里写得很细:31个数据源,包括人口普查、BEA、BLS、能源、气象、地质和联邦应急等,全部对到25公里的六边形网格上。游戏语言是翻译出来的,比如黄金产量对应GDP;圣何塞会拿到校园区,底特律是「汽车城」;圣何塞每4个劳动力里约有1个是工程师、程序员或科学家,全国大约是1/14。地图有19种透镜、524个都会的城市视图,还能按3100多个县做表和散点图。Claude自己决定跳过了部分州和领地。演示在http://karpathy.ai/usaciv/,问号里有源码链接。他用的是Claude Code桌面版、Opus 5.5中档并打开了ultracode,还说每周额度只用剩一半,得别人接着做。
这是个人实验,不是官方游戏,也不是一份经过政府核验的数据产品。但能打开、能点,已经比多数演示扎实。
https://x.com/karpathy/status/2125779541952246039
https://karpathy.ai/usaciv/
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 查看被引用的帖子
来源:kelvin · x.com