# 电子游戏中的人工智能

**电子游戏中的人工智能**（Artificial intelligence in video games）是指运用算法在游戏中生成具有响应性、适应性或智能化的行为，主要体现在非玩家角色（NPC）以及寻路、难度控制、内容生成等游戏系统之中。

| 关键事实 | 详情 |
|---|---|
| 定义 | 在NPC和游戏系统中创造智能行为的技术与算法，包括决策、寻路、行为树、有限状态机和学习系统<sup>[1](https://aiingames.com/en/glossary/)</sup> |
| 最早有记录的游戏AI | 1940年的“Nimatron”，与人类玩家对弈尼姆游戏<sup>[2](https://easychair.org/publications/preprint/pS9z/open)</sup><sup> • </sup><sup>[25](https://www.computerhistory.org/timeline/1951/)</sup> |
| 里程碑式街机AI | 《吃豆人》（Pac-Man，1980）使用具有个体性格的有限状态幽灵AI；《吃豆人小姐》（Ms. Pac-Man，1982）加入随机性以提高难度<sup>[3](https://www.lemonde.fr/en/pixels/article/2024/04/10/a-short-history-of-artificial-intelligence-in-video-games-from-pac-man-to-dragon-s-dogma-2_6667935_13.html)</sup> |
| 研究里程碑 | AlphaStar在《星际争霸II》中达到宗师级别，排名高于99.8%的活跃战网玩家<sup>[4](https://deepmind.google/blog/alphastar-grandmaster-level-in-starcraft-ii-using-multi-agent-reinforcement-learning/)</sup> |
| 电竞里程碑 | OpenAI Five经过10个月的自对弈训练，于2019年4月13日击败《Dota 2》世界冠军战队OG<sup>[5](https://openai.com/index/dota-2-with-large-scale-deep-reinforcement-learning/)</sup> |
| 行业采用 | 2024年，31%的受访开发者个人使用过生成式AI；2025年发布的Steam游戏中，每5款就有1款披露使用了生成式AI<sup>[6](https://www.pcgamer.com/31-of-game-developers-already-use-generative-ai/)</sup><sup> • </sup><sup>[7](https://www.tomshardware.com/video-games/pc-gaming/1-in-5-steam-games-released-in-2025-use-generative-ai-up-nearly-700-percent-year-on-year-7-818-titles-disclose-genai-asset-usage-7-percent-of-entire-steam-library)</sup> |
| 开发者情绪 | 2026年GDC调查中，52%的受访者认为生成式AI对游戏行业不利，高于前一年的30%<sup>[8](https://www.pcgamer.com/gaming-industry/more-than-half-of-game-developers-now-think-generative-ai-is-bad-for-the-industry-a-dramatic-increase-from-just-2-years-ago-id-rather-quit-the-industry-than-use-generative-ai/)</sup> |

## 游戏AI的含义

游戏AI不同于学术研究实验室所研究的人工智能。学术AI旨在最优地解决问题，在现有信息下找到最佳答案；而游戏AI的构建目标是娱乐性、可信度和低成本运行，在叙事是设计的一部分时，黑箱方案是可以接受的。<sup>[9](https://www.cs.hmc.edu/MyCS/vg_and_ai.pdf)</sup>大多数流行的商业游戏使用脚本化的非玩家角色，而游戏AI在历史上几乎从不将学习作为其组成部分之一，部分原因是学术成果并非以生产级游戏为背景来构建和测试的。<sup>[10](https://nn.cs.utexas.edu/downloads/papers/karpov.aitr05.pdf)</sup>

NPC的AI质量直接影响玩家的沉浸感，因为角色需要以可信且符合情境的方式行动。<sup>[1](https://aiingames.com/en/glossary/)</sup>

## 核心技术

**有限状态机**用模型描述NPC如何根据玩家行为和分配给每种行为的持续时间，在有限数量的状态之间迁移。《吃豆人》的四只幽灵以这种方式在中立、攻击和躲避三种角色之间切换，并在其上叠加个体性格：红色幽灵是不知疲倦的猎手，而粉色幽灵则擅长伏击。<sup>[3](https://www.lemonde.fr/en/pixels/article/2024/04/10/a-short-history-of-artificial-intelligence-in-video-games-from-pac-man-to-dragon-s-dogma-2_6667935_13.html)</sup>

**行为树**成为AAA游戏AI的行业标准，因为它们模块化——子树可跨NPC类型复用——可扩展，且表达力足以支持复杂的多步骤行为。每次更新时，遍历从树的根节点开始，经过选择器和序列节点，直到确定合适的行为；该技术通过Bungie的《光环2》（Halo 2，2004）获得广泛关注。<sup>[3](https://www.lemonde.fr/en/pixels/article/2024/04/10/a-short-history-of-artificial-intelligence-in-video-games-from-pac-man-to-dragon-s-dogma-2_6667935_13.html)</sup><sup> • </sup><sup>[11](https://abratabia.com/game-ai-npc/what-is-game-ai.php)</sup>

**规划与导航系统**处理移动和决策。2005年《F.E.A.R.》引入的目标导向行动规划让NPC能以不同方式达成同一目标，而非仅仅对玩家做出反应；《[模拟人生](https://www.edgepedia.org/zh/the-sims)》（The Sims）中使用的“信念-欲望-意图”模型则按屏幕上角色表达的需求来排定优先级。导航网格是一类改善了3D世界中敌人移动的AI结构，它决定了更细微的反应，如寻找掩体和侧翼包抄。<sup>[3](https://www.lemonde.fr/en/pixels/article/2024/04/10/a-short-history-of-artificial-intelligence-in-video-games-from-pac-man-to-dragon-s-dogma-2_6667935_13.html)</sup>A*寻路算法出现在大多数电子游戏中。<sup>[12](https://ubibliorum.ubi.pt/bitstream/10400.6/5517/1/3443_6881.pdf)</sup>

**导演式AI**调节体验本身。《[求生之路](https://www.edgepedia.org/zh/left-4-dead)》（Left 4 Dead，2008）的编程方式就像导演指导演员：它根据玩家的状况和表现决定每个区域随机出现多少僵尸，还控制治疗补给和弹药的出现。<sup>[3](https://www.lemonde.fr/en/pixels/article/2024/04/10/a-short-history-of-artificial-intelligence-in-video-games-from-pac-man-to-dragon-s-dogma-2_6667935_13.html)</sup>

## 历史

AI从一开始就与游戏相关联。有记录的最早游戏人工智能应用是1951年的“Nimatron”，让玩家在尼姆游戏中与机器对弈；该学科的名称和原理于1956年在[达特茅斯学院](https://www.edgepedia.org/zh/dartmouth-college)的研讨会上确立，其中宣称的目标之一就是创造一个国际象棋棋手。<sup>[2](https://easychair.org/publications/preprint/pS9z/open)</sup><sup> • </sup><sup>[3](https://www.lemonde.fr/en/pixels/article/2024/04/10/a-short-history-of-artificial-intelligence-in-video-games-from-pac-man-to-dragon-s-dogma-2_6667935_13.html)</sup>公众首次接触游戏AI是在街机游戏的黄金时代：《[太空侵略者](https://www.edgepedia.org/zh/space-invaders)》（Space Invaders，1978）普及了难度递增、移动模式各异的AI对手，尽管其外星人并不对玩家行为做出反应。<sup>[13](https://pocketmags.com/eu/maximum-pc-magazine/february-2025/articles/the-evolution-of-video-game-ai)</sup>

1970年代和1980年代，《乓》（Pong）和《太空侵略者》带来了AI控制的对手，《太空侵略者》的敌人会根据玩家的行为朝玩家射击。<sup>[14](https://lutpub.lut.fi/bitstream/handle/10024/170271/bachelorsthesis_salek_md_peash_been.pdf?isAllowed=y&sequence=1)</sup>随后，《吃豆人》（1980）和《吃豆人小姐》（1982）确立了有性格、可调校的对手这一范式。<sup>[3](https://www.lemonde.fr/en/pixels/article/2024/04/10/a-short-history-of-artificial-intelligence-in-video-games-from-pac-man-to-dragon-s-dogma-2_6667935_13.html)</sup>

从1990年代起，AI创新跟随最流行的游戏类型。第一人称射击游戏随《毁灭战士》（Doom，1993）兴起，《吃豆人》式的机器人在《半条命》（Half-Life，1998）和《[蝙蝠侠：阿卡姆疯人院](https://www.edgepedia.org/zh/batman-arkham-asylum)》（Batman: Arkham Asylum，2009）中得到完善。向3D的转变带来了新问题，因为让角色穿越复杂几何体而不与门和障碍物碰撞十分困难，这推动了导航网格和行为树的采用。<sup>[3](https://www.lemonde.fr/en/pixels/article/2024/04/10/a-short-history-of-artificial-intelligence-in-video-games-from-pac-man-to-dragon-s-dogma-2_6667935_13.html)</sup>如今创新的引擎主要是开放世界游戏，据《[龙之信条2](https://www.edgepedia.org/zh/dragons-dogma-2)》（Dragon's Dogma 2）总监伊津野英昭（Hideaki Itsuno）所说，这类游戏推进NPC自主性，使角色无论敌友都能以可信的方式互动。<sup>[3](https://www.lemonde.fr/en/pixels/article/2024/04/10/a-short-history-of-artificial-intelligence-in-video-games-from-pac-man-to-dragon-s-dogma-2_6667935_13.html)</sup>

## 游戏作为AI研究基准

几十年来，游戏一直被用于测试和评估AI系统，研究界一直在寻求复杂度不断提高的游戏。《星际争霸》（StarCraft）被认为是最具挑战性的即时战略游戏之一，经共识成为AI研究的“大挑战”，因为它结合了不完全信息、长期规划、实时行动以及每个时间步约10<sup>26</sup>个合法行动的巨大行动空间。<sup>[15](https://deepmind.google/blog/alphastar-mastering-the-real-time-strategy-game-starcraft-ii/)</sup>

**自对弈强化学习**推动了里程碑式的成果。[OpenAI Five](https://www.edgepedia.org/zh/openai-five)由五个神经网络组成，每天与自己对弈相当于180年的游戏量，在256块GPU和128,000个CPU核心上训练，不使用人类游戏数据；2019年4月13日，它通过在《Dota 2》中击败OG战队，成为首个在电竞游戏中击败世界冠军的AI系统。<sup>[5](https://openai.com/index/dota-2-with-large-scale-deep-reinforcement-learning/)</sup><sup> • </sup><sup>[16](https://openai.com/index/openai-five/)</sup>DeepMind的AlphaStar先利用人类回放进行模仿学习，再进行多智能体“联赛”训练，其最终智能体在官方战网天梯的完整《星际争霸II》对局中达到宗师级别，在类似人类的约束下（包括游戏视角界面和行动速率上限）使用全部三个种族。<sup>[4](https://deepmind.google/blog/alphastar-grandmaster-level-in-starcraft-ii-using-multi-agent-reinforcement-learning/)</sup>

南丹麦大学教授塞巴斯蒂安·里西（Sebastian Risi）与莱顿大学的迈克·普罗伊斯（Mike Preuss）合写的综述指出，游戏AI涵盖对弈智能体、自动内容创作、游戏分析和玩家建模，已确立为开发和测试先进AI算法的研究领域，其技术还延伸到机器人学和化学合成。<sup>[17](https://arxiv.org/abs/2002.10433)</sup>AI与人类对比中的公平性仍是一个方法论问题：一份分析指出，Atari基准中的“专业人类游戏测试员”只有一个人，且很可能并非任何一款游戏的专家。<sup>[18](https://www.mdpi.com/2078-1547/11/2/18)</sup>

## 生成式AI与NPC

各工作室正在试验用生成式AI构建环境、协助编剧创作NPC对话，并赋予游戏即兴的自发性——这曾是桌面角色扮演游戏的专属。在多人在线游戏《Retail Mage》中，玩家与商店和NPC的互动——从游戏机制到对话生成——都由AI驱动，而非预先设定的脚本。<sup>[19](https://apnews.com/article/c1327bb9130136d0a5f658f44176c5e7)</sup>

**原型系统**展示了方向。育碧（Ubisoft）的NEO NPC由其巴黎工作室的一个小型研发团队开发，使用英伟达（Nvidia）的Audio2Face应用和Inworld的大语言模型，利用生成式AI让玩家与NPC对话，同时不破坏情境或角色的真实性；该系统在GDC 2024上展示，目前仍是原型。<sup>[20](https://news.ubisoft.com/en-ca/article/5qXdxhshJBXoanFZApdG3L)</sup>英伟达创建了ACE技术，用生成式AI让“数字人”活起来；Inworld AI则提供生成式NPC行为和对话的平台。育碧还使用[Ghostwriter](https://www.edgepedia.org/zh/ghostwriter)这一内部工具，帮助撰写部分NPC对话，但不取代游戏编剧。<sup>[19](https://apnews.com/article/c1327bb9130136d0a5f658f44176c5e7)</sup>

行业顾问警告说，这些工具尚未准备好无缝用于游戏内，理由是技术挑战以及缺乏约束NPC行为或维护沉浸感的保障措施，并指出生成式AI目前在自动化制作任务（如编写游戏本身的代码）方面更为成熟。<sup>[3](https://www.lemonde.fr/en/pixels/article/2024/04/10/a-short-history-of-artificial-intelligence-in-video-games-from-pac-man-to-dragon-s-dogma-2_6667935_13.html)</sup>

## 行业采用与争论

采用速度增长迅速，而情绪却朝相反方向变化。在GDC 2024对3,000多名开发者的游戏行业状况调查中，31%表示个人使用生成式AI，18%表示工作场所的同事在使用；51%的开发者表示公司已制定AI政策且使用可选，而12%完全不允许使用。<sup>[6](https://www.pcgamer.com/31-of-game-developers-already-use-generative-ai/)</sup><sup> • </sup><sup>[21](https://www.gamedeveloper.com/business/near-half-of-game-devs-say-they-re-working-with-generative-ai-tools)</sup>谷歌云（Google Cloud）与哈里斯民意调查（Harris Poll）于2025年中期对五个国家615名开发者的调查发现，87%使用AI智能体来简化和自动化任务。<sup>[22](https://www.investing.com/news/stock-market-news/nearly-90-of-videogame-developers-use-ai-agents-google-study-shows-4197974)</sup>

在[Steam](https://www.edgepedia.org/zh/steam-service)上，自2024年1月起，开发者须在内容调查中申报AI使用情况；资深开发者伊奇罗·兰贝（Ichiro Lambe）的研究发现，2025年发布的Steam游戏中每5款就有1款披露使用生成式AI，共7,818款，占整个Steam库的7%，披露数量同比增长681%。<sup>[7](https://www.tomshardware.com/video-games/pc-gaming/1-in-5-steam-games-released-in-2025-use-generative-ai-up-nearly-700-percent-year-on-year-7-818-titles-disclose-genai-asset-usage-7-percent-of-entire-steam-library)</sup>

尽管使用日益普及，态度却转向反对该技术。在GDC 2026对2,300多名受访者的调查中，52%表示生成式AI对游戏行业产生负面影响，高于前一年的30%和两年前的18%；仅7%表示对行业有益，低于此前的13%。最不认可的群体是美术、设计、编剧和程序员。<sup>[8](https://www.pcgamer.com/gaming-industry/more-than-half-of-game-developers-now-think-generative-ai-is-bad-for-the-industry-a-dramatic-increase-from-just-2-years-ago-id-rather-quit-the-industry-than-use-generative-ai/)</sup>在2024年的调查中，84%的开发者对生成式AI表达了伦理担忧，包括版权侵权以及模型在未经创作者同意获取的数据上训练。<sup>[23](https://web.engr.oregonstate.edu/~mjb/cs519/2024StateOfTheGameIndustry.pdf)</sup>根据2026年调查周期，78%的公司已制定AI政策。<sup>[24](https://www.gamesandai.org/p/quest-active-where-game-studios-are)</sup>

## References

1. [Glossary, AI in Games](https://aiingames.com/en/glossary/)
2. [History of Artificial Intelligence in Gaming, EasyChair preprint](https://easychair.org/publications/preprint/pS9z/open)
3. [A short history of artificial intelligence in video games, from 'Pac-Man' to 'Dragon's Dogma 2', Le Monde (English edition)](https://www.lemonde.fr/en/pixels/article/2024/04/10/a-short-history-of-artificial-intelligence-in-video-games-from-pac-man-to-dragon-s-dogma-2_6667935_13.html)
4. [AlphaStar: Grandmaster level in StarCraft II using multi-agent reinforcement learning, Google DeepMind](https://deepmind.google/blog/alphastar-grandmaster-level-in-starcraft-ii-using-multi-agent-reinforcement-learning/)
5. [Dota 2 with large scale deep reinforcement learning, OpenAI](https://openai.com/index/dota-2-with-large-scale-deep-reinforcement-learning/)
6. [31% of game developers already use generative AI, PC Gamer](https://www.pcgamer.com/31-of-game-developers-already-use-generative-ai/)
7. [1 in 5 Steam games released in 2025 use generative AI, Tom's Hardware](https://www.tomshardware.com/video-games/pc-gaming/1-in-5-steam-games-released-in-2025-use-generative-ai-up-nearly-700-percent-year-on-year-7-818-titles-disclose-genai-asset-usage-7-percent-of-entire-steam-library)
8. [Over 50% of game developers now think generative AI is bad for the industry, PC Gamer](https://www.pcgamer.com/gaming-industry/more-than-half-of-game-developers-now-think-generative-ai-is-bad-for-the-industry-a-dramatic-increase-from-just-2-years-ago-id-rather-quit-the-industry-than-use-generative-ai/)
9. [Traditional AI vs Game AI, Harvey Mudd College](https://www.cs.hmc.edu/MyCS/vg_and_ai.pdf)
10. [Karpov et al., TIELT integration paper, UT Austin](https://nn.cs.utexas.edu/downloads/papers/karpov.aitr05.pdf)
11. [What Is Game AI? NPCs, Enemies and Agents, Abratabia](https://abratabia.com/game-ai-npc/what-is-game-ai.php)
12. [Artificial Intelligence in Games, Universidade da Beira Interior thesis](https://ubibliorum.ubi.pt/bitstream/10400.6/5517/1/3443_6881.pdf)
13. [The Evolution of Video Game AI, Maximum PC February 2025](https://pocketmags.com/eu/maximum-pc-magazine/february-2025/articles/the-evolution-of-video-game-ai)
14. [Bachelor's thesis on AI in gaming, LUT University](https://lutpub.lut.fi/bitstream/handle/10024/170271/bachelorsthesis_salek_md_peash_been.pdf?isAllowed=y&sequence=1)
15. [AlphaStar: Mastering the real-time strategy game StarCraft II, Google DeepMind](https://deepmind.google/blog/alphastar-mastering-the-real-time-strategy-game-starcraft-ii/)
16. [OpenAI Five, OpenAI](https://openai.com/index/openai-five/)
17. [Risi, S. and Preuss, M. (2020). From Chess and Atari to StarCraft and Beyond. arXiv](https://arxiv.org/abs/2002.10433)
18. [Considerations for Comparing Video Game AI Agents with Humans, MDPI Futures](https://www.mdpi.com/2078-1547/11/2/18)
19. [Can AI make video games more immersive? AP News](https://apnews.com/article/c1327bb9130136d0a5f658f44176c5e7)
20. [How Ubisoft's New Generative AI Prototype Changes the Narrative for NPCs, Ubisoft News](https://news.ubisoft.com/en-ca/article/5qXdxhshJBXoanFZApdG3L)
21. [Near half of game devs say they're working with generative AI tools, Game Developer](https://www.gamedeveloper.com/business/near-half-of-game-devs-say-they-re-working-with-generative-ai-tools)
22. [Nearly 90% of videogame developers use AI agents, Google study shows, Reuters via Investing.com](https://www.investing.com/news/stock-market-news/nearly-90-of-videogame-developers-use-ai-agents-google-study-shows-4197974)
23. [2024 State of the Game Industry, GDC (PDF)](https://web.engr.oregonstate.edu/~mjb/cs519/2024StateOfTheGameIndustry.pdf)
24. [Quest Active: Where Game Studios Are With AI, Games and AI](https://www.gamesandai.org/p/quest-active-where-game-studios-are)
25. [1951, Timeline of Computer History, Computer History Museum](https://www.computerhistory.org/timeline/1951/)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 21, 2026 · Edited: Oct 15, 2026; Oct 21, 2026; Oct 25, 2026 · Last review: Oct 21, 2026*

Topic: 体育、游戏与休闲 › 电子游戏与数字游戏 › 游戏产业 › Development and technology › Artificial intelligence in games

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/artificial-intelligence-in-video-games

English original: https://www.edgepedia.org/artificial-intelligence-in-video-games
