# 非玩家角色

**非玩家角色**（non-player character，NPC）是游戏中不由玩家控制的角色：在桌面角色扮演游戏中由游戏主持人扮演，在电子游戏中由软件而非任何参与者控制<sup>[1](https://www.museumofplay.org/blog/the-history-of-npcs/)</sup>。在电子游戏语境中，该缩写有时被展开为“非可玩角色”（non-playable character）<sup>[2](https://www.ecigames.net/media/what-are-non-playable-characters-npcs)</sup>。

| 关键事实 | 详情 |
|---|---|
| 定义 | 桌面游戏中由地下城主或游戏主持人扮演、电脑游戏中由软件扮演而非由玩家控制的角色<sup>[1](https://www.museumofplay.org/blog/the-history-of-npcs/)</sup> |
| 起源 | 《龙与地下城》（1974）引入“非玩家角色”作为雇工，其忠诚度由裁判秘密掷骰判定<sup>[1](https://www.museumofplay.org/blog/the-history-of-npcs/)</sup> |
| 经典功能 | 角色扮演游戏中的工具性、对抗性、盟友性或氛围性角色<sup>[1](https://www.museumofplay.org/blog/the-history-of-npcs/)</sup> |
| 巴特尔角色清单 | 买卖和制作物品；提供服务；守卫地点；被杀以掉落战利品；发放任务或提示；提供背景信息并替玩家做事；让场景显得热闹<sup>[3](https://philarchive.org/archive/KOEFOU)</sup> |
| 标准AI工具 | 有限状态机，其后是行为树，后者在《光环2》（2004）和《生化奇兵》（2007）之后成为主流<sup>[4](https://arxiv.org/abs/2005.05842)</sup><sup> • </sup><sup>[5](https://gameaibook.org/wp-content/uploads/2025/08/AI_and_Games_2nd_Edition.pdf)</sup> |
| 程序化生成 | 《天际》的“光辉”任务系统由《辐射3》的“蛮力”方法发展而来，让设计师设定哪个NPC激活事件以及在何处发生<sup>[6](https://www.gamesradar.com/games/the-elder-scrolls/before-skyrim-todd-howard-said-a-brute-force-fallout-3-system-helped-shape-the-fantasy-rpgs-iconic-open-world/)</sup> |
| 当前前沿 | 生成式AI和大语言模型驱动NPC对话与行为，育碧等工作室正在构建能实时适应玩家行为的NPC<sup>[7](https://apnews.com/article/c1327bb9130136d0a5f658f44176c5e7)</sup><sup> • </sup><sup>[8](https://www.tomshardware.com/tech-industry/artificial-intelligence/ubisoft-reportedly-testing-generative-ai-in-far-cry-7-as-company-posts-record-1-3-billion-loss)</sup> |

## 桌面角色扮演游戏中的起源

这一概念早于电子游戏。在国际象棋或《大富翁》等传统桌游中，没有任何游戏元素独立于玩家行动，因此不存在类似NPC的东西；这一观念的历史始于1970年代角色扮演游戏的诞生<sup>[1](https://www.museumofplay.org/blog/the-history-of-npcs/)</sup>。1974年出版的《[龙与地下城](https://www.edgepedia.org/zh/dungeons-and-dragons)》第一版列出了被称为“非玩家角色”的参与者类别，但起初他们的角色通常是受雇加入玩家队伍的同伴冒险者，其持续忠诚度由游戏裁判（后来称为地下城主）秘密掷骰判定<sup>[1](https://www.museumofplay.org/blog/the-history-of-npcs/)</sup>。

原版套装第三册涵盖荒野冒险，扩展了范围：玩家路过城堡时，会受到马上比武的挑战，拥有自己城镇的玩家可以雇佣从炼金术士到驯兽师的专家，非玩家角色开始作为传递任务和信息的渠道塑造游戏。其中“传闻、信息和传说”一节描述了买几轮酒（10到60枚金币）并塞给酒保几枚硬币（1到10枚金币）以打探消息，错误信息则由裁判自行决定<sup>[1](https://www.museumofplay.org/blog/the-history-of-npcs/)</sup>。

《地下城主指南》的作者[加里·吉盖克斯](https://www.edgepedia.org/zh/gary-gygax)在1970年代末的《高级龙与地下城》系统中用大量篇幅讲述NPC，解释了如何生成他们的特征和个性，以及地下城主应如何“代入NPC的身份和职业，并根据非玩家角色的重要性，正式或非正式地创造其特征”来使他们活起来。该指南还提供了通过几次掷骰生成NPC的表格<sup>[1](https://www.museumofplay.org/blog/the-history-of-npcs/)</sup>。

## 游戏中的功能

在角色扮演游戏中，NPC通常承担四种关键角色：工具性、对抗性、盟友性或氛围性<sup>[1](https://www.museumofplay.org/blog/the-history-of-npcs/)</sup>。

- **工具性** NPC推动故事或游戏前进，通常通过传递信息；这通常是他们最重要的角色。
- **对抗性** NPC阻挠或延缓玩家角色的进展，行为很像怪物。
- **盟友性** NPC帮助玩家，或许提供治疗或加入冒险队伍。
- **氛围性** NPC只是填充世界，这一角色在大型开放世界游戏中尤为普遍，设计师在广阔疆域中散布填充角色<sup>[1](https://www.museumofplay.org/blog/the-history-of-npcs/)</sup>。

以玩家类型研究闻名的游戏研究者理查德·巴特尔识别了七种NPC角色：买卖和制作物品；提供服务；保护地点；死亡以便玩家拾取战利品；给予玩家任务或线索；分享背景信息并代表玩家行动；以及让场景显得有人气<sup>[3](https://philarchive.org/archive/KOEFOU)</sup>。

该术语的用法在边缘处存在差异。平台游戏中的栗宝宝按严格定义是NPC，但许多玩家将这个词保留给他们与之互动的角色——交易、交谈或接任务的对象——而非他们直接踩踏或射击的角色<sup>[9](https://makegame.io/blog/what-is-an-npc)</sup>。研究者还区分持久非玩家角色（PNPC）——引导玩家贯穿游戏的反复出现角色——与无数一次性NPC<sup>[10](https://journals.sagepub.com/doi/10.1177/0270467612469075)</sup>。

## 从桌面到电脑游戏

当角色扮演游戏迁移到电脑上时，NPC变得更加重要，尽管设计师难以让他们感觉真实。早期角色通常被放置在游戏中只做一件事，比如让玩家踏上任务，如[理查德·加里奥特](https://www.edgepedia.org/zh/richard-garriott)《阿卡勒贝斯》（1979）中的不列颠王，或冒险游戏《国王密使》（1980）中的角色。更完整实现但仍有限制的角色出现在《创世纪》（1981）、《吟游诗人的故事》（1985）和《创世纪IV》（1985）中<sup>[1](https://www.museumofplay.org/blog/the-history-of-npcs/)</sup>。

先驱工作室Interplay创始人[布莱恩·法戈](https://www.edgepedia.org/zh/brian-fargo)的开发笔记显示了早期NPC被多么仔细地整合到故事设计中。在《吟游诗人的故事》（1985）中，玩家在 Scarlet Bard 酒馆与店主交谈，当要葡萄酒时被送入地窖；Amiga版本的一份测试者错误报告抱怨酒保未能给出该指示。《吟游诗人的故事III：命运窃贼》的设计文档详细说明了一位疲惫的老人在废墟[斯卡拉布雷](https://www.edgepedia.org/zh/skara-brae)欢迎队伍，解释他们独特的使命，并充当角色创建的审查委员会。同一游戏提供了对抗性和盟友性的例子：如果玩家正确回答谜语，年轻鹰滑者加入队伍，而乌尔梅克则时而帮助时而对抗他们。早期RPG很少有纯粹氛围性的NPC，因为有限的电脑内存意味着每次遭遇都必须有意义<sup>[1](https://www.museumofplay.org/blog/the-history-of-npcs/)</sup>。

随着内存和处理能力的增长，NPC变得更加普遍和复杂。在《创世纪V》（1988）中，NPC遵循实际日常生活的日程，每天早上开店，天黑后关闭城门。BioWare的《博德之门》（1998）用NPC让世界显得能自行运转、充满生机；联合创始人雷·穆兹卡说团队希望居民“感觉像真实的人，而不是AI控制的NPC”<sup>[1](https://www.museumofplay.org/blog/the-history-of-npcs/)</sup>。

## 控制NPC行为

在早期电子游戏中，NPC行为通常由简单的有限状态机（FSM）管理，即预定义的状态集合，如巡逻、追逐和逃跑，状态转换由游戏事件触发<sup>[11](https://doi.org/10.1145/3787256.3787265)</sup>。FSM适用于少量离散行为，但扩展性差：每个状态必须了解其他状态，因此每增加一个状态就会成倍增加转换定义，增加复杂性和出错几率<sup>[12](https://openrepository.aut.ac.nz/bitstream/handle/10292/10109/GreigTJ.pdf?isAllowed=y&sequence=3)</sup>。

[行为树](https://www.edgepedia.org/zh/behavior-trees)是电脑游戏行业作为回应而发明的。在行为树中，转换逻辑不是分散在各个状态中，而是组织为以状态为叶子的层级树结构，这提高了模块性，使行为更易于扩展、调整和重用<sup>[4](https://arxiv.org/abs/2005.05842)</sup>。与FSM一样，它们易于设计、测试和调试，在《[光环2](https://www.edgepedia.org/zh/halo-2)》（微软游戏工作室，2004）和《生化奇兵》（2K Games，2007）成功使用后成为游戏开发中的主流<sup>[5](https://gameaibook.org/wp-content/uploads/2025/08/AI_and_Games_2nd_Edition.pdf)</sup>。此后研究者将行为树与用于智能NPC的层级有限状态机进行比较，并探索进化和强化学习方法，包括根据置信度在静态策略和学习策略之间切换的混合方法<sup>[13](https://www.kci.go.kr/kciportal/ci/sereArticleSearch/ciSereArtiView.kci?sereArticleSearchBean.artiId=ART003075330)</sup><sup> • </sup><sup>[11](https://doi.org/10.1145/3787256.3787265)</sup>。

除决策外，寻路是NPC的核心能力；[A*搜索算法](https://www.edgepedia.org/zh/a-search-algorithm)在游戏行业中广泛用于让角色在游戏空间中移动<sup>[12](https://openrepository.aut.ac.nz/bitstream/handle/10292/10109/GreigTJ.pdf?isAllowed=y&sequence=3)</sup>。

## 程序化和系统性NPC

一些游戏从系统而非手写脚本生成NPC活动。贝塞斯达的“光辉故事”系统塑造了《天际》的开放世界，源于托德·霍华德所称的《[辐射3](https://www.edgepedia.org/zh/fallout-3)》中的“蛮力”方法：开发者设定事件背后的参数，决定哪种NPC激活它以及在游戏哪个区域找到它<sup>[6](https://www.gamesradar.com/games/the-elder-scrolls/before-skyrim-todd-howard-said-a-brute-force-fallout-3-system-helped-shape-the-fantasy-rpgs-iconic-open-world/)</sup>。殖民地模拟进一步推动了这一方法；《[矮人要塞](https://www.edgepedia.org/zh/dwarf-fortress)》联合创作者塔恩·亚当斯指出，玩家在长时间内观察有名字的非玩家生物彼此互动，比他们通常观察RPG中按日程行动的NPC更加仔细<sup>[14](https://www.pcgamer.com/games/strategy/the-challenges-of-developing-the-colony-sim-from-dungeon-keeper-to-dwarf-fortress-and-beyond/)</sup>。

## AI驱动的NPC

各工作室现在正在试验生成式AI用于NPC对话和行为，旨在为游戏带来曾专属于桌面角色扮演的即兴自发性。在[游戏开发者大会](https://www.edgepedia.org/zh/game-developers-conference)上展示的多人游戏《零售法师》中，玩家经营一家魔法家具店，他们与商店及周围NPC的互动——从游戏机制到对话——由AI而非预设脚本驱动<sup>[7](https://apnews.com/article/c1327bb9130136d0a5f658f44176c5e7)</sup>。育碧为NPC构建了AI驱动系统，“能够适应玩家行为并实时更动态地反应”，与英伟达和Inworld AI合作在GDC 2024上展示了“Neo NPC”演示，并正在加速投资于Teammates——其首个可玩的生成式AI体验<sup>[8](https://www.tomshardware.com/tech-industry/artificial-intelligence/ubisoft-reportedly-testing-generative-ai-in-far-cry-7-as-company-posts-record-1-3-billion-loss)</sup>。英伟达的ACE游戏代理SDK集成到[虚幻引擎5](https://www.edgepedia.org/zh/unreal-engine-5)中，将语音、语言模型和游戏逻辑连接成实时循环，用于驱动英伟达所称的代理性角色<sup>[15](https://www.creativebloq.com/3d/video-game-design/unreal-engine-5-games-arent-getting-bigger-anymore-theyre-getting-smarter)</sup>。

研究量化了前景与摩擦。一项针对VR审讯模拟器的用户研究（18名参与者）使用两个GPT-4 Turbo驱动的NPC，测得平均周期延迟为7秒，随对话上下文增长；可信度评分为6.67分（满分10分），在行为、社会关系和智力方面评分较高，但在情感和个性方面评分中等，系统可用性量表得分为79.44<sup>[16](https://arxiv.org/abs/2507.10469)</sup>。延迟类型很重要：一项关于LLM驱动游戏对话的研究（N=34）考察了首词元时间和每输出词元时间延迟如何影响对话驱动RPG场景中的玩家体验<sup>[17](https://doi.org/10.1016/j.entcom.2026.101213)</sup>。其他研究发现了双刃剑效应，开放式LLM互动在某些任务场景中提高了玩家的认知负荷<sup>[18](https://arxiv.org/abs/2604.10107)</sup>，而一项静态与LLM驱动对话系统的比较研究在自定义RPG测试平台上测试了改写、混合和完全生成的NPC对话<sup>[19](https://portal.findresearcher.sdu.dk/en/publications/quest-of-aivengarde-comparative-study-of-player-experience-across/)</sup>。该文献中引用的预测认为，到2030年AI生成的视频游戏对话市场将达到69.8亿美元<sup>[17](https://doi.org/10.1016/j.entcom.2026.101213)</sup>。

## 可信度与玩家体验

什么让NPC感觉真实是一个活跃的研究问题。一项针对《赛博朋克2077》《荒野大镖客2》《天际》和《战神》（2018）等开放世界游戏的研究发现，NPC行为通过模式一致性而非计算复杂性影响沉浸感<sup>[20](https://papers.ssrn.com/sol3/Delivery.cfm/5699383.pdf?abstractid=5699383&mirid=1)</sup>。2010年Meaningful Play的一项实验向参与者展示八个NPC的视频，发现来自较新或评分较高游戏的角色被认为比来自较旧或评分较低游戏的角色更可信<sup>[21](https://meaningfulplay.msu.edu/proceedings2010/mp2010_paper_12.pdf)</sup>。一项关于可信NPC行为的系统性文献综述得出结论，预期行为更多取决于玩家的期望而非仅取决于开发者，而角色扮演未分配的角色会导致玩家不相信该行为<sup>[22](https://www.sbgames.org/proceedings2021/ComputacaoShort/217749.pdf)</sup>。

经济压力塑造了NPC内容的制作量。《辐射》联合创作者蒂莫西·凯恩表示，他被告知停止花费时间和金钱编写玩家对话和NPC回应的对话并录制配音，因为只有一小部分玩家会看到这些内容<sup>[23](https://www.gamesradar.com/games/rpg/hidden-content-made-baldurs-gate-3-special-but-fallout-co-creator-worries-rpgs-are-ditching-secrets-because-nobody-thinks-people-will-find-things-on-their-own/)</sup>。

## 游戏之外

该术语已经脱离了其原始语境。电脑NPC脚本化、公式化的言语促使人们在现实生活中扮演NPC，而Pinkydoll等TikTok创作者将表演NPC式短语变成了赚钱手段和社会现象<sup>[1](https://www.museumofplay.org/blog/the-history-of-npcs/)</sup>。在小说中，LitRPG类型——将传统叙事与角色扮演游戏机制相结合——用“NPC”作为故事中次要人物的简写<sup>[24](https://theweek.com/culture-life/books/the-rise-of-litrpg)</sup>。

## References

1. [Jon-Paul Dyson, "The History of NPCs," The Strong National Museum of Play, January 19, 2024](https://www.museumofplay.org/blog/the-history-of-npcs/)
2. ["What are Non-Playable Characters (NPCs)?," ECI Games](https://www.ecigames.net/media/what-are-non-playable-characters-npcs)
3. ["Freedom | Oppression | Games & Play," PhilArchive](https://philarchive.org/archive/KOEFOU)
4. [Iovino et al., "A Survey of Behavior Trees in Robotics and AI," arXiv:2005.05842](https://arxiv.org/abs/2005.05842)
5. [AI Methods for Games, 2nd edition (gameaibook.org)](https://gameaibook.org/wp-content/uploads/2025/08/AI_and_Games_2nd_Edition.pdf)
6. [GamesRadar: Todd Howard on the Fallout 3 "brute force" system behind Skyrim's radiant quests](https://www.gamesradar.com/games/the-elder-scrolls/before-skyrim-todd-howard-said-a-brute-force-fallout-3-system-helped-shape-the-fantasy-rpgs-iconic-open-world/)
7. [AP News: "Can AI make video games more immersive?" September 25, 2024](https://apnews.com/article/c1327bb9130136d0a5f658f44176c5e7)
8. [Tom's Hardware: Ubisoft reportedly testing generative AI in Far Cry 7](https://www.tomshardware.com/tech-industry/artificial-intelligence/ubisoft-reportedly-testing-generative-ai-in-far-cry-7-as-company-posts-record-1-3-billion-loss)
9. [MakeGame: "What Is an NPC?"](https://makegame.io/blog/what-is-an-npc)
10. [Christine Daviault, "Does Game Playing Experience Have an Impact on the Player-PNPC Relationship?" SAGE, 2012](https://journals.sagepub.com/doi/10.1177/0270467612469075)
11. ["NPC Control Across Algorithm Classes," Proceedings of the 2025 8th International Conference on Computational Intelligence and Intelligent Systems](https://doi.org/10.1145/3787256.3787265)
12. [Greig, AUT thesis on game AI behavior architectures](https://openrepository.aut.ac.nz/bitstream/handle/10292/10109/GreigTJ.pdf?isAllowed=y&sequence=3)
13. [KCI: Efficiency evaluation of hierarchical finite state machines and behavior trees for intelligent NPCs](https://www.kci.go.kr/kciportal/ci/sereArticleSearch/ciSereArtiView.kci?sereArticleSearchBean.artiId=ART003075330)
14. [PC Gamer: The challenges of developing the colony sim](https://www.pcgamer.com/games/strategy/the-challenges-of-developing-the-colony-sim-from-dungeon-keeper-to-dwarf-fortress-and-beyond/)
15. [Creative Bloq: Unreal Engine 5 games are getting smarter](https://www.creativebloq.com/3d/video-game-design/unreal-engine-5-games-arent-getting-bigger-anymore-theyre-getting-smarter)
16. [Korkiakoski et al., "An Empirical Evaluation of AI-Powered Non-Player Characters' Perceived Realism and Performance in Virtual Reality Environments," arXiv:2507.10469](https://arxiv.org/abs/2507.10469)
17. ["When NPCs take their time: Token latency effects in LLM-driven game conversations," Entertainment Computing](https://doi.org/10.1016/j.entcom.2026.101213)
18. ["The Double-Edged Sword of Open-Ended Interaction: How LLM-Driven NPCs Affect Players' Cognitive Load and Gaming Experience," arXiv:2604.10107](https://arxiv.org/abs/2604.10107)
19. ["Quest of Aivengarde: Comparative Study of Player Experience Across LLM Dialogue Systems," University of Southern Denmark](https://portal.findresearcher.sdu.dk/en/publications/quest-of-aivengarde-comparative-study-of-player-experience-across/)
20. [Penchev and Ladinskis, "Realism or Verisimilitude, are Non-Playable Characters Good Enough?" SSRN](https://papers.ssrn.com/sol3/Delivery.cfm/5699383.pdf?abstractid=5699383&mirid=1)
21. ["What Do You Mean by Believable Characters?" Meaningful Play 2010 proceedings](https://meaningfulplay.msu.edu/proceedings2010/mp2010_paper_12.pdf)
22. ["Development of Non-Player Character with Believable Behavior: a systematic literature review," SBGames 2021](https://www.sbgames.org/proceedings2021/ComputacaoShort/217749.pdf)
23. [GamesRadar: Fallout co-creator worries RPGs are ditching secrets](https://www.gamesradar.com/games/rpg/hidden-content-made-baldurs-gate-3-special-but-fallout-co-creator-worries-rpgs-are-ditching-secrets-because-nobody-thinks-people-will-find-things-on-their-own/)
24. [The Week: The rise of LitRPG](https://theweek.com/culture-life/books/the-rise-of-litrpg)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; 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/non-player-character

English original: https://www.edgepedia.org/non-player-character
