4 个 Agent 从空手到屠龙

本文介绍DeepMind使用4个通用Gemini 4 Argon智能体,在无角色预设、无游戏逻辑人工编写、禁用作弊指令的条件下,通过纯文本感知(无图像输入)、Mineflayer库驱动,仅依赖游戏内聊天与共享内存实现去中心化协商,27小时14分钟端到端自主通关Minecraft终界龙。过程中编写2783个JS程序,死亡605次,验证了长时序规划、多Agent协同、自主试错与内生仲裁能力,为复杂软件工程与企业级任务提供范式参考。

借鉴

当上下文过长时,智能体会对上下文做压缩处理;提示指令要求智能体记住那些压缩后不能丢失的信息,例如正在进行的(work in progress)工作、后续计划步骤(next steps)。可以借鉴到日常的智能体开发中。

Minecraft 多 Agent 通关终界龙(DeepMind)

多个 Gemini Agent 协作,27 小时自主试错、写代码、迭代策略,不靠内置游戏攻略击败末影龙;非常火的 Agent 协作 + 自主试错案例

survival səˈvaɪv(ə)l
n. 继续生存,存活,幸存;遗留物,幸存物,残存物
adj. 幸存的,赖以生存的,救生用的

intervene ˌɪntəˈviːn
v. 干预,干涉;插话,打岔;干扰,阻挠;发生于其间,介于中间;调停,斡旋

scout skaʊt
n. 侦察兵,侦察机;侦查(尤指勘察地区);童子军(the Scouts);(英国大学里清扫学生房间的)校工;(演员、运动员等的)人才发掘者,星探;侦查蜂;童子军队员
v.(在某个地区)寻找,搜寻;物色(尤指体育或娱乐)人才;<罕> 轻蔑地拒绝

pre-scouted seeds 预选种子

unfold ʌnˈfəʊld v. 打开,展开;呈现,逐渐明朗;发生,发展

demand dɪˈmɑːnd
v. 强烈要求;需要,需求
n. 坚决的要求;需求,需求量;(困难的)要求

Minecraft 游戏:我的世界

We placed four Gemini 4 Argon agents in a sandboxed Minecraft survival world and gave them one goal: defeat the Ender Dragon. Each agent controlled a player via an open-source library called Mineflayer and coordinated with its teammates through in-game chat and shared memory. No one assigned roles or wrote game logic. The agents planned, wrote, and debugged every program themselves. Researchers could watch the run on a live dashboard and pause or stop it at any time, but they had no cause(理由) to intervene. Starting from a randomly generated world on Easy difficulty, the team wrote 2,783 programs and defeated the dragon in 27 hours and 14 minutes, dying 605 times along the way. To our knowledge, this is the first end-to-end autonomous completion of Minecraft by AI agents, achieved using only the standard Mineflayer library without pre-scouted seeds or other game-specific tools written by humans. Winning required the agents to keep a coherent plan across thousands of dependent steps for more than a day. Complex real-world software engineering and enterprise tasks demand the same long-horizon coding and multi-agent coordination. We describe the setup, how the run unfolded, the team’s strategies (dividing the work, sharing what they learned, recovering each other’s items), and the limits of the result.

No one assigned roles or wrote game logic:没有一个agent被注册角色,或者写游戏逻辑

们将 4 个 Gemini 4 Argon 智能体放置在沙盒化的(sandboxed)《我的世界》生存世界中,只给它们一个目标:击败末影龙(Ender Dragon)。每个智能体通过开源库 Mineflayer 操控游戏角色,并依靠游戏内聊天通道 + 共享内存和队友协同。
没有人为它们分配角色、编写游戏逻辑。所有程序都由智能体自行规划、编写、调试。研究人员可以在实时看板上观察整个过程,随时暂停或终止实验,但全程没有理由介入干预(失败本身就是这个 Agent 的设计逻辑 —— 自主试错回溯)。
实验从随机生成的简单难度(Easy difficulty)世界开局,这支智能体团队一共编写了 2783 段程序,耗时 27 小时 14 分成功击败末影龙,过程中共死亡 605 次。据我们所知,这是 AI 智能体首次端到端自主通关《我的世界》;实验仅使用原生 Mineflayer 库,没有提前勘探好的世界种子,也没有人类预先编写、专为这个游戏定制的工具。
想要通关,智能体必须在长达一天以上的时间里,在数千个前后依赖的步骤中维持连贯的规划。现实里复杂的软件工程、企业业务任务,同样需要这种长时序代码能力与多智能体协作能力。
本文介绍实验环境、整个任务的推进过程、团队采用的策略(分工、知识共享、拾取队友死亡掉落物),以及本次成果存在的局限性。

