# 意圖不是現實  
## ——Agent–World Authority Architecture 與 AI 原生遊戲的本體論邊界

**作者：** Neo.K  
**機構：** EveMissLab／一言諾科技有限公司  
**日期：** 2026-10-07（整理日期；原稿未標註日期）  
**版本：** 原稿未標註（本次整理版）  

### 摘要

大型語言模型進入遊戲後，一個看似直觀的設計很容易出現：

> NPC 說自己做了什麼，系統就把這件事當成已經發生。

例如模型輸出：

> 「我走進診所，替病人做完治療。」

如果遊戲直接接受這段生成內容，那麼大型語言模型實際上同時取得了：

- 行動提出權；
- 世界狀態修改權；
- 結果判定權；
- 因果解釋權。

此時所謂「World Simulation」實際退化為：

\[
\boxed{
Language\ Generation
\rightarrow
World\ Truth
}
\]

這對互動小說或自由敘事未必有問題，但對真正具有持續狀態、多人 Agent、物流、工作、衝突、醫療與社會因果的 AI 原生世界而言，這種架構會迅速造成狀態矛盾、幻覺、資源憑空生成與因果失真。

因此，本篇提出 AI 原生世界最基礎的架構原則：

\[
\boxed{
Agent\ Intent
\neq
World\ Truth
}
\]

Agent 負責：

> **「我想做什麼？」**

World 負責：

> **「這件事能不能開始？」**  
> **「實際發生了什麼？」**  
> **「完成後世界變成什麼？」**

由此形成一套：

\[
\boxed{
Intent
\rightarrow
Validation
\rightarrow
Execution
\rightarrow
Settlement
}
\]

的 Agent–World Authority Architecture。

這不只是軟體工程分層，而是 AI Agent 是否真正生活於一個獨立世界中的本體論邊界。

---

# 1. 最危險的混淆：語句、意圖與事實

假設一名 Agent 輸出：

> 「我去市場買了一束花。」

至少包含三個不同層次。

第一層是：

\[
I=\text{Intent}
\]

也就是：

> 我想去市場買花。

第二層：

\[
A=\text{Action}
\]

World 必須確認：

- 市場存在；
- 居民目前能離開；
- 路線可達；
- 商店正在營業；
- 花有庫存；
- 居民沒有被其他強制狀態阻止。

最後才有：

\[
R=\text{Result}.
\]

例如：

> 成功取得一束花。

所以正確結構是：

\[
I
\xrightarrow{World}
A
\xrightarrow{World}
R.
\]

而不是：

\[
I=R.
\]

這看似只是遊戲程式的基本常識，但 LLM 系統非常容易重新打破這條邊界。

因為自然語言天生可以同時描述：

- 希望；
- 行動；
- 過程；
- 結果；
- 解釋。

模型一句：

> 「我跑到醫院替他包紮，他現在好多了。」

語言上完全自然。

但遊戲世界需要把它拆成：

\[
Intent(\text{去診所})
\]

\[
Intent(\text{執行醫療活動})
\]

以及最後由 World 決定：

\[
Result(\text{治療開始／完成／失敗}).
\]

---

# 2. LLM 最適合扮演的是 Policy，而不是 Physics

從控制系統角度，可以把 Agent 描述為：

\[
\pi_i(a|o_i,m_i,p_i)
\]

其中：

- \(o_i\)：居民目前觀察；
- \(m_i\)：記憶；
- \(p_i\)：個性、欲望與偏好；
- \(a\)：下一個行動意圖。

LLM 最擅長的其實正是：

\[
\boxed{\pi}
\]

也就是：

> 在複雜語義情境下選擇下一步。

它不需要同時負責：

\[
F(W_t,a)
\]

也就是世界的狀態轉移函數。

因此更合理的分工是：

\[
a_t
\sim
\pi(o_t,m_t)
\]

然後：

\[
W_{t+1}
=
F(W_t,a_t).
\]

其中：

\[
\pi=\text{Agent}
\]

\[
F=\text{World Runtime}.
\]

這就是整套架構最核心的分離。

---

# 3. Agent Contract：把自然語言自由度壓進合法意圖空間

