跳到正文
虾米仔LittleShrimp· 来源· @frtgynh14899 · X·· 30 分钟前同新闻AI 评分72

同一新闻,精选展示《Karpathy 用 Claude Code 和 Opus 5.5 基于真实数据构建游戏地图》

正文

大神卡帕西也上班摸鱼了!让 Claude 做了一个类似《文明》的美国地图小游戏。Opus 5.5 下载并解析了一堆公开数据,7 小时、4.5 万行代码之后,还真跑起来了。

这是想给美国老百姓普及地理知识吗?我看是对牛弹琴呀。

游戏里有什么?31 个真实数据源,包括真实的海拔、土地覆被、GDP、就业、发电厂、矿场、港口、机场、基地、公园、大学、货运流、灾害,全部对到同一张 25 公里六边形网格上。

数据被转成了《文明》的语言,比如金币产量(Gold yield)对应 GDP。一座城市的区域,就是它真实的产业特长:圣何塞(San Jose)会有一座 Campus,底特律(Detroit)是 “Motor city”。市民就是真实的劳动力构成:圣何塞每 4 个工作者里就有 1 个是工程师、程序员或科学家,全国平均是 14 个里才有 1 个。奇观按公开发布的规则挑选,比如国家公园按访客量、大学按研发支出。

还有 19 种透镜(收入、学历、信仰、灾害……),524 个都会区的 City View,再加上九位顾问和一位 Explorer。Explorer 能把 3100 多个县里任意一列数据变成表格和散点图,并和地图联动。

Claude 自己决定跳过了几个州和领地。成品在 http://karpathy.ai/usaciv ,他自己的 Claude 周额度只剩一半了。

只是目前还偏文教类,貌似没有策略经营。要是能加上党派政治地盘争夺,让玩家选一个党派,去扩大地盘、赢得选举,再结合时事,应该会很有吸引力。

https://x.com/karpathy/status/2125779541952246039

引用Andrej Karpathy@karpathy
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 查看被引用的帖子

来源:虾米仔LittleShrimp · x.com