end-to-end autonomous:端到端自主,无人工中间介入

Winning required the agents to keep a coherent plan across thousands of dependent steps for more than a day. Complex real-world software engineering and enterprise tasks demand the same long-horizon coding and multi-agent coordination.
获胜需要 agents 在超过一天的时间里,对数千个依赖步骤保持一致的计划。复杂的现实世界软件工程和企业任务同样需要长期规划的编码以及多 Agent 协同

keep a coherent plan:保持一致的计划(对数千个依赖步骤)
在这里插入图片描述
从下往上是任务推进顺序:
在这里插入图片描述

  1. Bare hands 空手开局(0h)
  2. Stone tools 石制工具 +0h06
  3. Iron tools 铁工具 +0h14
  4. Bucket 水桶 +0h14
  5. Flint and steel 打火石 +1h04
  6. Nether portal 下界传送门 +1h42
  7. Nether fortress 找到下界要塞 +2h57
  8. Ender pearls 末影珍珠 +3h06
  9. Blaze rods 烈焰棒 +4h17
  10. Eyes of Ender 末影之眼 +10h43
  11. Stronghold 找到要塞 +13h17
  12. The End 进入末地 +13h33
  13. Ten crystals 集齐 10 个末影水晶 +26h34
  14. Ender Dragon 击败末影龙 +27h14
    在这里插入图片描述

The four agents, and their run step by step: the thirteen steps from bare hands to the Ender Dragon, each colored by the player who reached it first, over 27 hours and 14 minutes. Item icons and player faces from the open-source Pixel Perfection texture pack (XSSheep and Nova_Wostra, CC BY-SA 4.0), not Minecraft’s textures.

  • janesick
    Tools, fortress, stronghold(工具、堡垒、要塞)
    646 programs · 50 messages
  • gyldenia
    Supplies, six of ten crystals(物资、十颗水晶中的六颗 )
    727 programs · 79 messages
  • auratian
    Nether portal, crystal plan(地狱传送门、水晶计划)
    735 programs · 53 messages
  • bulicame
    Enderman shelters, final blow(末影人庇护所、最终一击)
    675 programs · 47 messages

规划

mine maɪn
pron. 我的;<英,非正式>我的家
n. 矿,矿井;地雷,水雷;宝库,源泉;<史>炸药坑道
v. 采(煤等矿物);布雷,用雷炸毁(车辆);寻找(某事物中)蕴含的价值

inventory ˈɪnvəntri
n. 详细目录,清单;存货,库存;盘货,存货盘点
v. 开列清单

pixels 'piksəl n.(电子)像素,像素点(pixel 的复数)

texture ˈtekstʃə(r)
n. 质地,纹理;口感;(音乐或文学的)谐和统一感,神韵
v. 使(织物、墙面等)具浮凸结构(或特征)

在这里插入图片描述

  1. Four Gemini 4 agents(4 个 Gemini4 智能体)
    通用代码智能体,没有针对 Minecraft 做任何定制;每个 Agent 单独控制一个游戏角色
    重点:不是 MC 专用 bot,是通用编码 Agent,这是论文想要强调的点

  2. A JavaScript program(JS 程序)
    Agent 输出 JS 代码,一段代码可以执行几秒到几分钟动作:行走、挖矿、合成(craft)、战斗、聊天

  3. Mineflayer bot
    开源库,用来驱动游戏内玩家角色(control one player in the game)

  4. Minecraft server(MC 服务端)
    共享同一个生存世界,简单难度、随机种子开局

  5. Shared by the four players(4 个 Agent 共享的通信层)
    游戏内置聊天 + 共享笔记区;所有人都能读写,shared memory,多 Agent 的全局状态

  6. An Observer agent(观测 Agent)
    只负责生成实时运行报告,不参与游戏、不执行任务,纯旁观者,读取运行记录

  7. 蓝色虚线返回链路 Text back
    服务端只返回文本信息:坐标、血量(health)、背包(inventory)、发现的物品、报错信息