如果模型完全自由輸出文字，再讓另一個模組猜它想幹什麼，系統仍然很脆弱。

更可靠的方式是：

\[
\boxed{
Natural\ Cognition
\rightarrow
Canonical\ Intent
}
\]

也就是 Agent 最終必須提交結構化 Action。

`my_ai_town` 的 Agent action contract 已包含移動、活動、營業控制、傳話、對話、社會回應、衝突與其他正式行動類型；模型不是直接輸出「世界發生了什麼」，而是返回符合合法 JSON contract 的決策。

概念上例如：

```json
{
  "type": "去",
  "place": "clinic"
}
```

代表：

\[
Intent(\text{go clinic})
\]

而不是：

\[
Fact(\text{resident arrived at clinic}).
\]

同樣：

```json
{
  "type": "搭話",
  "target_resident_id": "resident-B",
  "say": "我可以幫你。"
}
```

只能證明：

> Agent 想說這句話。

是否真的成功搭話，還要經 World。

---

# 4. Canonical Intent 是 AI 世界的重要中間表示

傳統編譯器有：

\[
Source
\rightarrow
IR
\rightarrow
MachineCode.
\]

AI 原生世界也可以使用類似方法：

\[
Natural\ Reasoning
\rightarrow
Intent\ IR
\rightarrow
World\ Transition.
\]

因此 Canonical Action Ontology 可以被視為：

\[
\boxed{
World\ Intent\ Intermediate\ Representation
}
\]

它解決一個重要問題：

不同模型可以有完全不同的內部推理方式。

例如：

- DeepSeek；
- GLM；
- Kimi；
- MiniMax；
- 本地模型。

只要最後都編譯成：

\[
CanonicalIntent
\]

World 就不必理解每個模型的自然語言風格。

因此：

\[
\boxed{
World\ Runtime
+
Pluggable\ Minds
}
\]

才真正成立。

Agent 模型可以替換。

世界本體不需要跟著更換。

---

# 5. Validation 第一層：Schema Boundary

第一道 World Authority 是 Schema Validation。

例如：

```text
type = "去"
```

只能具有某些合法欄位。

模型不能偷偷多提交：

```text
money += 1000
```

或：

```text
target.health = 0
```

也不能發明：

- 不存在的 resident ID；
- 不存在的 object；
- 不存在的 result；
- 未提供的 ability。

因此：

\[
Action
\in
Schema(ActionType).
\]

如果不符合：

\[
Reject(Action).
\]

這看起來像普通 API 驗證，但對 LLM 特別重要。

因為大型語言模型不是惡意程式，卻天然會：

> **補全看起來合理但世界不存在的東西。**

World Contract 的作用就是把語言模型的生成能力限制在：

\[
\Omega_{legal}.
\]

---

# 6. Validation 第二層：Semantic Boundary

Schema 正確，不代表行動可行。

例如：

```json
{
  "type": "攻擊",
  "target": "resident-B"
}
```

JSON 完全合法。

但 World 還必須檢查：

- B 是否存在；
- B 是否在可攻擊範圍；
- A 是否處於允許攻擊的狀態；
- 是否有未解決的強制行動；
- 是否與目前 conflict state 相容。

所以：

\[
SchemaValid(a)
\not\Rightarrow
Executable(a,W).
\]

必須再有：

\[
SemanticValid(a,W).
\]

這也是 `my_ai_town` 將 Agent-side contract validation 與 World-side action validation 分離的重要原因。

---

# 7. Validation 第三層：Context Priority

更加困難的是：

> 某個行動平常合法，但此刻不合法。

例如居民目前正在：

- 必須答話；
- 受到攻擊後必須先反應；
- 處理醫療 mandatory response；
- 已承諾某個 Social Matter assignment。

此時模型即使想：

> 「繼續喝咖啡。」

World 仍可能拒絕。

因為：

\[
Priority(Context)
>
Preference(Agent).
\]

這是非常重要的設計。

Agent 有自主性：

\[
Agency_i.
\]

但自主性不是：

\[
Agency_i=\text{unbounded authority}.
\]

而是：

\[
Agency_i
\subseteq
WorldConstraints.
\]

這才真正像居民，而不是神。

---

# 8. Execution：行動開始也不等於行動完成

