# 乌姆帕斯世界

**乌姆帕斯世界**（Wumpus World）是人工智能教学与研究中使用的一个基于网格的洞穴环境。在该环境中，智能体必须探索一个部分可观测的 4 × 4 房间网格，找到一堆金子，并在不被无底洞或一种名为乌姆帕斯的怪物杀死的情况下逃出洞穴。它由迈克尔·吉内塞雷斯（Michael Genesereth）提出，并因被斯图尔特·罗素（Stuart Russell）和[彼得·诺维格](https://www.edgepedia.org/zh/peter-norvig)（Peter Norvig）的教科书《人工智能：一种现代方法》用作贯穿全书的示例而广为人知。<sup>[1](https://cis.temple.edu/~ingargio/cis587/readings/wumpus.shtml)</sup><sup> • </sup><sup>[2](https://thuvien.utm.edu.vn/ktpm/ths/10..pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 网格 | 一个由 16 个房间组成的 4 × 4 网格，四周有墙；智能体从方格 [1,1] 出发，面朝右方<sup>[2](https://thuvien.utm.edu.vn/ktpm/ths/10..pdf)</sup><sup> • </sup><sup>[3](https://www.geeksforgeeks.org/machine-learning/ai-the-wumpus-world-description/)</sup> |
| 危险与目标 | 一只乌姆帕斯、三个无底洞和一堆金子，随机放置在起始方格以外的任意方格中<sup>[3](https://www.geeksforgeeks.org/machine-learning/ai-the-wumpus-world-description/)</sup><sup> • </sup><sup>[4](https://www.researchgate.net/publication/402934710_Interpreting_Deep_Q-Networks_A_Rule-Based_Comparison_with_First-Order_Logic_in_Wumpus_World)</sup> |
| 感知 | 一个五分量向量：臭味、微风、闪光、碰撞、尖叫<sup>[5](https://www.cis.temple.edu/~giorgio/cis587/readings/wumpus.shtml)</sup> |
| 动作 | 前进、右转、左转、射箭、抓取、放下、爬出；智能体只有一支箭<sup>[5](https://www.cis.temple.edu/~giorgio/cis587/readings/wumpus.shtml)</sup> |
| 计分 | 带着金子爬出得 +1000，掉入洞中或被吃掉得 −1000，每个动作 −1，使用箭 −10<sup>[2](https://thuvien.utm.edu.vn/ktpm/ths/10..pdf)</sup> |
| 环境类别 | 部分可观测、序贯，转移模型完全已知<sup>[6](https://crystal.uta.edu/~gonzalez/ai/CSE-5360-06.html)</sup> |
| 公平性 | 约 21% 的随机实例完全不公平，金子位于洞中或被洞包围<sup>[6](https://crystal.uta.edu/~gonzalez/ai/CSE-5360-06.html)</sup> |

## 环境与规则

乌姆帕斯世界是一个由通道连接的房间组成的洞穴。洞穴某处潜伏着乌姆帕斯，这头野兽会吃掉任何进入其房间的人。智能体可以射杀它，但只有一支箭，箭沿智能体面朝的方向直线飞行，直到击中乌姆帕斯或被墙壁吸收。有些房间设有无底洞，任何误入其中的人都会被困住，但乌姆帕斯除外，因为它太大而掉不进去。智能体若进入有洞的方格或活乌姆帕斯所在的方格便会死亡；进入有死乌姆帕斯的方格是安全的，但气味难闻。<sup>[2](https://thuvien.utm.edu.vn/ktpm/ths/10..pdf)</sup><sup> • </sup><sup>[5](https://www.cis.temple.edu/~giorgio/cis587/readings/wumpus.shtml)</sup>

智能体仅通过当前方格的局部感官线索来感知世界：若乌姆帕斯在该方格或相邻方格中，则感知到臭味；若相邻方格有洞，则感知到微风；若金子就在该方格中，则感知到闪光；若智能体前进时撞到墙壁，则感知到碰撞；若乌姆帕斯在洞穴中任何地方被杀死，则感知到尖叫。相邻指北、南、东、西四个方格，不包括对角线。<sup>[5](https://www.cis.temple.edu/~giorgio/cis587/readings/wumpus.shtml)</sup><sup> • </sup><sup>[3](https://www.geeksforgeeks.org/machine-learning/ai-the-wumpus-world-description/)</sup>

游戏在智能体死亡或爬出洞穴时结束；爬出动作仅在起始方格有效。目标是捡起金子并带着它爬出，且在原始设定中还要杀死乌姆帕斯。<sup>[2](https://thuvien.utm.edu.vn/ktpm/ths/10..pdf)</sup><sup> • </sup><sup>[5](https://www.cis.temple.edu/~giorgio/cis587/readings/wumpus.shtml)</sup>

## 为何它是推理的测试

该环境被刻意设计成记忆动作序列无法奏效。由于乌姆帕斯、洞和金子位置在每个实例中随机选取，智能体必须在整个环境类别上平均表现良好，而非仅在一个世界中表现良好。<sup>[2](https://thuvien.utm.edu.vn/ktpm/ths/10..pdf)</sup> 状态仅部分可观测：智能体自身位置、乌姆帕斯的健康状况以及箭的可用性是可感知的，但洞和乌姆帕斯的位置是状态中未被观测且不可改变的部分，智能体必须推断它们。然而，转移模型完全已知，因此智能体可以通过对其感知进行逻辑推理，逐步完善对世界的认识。<sup>[6](https://crystal.uta.edu/~gonzalez/ai/CSE-5360-06.html)</sup>

推理双向进行。诸如“相邻方格中有乌姆帕斯会使此方格发臭”的因果规则支持从世界状态到感知的基于模型的推理，而诸如“此处有臭味意味着乌姆帕斯在此处或相邻处”的诊断规则支持从感知回到世界的推理。在大多数实例中，智能体能安全取回金子；在其他实例中，它必须在空手而归与冒死一搏之间做出选择，而在约 21% 的实例中，不死亡就无法拿到金子。<sup>[5](https://www.cis.temple.edu/~giorgio/cis587/readings/wumpus.shtml)</sup><sup> • </sup><sup>[6](https://crystal.uta.edu/~gonzalez/ai/CSE-5360-06.html)</sup>

## 形式化处理

由于世界很小且完全明确，它可作为形式化知识表示的标准载体。天普大学 CIS587 课程材料用它来介绍情境演算——其中状态是诸如 Result(Forward, S0) 的项——以及[框架问题](https://www.edgepedia.org/zh/frame-problem)，即动作改变世界时哪些事实保持不变的问题；针对 Holding 和 At 等谓词，写出了效果公理、框架公理和后继状态公理。<sup>[5](https://www.cis.temple.edu/~giorgio/cis587/readings/wumpus.shtml)</sup> 一项较新的研究在 Flora-2 知识表示语言中实现了框架与一阶逻辑解决方案，将场景扩展为“冒险版本”，包含多个乌姆帕斯和多个金子房间，只有当所有可达的安全房间都被发现时游戏才结束。<sup>[7](https://www.sciencedirect.com/science/article/pii/S095741742300218X)</sup> IndiGolog 初步报告则使用 8 × 8 矩形网格而非经典的 4 × 4。<sup>[8](https://www.researchgate.net/publication/209622041_The_Wumpus_World_in_IndiGolog_A_Preliminary_Report_NRAC-2005)</sup>

## 实现与现代应用

该世界仍是常见的练习与沙盒。拉里·霍尔德（Larry Holder）的 wumpus-world-simulator 用 C++ 实现罗素与诺维格的游戏，并配有 Python 封装，让学生编写每回合接收感知并返回动作的智能体。<sup>[9](https://github.com/holderlb/wumpus-world-simulator)</sup> 一个基于 Unity 的 C# 项目在同一游戏上比较智能体架构，包括基本的基于规则的系统、有限状态机、[行为树](https://www.edgepedia.org/zh/behavior-tree)、使用 SWI-Prolog 的基于 Prolog 的逻辑智能体，以及一个将智能体当前世界知识发送给大型语言模型 API 以做决策的实验性智能体。<sup>[10](https://github.com/lapeyrade/WumpusWorld/blob/main/README.md)</sup> 研究者还将深度强化学习应用于该环境，包括深度 Q 网络智能体，并将从此类智能体中提取的规则集与一阶逻辑解决方案进行比较。<sup>[4](https://www.researchgate.net/publication/402934710_Interpreting_Deep_Q-Networks_A_Rule-Based_Comparison_with_First-Order_Logic_in_Wumpus_World)</sup>

该环境的教学作用是展示在部分可观测、序贯设定中从简单反应行为到目标导向规划、逻辑演绎和强化学习的进展，这就是它出现在《人工智能：一种现代方法》关于逻辑智能体的各章中的原因。<sup>[11](https://deepwiki.com/victoruccetina/inteligencia-artificial/4-agents-and-the-wumpus-world)</sup><sup> • </sup><sup>[2](https://thuvien.utm.edu.vn/ktpm/ths/10..pdf)</sup>

## References

1. [CIS587: The Wumpus World, Temple University](https://cis.temple.edu/~ingargio/cis587/readings/wumpus.shtml)
2. [Artificial Intelligence: A Modern Approach, Global Edition, 4th ed., Section 7.2](https://thuvien.utm.edu.vn/ktpm/ths/10..pdf)
3. [The Wumpus World Description - AI, GeeksforGeeks](https://www.geeksforgeeks.org/machine-learning/ai-the-wumpus-world-description/)
4. [Interpreting Deep Q-Networks: A Rule-Based Comparison with First-Order Logic in Wumpus World](https://www.researchgate.net/publication/402934710_Interpreting_Deep_Q-Networks_A_Rule-Based_Comparison_with_First-Order_Logic_in_Wumpus_World)
5. [CIS587: The Wumpus World (full text), Temple University](https://www.cis.temple.edu/~giorgio/cis587/readings/wumpus.shtml)
6. [Logical Agents, CSE 5360, University of Texas at Arlington](https://crystal.uta.edu/~gonzalez/ai/CSE-5360-06.html)
7. [A frame and first-order logic solution for the Wumpus World: Implemented in Flora-2, Expert Systems with Applications](https://www.sciencedirect.com/science/article/pii/S095741742300218X)
8. [The Wumpus World in IndiGolog: A Preliminary Report (NRAC-2005)](https://www.researchgate.net/publication/209622041_The_Wumpus_World_in_IndiGolog_A_Preliminary_Report_NRAC-2005)
9. [wumpus-world-simulator, Larry Holder, GitHub](https://github.com/holderlb/wumpus-world-simulator)
10. [WumpusWorld Agent AI Playground, GitHub](https://github.com/lapeyrade/WumpusWorld/blob/main/README.md)
11. [Agents and the Wumpus World, DeepWiki](https://deepwiki.com/victoruccetina/inteligencia-artificial/4-agents-and-the-wumpus-world)

---
*Initially written Oct 21, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/wumpus-world

English original: https://www.edgepedia.org/wumpus-world