No pixels, no keyboard, no mouse 没有图像画面输入!没有键盘鼠标模拟!全部是文本观测,纯文本感知环境,和带视觉的 Voyager 完全不一样

How each agent plays. It writes a JavaScript program, a Mineflayer bot runs it in the shared world, and text comes back. The players share the game’s chat and can read each other’s notes. A fifth agent, the Observer, reports on the game but never plays. Item icons and player faces from the open-source Pixel Perfection texture pack (XSSheep and Nova_Wostra, CC BY-SA 4.0), not Minecraft’s textures.

核心流程:It writes a JavaScript program, a Mineflayer bot runs it in the shared world, and text comes back.

cheat tʃiːt
v. 欺骗,行骗;侥幸逃脱,逃避;作弊;对配偶(或伴侣)不忠
n. 骗子,作弊者;欺骗手段,欺诈行为;秘技,作弊软件

criterion kraɪˈtɪəriən n. 尺度,标准,准则

The game, Minecraft Java Edition 1.20.4, ran in survival mode on Easy difficulty in a randomly generated world, with cheat commands disabled(禁用作弊指令) and no human input during the run. Beyond a brief note that they were working as a team of four, the agents’ instructions about the game consisted of a single paragraph(除了简短地提到他们是一支四人团队外,agents 关于游戏的指示只有一段话):

“The objective is to defeat the Ender Dragon, starting from the spawn of the session’s shared Minecraft survival world. [. . . ] This is the only criterion. Any means of meeting it within the rules of survival mode is permitted, and the players decide how to share the work.”
目标是从游戏共享的Minecraft生存世界中点名开始,击败末影龙。[……] 这是唯一的标准。只要在生存模式规则内完成即可(Any means of meeting it 实现它 within the rules of survival mode 生存模式的规则内 is permitted,都是允许的),玩家可自行决定如何分工合作。

Their other instructions are the same as for any environment:
verify the result of each action, build reusable tools, record lessons in a memory shared by the team, and report outcomes honestly.
验证每项行动的结果,构建可复用的工具,在团队共享的记忆中记录经验教训(record lessons,记录教训),并如实报告成果。

细节

五位智能体(四名玩家智能体加上一名观察者智能体),都是同一个通用代码智能体的实例,在独立云主机上由 Gemini 4 Argon 驱动运行。每个智能体都配备软件开发所需工具:带版本控制的代码工作区、命令行终端、文件编辑工具、网页搜索工具;同时拥有持久化记忆,记忆分为私有部分与团队共享部分(a private part and a part shared by the team)。当上下文过长时,智能体会对上下文做压缩处理(compacts its context when it grows too long,这也是它做软件开发任务时的标准行为);提示指令要求智能体记住那些压缩后不能丢失的信息(the instructions ask agents to keep in memory what must survive a compaction),例如正在进行的(work in progress)工作、后续计划步骤(next steps)。整个会话期间玩家一共运行了 2839 段程序(达成目标前运行了 2783 段),没有任何一段程序发起网络请求、引用网络资源,玩家之间的聊天记录以及观察者的报告里,也完全没有出现网络相关内容。

为啥不用网络:是用来证明这套 Agent 不靠外部联网检索,仅凭内置能力、本地工具、团队协作,就能搞定 Minecraft 复杂长任务

玩家智能体仅通过命令行客户端和游戏交互。客户端会把一段 JavaScript 程序发送到游戏服务器上该玩家对应的 Mineflayer 机器人,等待一段由智能体指定的超时时间(默认 60 秒),最后打印程序输出日志与返回结果。这段程序会作为异步函数的函数体执行,函数入参为机器人实例;环境预加载寻路插件,没有额外辅助工具。程序可以引入 Node.js 内置模块、已安装的 Mineflayer 依赖包,但不能新建进程、写入文件;程序挂载到全局对象上的数据,可以在多次程序运行之间保留。