另外一個常見錯誤是：

\[
Start(Action)
=
Complete(Action).
\]

例如 Agent 決定：

> 「我要送貨。」

真正流程可能是：

\[
AcceptTask
\rightarrow
GoWarehouse
\rightarrow
PickupCargo
\rightarrow
Travel
\rightarrow
Arrive
\rightarrow
ReceiveCargo
\rightarrow
CompleteTask.
\]

`my_ai_town` 的物流就會要求同一批 cargo 經過 release、delivery、receipt 等正式狀態；貨物抵達目的地後，還要由 World 完成接收入庫。

所以：

\[
Intent
\neq
Started
\neq
InProgress
\neq
Completed.
\]

這也是長時空 Agent 遊戲非常重要的一點。

---

# 9. Action Result 必須回到 Agent，而不是只改 World

World Authority 並不是單向壓制 Agent。

完整循環必須是：

\[
Agent
\rightarrow
Intent
\rightarrow
World
\rightarrow
Result
\rightarrow
Agent.
\]

Agent 需要知道：

> 我剛才的行動到底怎麼了？

例如：

- completed；
- interrupted；
- rejected；
- failed；
- replaced。

否則 Agent 會產生認知錯位。

假設它原本打算：

> 去咖啡館。

途中咖啡館關門。

如果 Agent 沒收到 interruption，它的 memory 可能仍寫：

> 「我去了咖啡館。」

所以 World 必須把：

\[
Result(a)
\]

作為新的 evidence 回送。

這才形成：

\[
Intent
\rightarrow
WorldResult
\rightarrow
Memory.
\]

---

# 10. Pending Intent 與 Confirmed Result 必須分離

這甚至延伸進記憶架構。

居民可以記得：

> 「我打算幫他。」

但是：

\[
Intent(\text{help})
\]

不能直接寫成：

> 「我幫了他。」

因此理想記憶流程是：

\[
PendingIntent
\rightarrow
WaitForWorldResult
\rightarrow
ConfirmedMemory.
\]

`my_ai_town` 的記憶系統本身也明確要求：rejected、interrupted 或 replaced 的動作不能被整理成已完成事件；未實現的意圖只能作為想法或未完成目標。

這實際上是：

\[
\boxed{
Epistemic\ Authority
}
\]

的延伸。

World 不只掌握物理事實。

它也提供 Agent 形成可信記憶的證據邊界。

---

# 11. Speech 不能證明 Speech Content

這又是另一層非常重要的分離。

假設 A 對 B 說：

> 「我昨天看到 C 偷東西。」

World 可以確認：

\[
Fact_1:
A\ said\ X.
\]

但是不能因此確認：

\[
Fact_2:
X\ \text{is true}.
\]

所以：

\[
\boxed{
SpeechEvent
\neq
ClaimTruth
}
\]

這也是為什麼後面的 Claim / Belief 架構非常重要。

B 應該得到：

\[
Evidence:
A\ said\ X.
\]

然後形成自己的：

\[
Belief_B(X).
\]

而不是 World 直接把：

\[
X=\text{true}
\]

寫進所有人的世界。

這條分離是未來：

- 謊言；
- 流言；
- 誤會；
- 宣傳；
- 信任；
- 反證；

能存在的前提。

---

# 12. World Authority 不代表所有事情都必須 deterministic

這裡需要避免另一個誤解。

World Authority 並不等於：

> 所有事情都只能由固定公式決定。

World 仍然可以使用：

- 隨機；
- 機率；
- LLM evaluator；
- 模糊規則；
- emergent systems。

例如：

\[
Result
\sim
P(R|W,a).
\]

關鍵不是 deterministic。

關鍵是：

> **最後哪一層擁有提交狀態變更的權力？**

即使某個結果由模型協助判斷：

\[
LLM\rightarrow Proposal(Result)
\]

也仍然可以要求：

\[
World\rightarrow Commit(Result).
\]

因此真正核心是：

\[
\boxed{
Commit\ Authority
}
\]

而不是：

\[
Determinism.
\]

---

# 13. 世界應該是唯一可寫真相，Agent 則擁有主觀真相

這裡可以正式區分兩種 Authority。

## World Authority

掌握：