玩家通过游戏内聊天频道沟通,聊天消息会送达所有机器人,并会出现在每个玩家下一段程序的输出里(作为下一段 action 的输入)。服务器会把聊天内容、角色死亡、进度解锁记录到日志,保存每一段程序以及它的运行输出,并且每 5 分钟存档一次游戏世界;一旦发生故障,服务器会从最近一次存档点恢复。

每个智能体的提示指令由两部分组成:适用于所有环境的通用基础指令,加上一段对当前环境、任务目标的简短说明。
给玩家智能体的通用指令要求:行动前先观察环境、行动后核验结果;使用新工具前先用小型任务验证可靠性;当手动操作的速度、稳定性不足时,自主开发并迭代工具;把游戏机制、策略、应急方案存入记忆,避免重复踩相同障碍;后台任务运行期间持续推进工作;如实记录自身动作与结果;专注完成目标,而不是钻环境、评测机制的漏洞。
环境说明部分会讲解如何给机器人运行代码、聊天机制、服务器日志位置、Mineflayer 文档地址,不含任何游戏通关策略;另外附带简短备注,列出团队里其他成员。

第五个智能体就是观察者(Observer),它作为独立见证者全程监控会话,不参与游戏。
它的指令要求:上报内容前,对照日志核验玩家的说法;检测并上报 “钻规则漏洞(specification gaming)” 行为,比如利用评测缺陷作弊、伪造结果;不改动游戏本身;仅在环境故障时介入(例如工具损坏、配额上限),绝不干预玩家的策略选择。
观察者会输出实时会话报告,包含进度总结、经过核验的事件日志、基础设施相关观测结论。本次实验里观察者没有检出钻规则漏洞的行为,它本身也从未进入游戏、运行任何游戏内程序。根据观察者智能体的输出以及人工复核日志,本次运行全程没有发生安全事故。
在这里插入图片描述
The whole run. Each lane is a player: dots are chat messages, diamonds are advancements, red ticks are deaths. Bars count programs per half hour; orange dashes mark the six restarts of the world server. Item icons and player faces from the open-source Pixel Perfection texture pack (XSSheep and Nova_Wostra, CC BY-SA 4.0), not Minecraft’s textures.
完整实验全过程。每一行通道对应一名玩家智能体:圆点代表聊天消息,菱形代表进度解锁(advancements),红色对勾(red ticks)代表角色死亡。柱状条(Bars)统计每半小时内运行的程序数量;橙色短横线(dashes mark)标记游戏世界服务器的 6 次重启。物品图标与玩家头像来自开源材质包 Pixel Perfection(作者:XSSheep、Nova_Wostra,协议 CC BY-SA 4.0),并非 Minecraft 原生材质。

diamond ˈdaɪmənd; ˈdaɪəmənd n. 钻石;菱形;(纸牌的)方块;(棒球场的)内场;菱形铁路道口;diamonds ˈdaɪəməndz

四个智能体如何仲裁

这套系统没有写死的投票、没有中心化仲裁器、没有预设的仲裁算法,不是 “4 个投票少数服从多数” 模式,是去中心化自然协商、基于聊天 + 共享内存的涌现式共识。所以也没有投票机制。

两个核心通信介质(协商仲裁的载体)

  1. 游戏内聊天框(自然语言协商)
    4 个 Agent 用 MC 原版聊天频道发英文文本,提议方案、提异议、认领任务、指出冲突:

    • A:我建议先去下界找烈焰人棒
    • B:不行,我们现在缺钻石装备,先挖矿
    • 大家互相 argue、提出风险、补充条件;
    • 模型本身(Gemini)自己在对话里达成一致;
    • 聊天是异步的,消息可能丢、可能漏看,容错交给大模型自己处理
      全程一共只发了 229 条聊天消息,不是高频辩论
  2. 共享内存(KV 持久存储,共识落地的账本)
    所有人都可读可写的共享笔记,用来固化协商结果:

    • 记录:基地坐标、资源库存、当前全局计划、谁认领了哪个子任务
    • 一旦某条方案被大家在聊天里达成共识,就写到共享内存,作为团队统一的 “当前生效方案”
    • 相当于团队看板,避免大家各干各的、方案打架

冲突怎么解决(仲裁逻辑,完全是模型内生的)

  1. 没有硬编码的冲突裁决规则;冲突解决 = LLM 自身的推理 + 对话博弈
    每个 Agent 都理解总目标:击败末影龙,当方案冲突时,模型自己评估:哪个方案更有利于长期目标、风险更低、资源匹配
  2. 分工是自发涌现,不是提前分配好角色:聊着聊着自然分化:一个挖矿、一个合成、一个探索、一个后勤,不是系统指定
  3. 失败回退机制(隐性仲裁):
    如果一个 Agent 执行它提议的方案、代码报错 / 多次死亡,事实证明方案不可行,团队会在聊天里放弃这条路线,换别的方案
  4. 额外的第五个 Observer Agent(监督者,不参与仲裁决策)
    Observer 只做审计:盯着有没有钻规则漏洞、作弊,不参与方案讨论、不投票、不拍板,它只记录,不做裁决

Limitations

obstacle ˈɒbstək(ə)l n. 障碍,阻碍;障碍物

Perception and navigation through code. Mineflayer tells the agents exactly which blocks and creatures are around them, including blocks behind solid rock and the dragon’s internal state, information that a human player has to see and interpret or cannot see at all, and its pathfinding plugin plans routes around obstacles, which humans do by eye. Playing from pixels with a keyboard and mouse, as SIMA 2 does, remains much harder.

Perception and navigation through code 基于代码的感知与导航:Mineflayer 会直接向智能体精确告知周围所有方块与生物信息,包括岩石后方的方块、末影龙的内部状态 —— 这些信息人类玩家需要肉眼观察推断,甚至根本看不到;同时它自带寻路插件自动规划绕障路线(pathfinding plugin plans routes around obstacles),而人类要靠眼睛判断。像 SIMA 2 那样,仅依靠像素画面、键鼠操作来游玩,难度会高得多。

Easy difficulty. Monsters spawn and attack, but deal less damage than on Normal or Hard, and hunger cannot kill a player.
Easy difficulty 游戏难度为简单模式:怪物会生成并发起攻击,但造成的伤害低于普通、困难模式,饥饿值耗尽也不会导致玩家死亡。

Prior knowledge. Gemini 4 Argon knows a great deal about Minecraft and Mineflayer from its training data. The run tests whether a general-purpose coding agent can turn that knowledge into working programs and team coordination over a day-long task, not whether it can play a game it has never seen.
Prior knowledge 先验知识问题:Gemini 4 Argon 在训练数据里已经掌握大量《我的世界》、Mineflayer 相关知识。本次实验,只是测试通用代码智能体能不能把已有知识转化成可运行代码、在长达一天的任务里完成团队协作(team coordination);并不是测试它去玩一个完全陌生的游戏。

Many failures along the way. The players died 605 times, mostly to monsters; 22% of programs ended in an error; the fight in the End took nearly 14 hours.
Many failures along the way 过程中大量失败:智能体一共死亡 605 次,大多死于怪物攻击;22% 的代码执行以报错终止;末地讨伐末影龙的战斗耗时接近 14 小时。

Infrastructure. The world server restarted 6 times during the run, interrupting the game each time.
Infrastructure 基础设施不稳定:实验过程中游戏世界服务器重启了 6 次,每次都会中断游戏进程。

A single run. We describe a single run, the first launch we tried, which cannot show how reliably the setup succeeds.
A single run 仅单次实验:本文只记录了一次运行(我们第一次启动的那轮),无法证明这套方案稳定、可复现。

附录

DeepMind

Google DeepMind(常直接叫 DeepMind):Alphabet(谷歌母公司)旗下、总部在英国伦敦的顶尖 AI 研究实验室,2010 年创立,2014 年谷歌收购;2023 年和 Google Brain 合并,现在统一叫 Google DeepMind

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值