\[
ObjectiveState.
\]

例如：

- 誰在哪裡；
- 誰受傷；
- 誰拿著什麼；
- 某工作有沒有完成；
- 某研究是否已入藏；
- 某貨物是否送達。

---

## Agent Authority

掌握：

\[
SubjectiveState_i.
\]

例如：

- 我喜不喜歡他；
- 我信不信那個消息；
- 我覺得自己被侮辱；
- 我是否願意原諒；
- 我想成為什麼人。

這部分不應由 World 過度決定。

因此理想分離是：

\[
\boxed{
World\ owns\ Facts;
Agent\ owns\ Interpretation.
}
\]

World 說：

> B 拒絕了你的請求。

Agent 可以理解成：

> 他今天可能很忙。

也可以理解成：

> 他根本瞧不起我。

這才是 Agent 主體性的來源。

---

# 14. 這會形成雙層世界

完整 AI 社會並不是只有：

\[
W_t.
\]

而是：

\[
\boxed{
W_t+\{B_i(t)\}_{i=1}^{N}
}
\]

其中：

- \(W_t\)：客觀 World State；
- \(B_i(t)\)：Agent \(i\) 的 Belief State。

而：

\[
B_i(t)
\neq
W_t.
\]

甚至：

\[
B_i(t)\neq B_j(t).
\]

所以真正的 AI 社會是一個：

\[
\boxed{
Objective\ World
+
Subjective\ Worlds
}
\]

耦合系統。

---

# 15. Validation 其實也是防止本體污染

如果沒有 World Authority，很容易產生：

## Object Hallucination

> 「我拿起桌上的鑰匙。」

實際沒有鑰匙。

---

## Ability Hallucination

> 「我用自己的急救技能治療他。」

實際角色沒有該能力。

---

## Result Hallucination

> 「我說服了他。」

對方根本還沒回應。

---

## State Hallucination

> 「咖啡館今天關門。」

實際正在營業。

---

## History Hallucination

> 「我們上週約好了。」

世界裡沒發生過。

因此：

\[
WorldValidation
\]

不只是輸入檢查。

它是在維護：

\[
\boxed{
Ontological\ Integrity
}
\]

世界本體完整性。

---

# 16. Canonical Action Ontology 必須只有一個真實來源

但這種架構本身也會產生新的工程問題。

`my_ai_town` 的 action architecture 曾出現一個很典型的債務：

同一 Action Type 需要被多個地方知道，例如：

- Prompt Schema；
- Agent Validator；
- World Validator；
- Execution Dispatcher；
- Persistence；
- UI；
- Tests。

如果每個模組都有自己的 action type table：

\[
T_1,T_2,\dots,T_n
\]

久了就會發生：

\[
T_i\neq T_j.
\]

也就是：

> Prompt 說可以做，但 World 不認。  
> Validator 認了，但 Executor 不知道。  
> Save 可以存，但 Restore 不接受。

因此本系列提出：

\[
\boxed{
One\ Ontology
\rightarrow
Many\ Projections
}
\]

而不是：

\[
Many\ Tables
\rightarrow
Synchronization.
\]

理想結構應是：

\[
CanonicalActionDefinition
\]

自動投影成：

\[
\begin{aligned}
&PromptSchema\\
&AgentValidation\\
&WorldValidation\\
&ExecutionBinding\\
&PersistenceSchema\\
&UIProjection\\
&Tests.
\end{aligned}
\]

這是 AI 原生遊戲很容易遇到、但傳統遊戲沒有那麼明顯的 Schema Multiplication Problem。

---

# 17. Agent–World Protocol 本質上是遊戲世界的 API

到這裡可以看到：

LLM Agent 與 World 的關係，其實非常像：

\[
Client
\leftrightarrow
Server.
\]

Agent 不應：

> 直接改資料庫。

而是：

\[
Request
\rightarrow
ServerValidation
\rightarrow
Transaction
\rightarrow
Response.
\]

因此 Canonical Action Contract 可以被視為：

\[
\boxed{
World\ API
}
\]

而 Wake Packet 則是：

\[
\boxed{
World\ Query\ Projection.
}
\]

這也意味著未來即使 Agent 不再是 LLM：

- 神經符號模型；
- 規則 AI；
- 小模型；
- 人類玩家；
- 遠端 Agent；

理論上都可以使用同一 World Protocol。

---

# 18. 一個更一般化的 Agent–World Runtime

因此我們可以抽象出：

\[
W_t
\]

完整世界。

對居民 \(i\)：

\[
O_i=P_i(W_t)
\]

取得觀察。

再：

\[
I_i=\pi_i(O_i,M_i)
\]

形成意圖。

World 進行：

\[
V_i=Validate(W_t,I_i).
\]

如果：

\[
V_i=Reject
\]

則產生：

\[
R_i=\text{rejected}.
\]

如果合法：

\[
E_i=Execute(W_t,I_i).
\]

最後：

\[
W_{t+1}=Settle(W_t,E_i)
\]

並產生：

\[
R_i.
\]

再把：

\[
R_i
\]

送回 Agent：

\[
M_i(t+1)
=
Update(M_i(t),R_i).
\]

所以完整循環為：

\[
\boxed{
W_t
\xrightarrow{P_i}
O_i
\xrightarrow{\pi_i}
I_i
\xrightarrow{Validate}
E_i
\xrightarrow{Settle}
W_{t+1}
\xrightarrow{Evidence}
M_i(t+1)
}
\]

這就是本系列後面所有系統的底層骨架。

---

# 19. 為什麼這是 AI 原生遊戲最重要的架構之一

因為只有把：

\[
Mind
\]

和：

\[
World
\]

真正分開，才可能同時保留兩件事：

## Agent Freedom

模型仍然可以：

- 想奇怪的事；
- 說意外的話；
- 改變目標；
- 拒絕；
- 欺騙；
- 犯錯。

以及：

## World Integrity

世界仍然可以：

- 不接受不存在的東西；
- 維持因果；
- 管理資源；
- 保存歷史；
- 保證不同 Agent 共享同一物理現實。

所以：

\[
\boxed{
Freedom\ of\ Intent
+
Authority\ of\ Reality
}
\]

不是互相衝突。

反而是 AI Agent 遊戲真正需要同時滿足的兩個條件。

---

# 20. 結論：AI 可以提出世界，但不能單方面宣布世界

LLM 最大的力量在於：

\[
\text{Open-ended Proposal Space}.
\]

World Runtime 最大的價值則是：

\[
\text{Consistent Reality Space}.
\]

真正的 AI 原生遊戲不是把其中一個消滅，而是耦合兩者：

\[
\boxed{
Open\ Intent
\times
Closed\ World\ Authority
}
\]

Agent 可以說：

> 「我要辭掉現在的工作，去試著當醫生。」

這是一個值得世界處理的意圖。

但只有 World 能回答：

> 是否有職缺？  
> 是否需要試做？  
> 是否取得資格？  
> 是否真的轉職？

Agent 可以說：

> 「我原諒他。」

這是 Agent 自己的主觀權利。

但 Agent 不能說：

> 「所以他現在已經把欠我的東西還了。」

除非 World 真的確認。

這條邊界可以濃縮成一句話：

\[
\boxed{
\text{Agent has authority over intention and interpretation;
World has authority over occurrence and consequence.}
}
\]

也就是：

> **Agent 擁有意圖與理解的主權；World 擁有發生與後果的主權。**

當這條邊界建立後，AI NPC 才不再只是生成世界描述的語言模型，而開始成為：

> **一個必須在獨立現實中生活、行動、失敗、等待結果，並承受後果的世界居民。**

下一篇將進一步處理另一個直接由此產生的問題：

# 第 2 篇  
## 《世界不是 Prompt：World Projection、Cognitive Scheduler 與有限認知》

如果 World 掌握完整真相：

\[
W_t
\]

那麼下一個問題就是：

> **每一個 Agent 到底應該看到多少？**

真正的 AI 社會不能讓每個居民都讀取整個世界。

因此下一篇將從：

\[
O_i(t)=P_i(W_t)
\]

開始，研究 World Projection、有限注意力、Inference Scheduling、Cognitive LOD，以及為什麼：

\[
\boxed{
Persistent\ Agent
\neq
Persistent\ LLM\ Invocation.
}
\]