The slides of Artificial Intelligence and Entertainment Science (AIES) Workshop 2021 Keynote lecture
https://aies.info/program/
Empathic Entertainment in Digital Game
A digital game give a unique experience to a user. AI system in Digital game consists of three kinds of AI such as Meta-AI, Character AI, and Spatial AI. Game experience is formed by them. Meta-AI keeps watching a status of game and controlling characters, objects, terrain, weather and so on dynamically to make many dramatic and empathic situations in a game for users. Character AI is a brain of an autonomous game character to make a decision by itself, but sometimes it acts to achieve a goal issued from Meta-AI. Spatial AI analyses a terrain and abstracts its features to communicate them to Meta-AI and Character-AI. They can make their intelligent decisions by using specific terrain and environment features. The AI system is called MCS-AI dynamic cooperative model (Meta-AI, Character AI, and Spatial AI dynamic cooperative model). In the lecture, I will explain the system by showing some cases of published digital games.
30. (例) ルール制御
ID 0 : IF …. THEN …
ID 1 : IF …. THEN …
ID 3 : IF …. THEN ….
ID 4 : IF …. THEN …
ID .. :
ID 5 : IF …. THEN …
Priority: 3
Priority: 1
Priority: 4
Priority: 5
Priority: 2
或いは、状況判断思考によってルールを振り分ける。
戦略思考、キャラクターの挙動などでよく使われる。
Priority: -
制御
思考
ルール= IF ( 行動条件文 ) then (動作命令文)
75. メタAI Left 4 Dead の事例
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and
Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
今回は Left 4 Dead の事例を見てみる。
77. メタAI(=AI Director)によるユーザーのリラックス度に応じた敵出現度
ユーザーの緊張度
実際の敵出現数
計算によって
求められた
理想的な敵出現数
Build Up …プレイヤーの緊張度が目標値を超えるまで
敵を出現させ続ける。
Sustain Peak … 緊張度のピークを3-5秒維持するために、
敵の数を維持する。
Peak Fade … 敵の数を最小限へ減少していく。
Relax … プレイヤーたちが安全な領域へ行くまで、30-45秒間、
敵の出現を最小限に維持する。
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
より具体的なアルゴリズム
79. メタAIが作用を行う領域
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
メタAIが作用(敵の生成・
消滅)を行う領域を、
AAS(= Active Area Set) と
言う。
80. メタAIが作用を行う領域
(AAS=Active Area Set)
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
81. メタAIが作用を行う領域
(AAS=Active Area Set)
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
82. 安全な領域までの道のり(Flow Distance)
メタAIはプレイヤー群の経路を
トレースし予測する。
- どこへ来るか
- どこが背面になるか
- どこに向かうか
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
85. 敵出現領域
背後 前方
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
前方と背後のプレイヤー群から見えてない部屋に、
モンスターを発生させる。
86. モンスター・アイテム出現頻度
敵の種類、アイテムの種類ごとに出現頻度が違うが、頻度に応じて発生させる。
高頻度
低頻度
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
Wanderers (高頻度)
Mobs(中頻度)
Special Infected (中頻度)
Bosses (低頻度)
Weapon Caches (低頻度)
Scavenge Items (中頻度)
87. ボス出現アルゴリズム
(1) N体を予想される逃走経路上に配置
(2) 3つの出現イベントパターン
(何もいない、を含む)
(例) Tank, Witch, 何もいない
(3) 同じパターンのくり返しは禁止
(例) Witch, 何もいない、Witch はOK。
Witch, Witch はだめ。
何もいない
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
Tank Witch Witch Tank Witch Tank
88. 具体的なアルゴリズム
(1) 各エリアに、出現数 N を決定する
(2) 出現数Nは予想される逃走経路の長さと
要求される密度によって計算される。
(3) あるエリアがAAS の中に入るとクリー
チャーがN体生成される。
(4) そのエリアがAAS の外に出ると生成が中
止され、クリーチャーは消滅される。
(5) Nはそのエリアがプレイヤーから見えてい
る場合、或いは、プレイヤーがリラックス
モードの場合には、強制的に0になる。
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
91. 参考文献
(1) Michael Booth, "Replayable Cooperative Game Design: Left
4 Dead," Game Developer's Conference, March 2009.
(2) Michael Booth, "The AI Systems of Left 4 Dead," Artificial
Intelligence and Interactive Digital Entertainment Conference
at Stanford.
http://www.valvesoftware.com/publications.html
(3) 三宅 陽一郎, “メタAI”,「デジタルゲームの技術」
P.186-190, ソフトバンク クリエイティブ
116. Procedural Generation in WarFrame
• Warframe ではダンジョンが自動生成される。
Daniel Brewer, AI Postmortems: Assassin's Creed III, XCOM: Enemy Unknown, and Warframe (GDC2015)
http://www.gdcvault.com/play/1018223/AI-Postmortems-Assassin-s-Creed
117. Block Combination in WarFrame
• ブロックを組み合わる
• 完全に零からの生成
ではない。
このような生成のことを
Semi-procedural と言う。
Daniel Brewer, AI Postmortems: Assassin's Creed III, XCOM: Enemy Unknown, and Warframe (GDC2015)
http://www.gdcvault.com/play/1018223/AI-Postmortems-Assassin-s-Creed
120. スタートポイント、出口、目的地の
自動生成
Daniel Brewer, AI Postmortems: Assassin's Creed III, XCOM: Enemy Unknown, and Warframe (GDC2015)
http://www.gdcvault.com/play/1018223/AI-Postmortems-Assassin-s-Creed
121. ヒートマップ(影響マップ)を用いて
ゲーム中にプレイヤーの周囲を自動解析
Daniel Brewer, AI Postmortems: Assassin's Creed III, XCOM: Enemy Unknown, and Warframe (GDC2015)
http://www.gdcvault.com/play/1018223/AI-Postmortems-Assassin-s-Creed
ヒートマップ(影響マップ)とは、対象(ここではプレイヤー)を中心に、位置に温度(影響度)を
与える方法です。距離に応じて減衰します。また時間が経つと、周囲に熱が拡散します。
124. アクティブ・エリアセット(Active Are Set)
Daniel Brewer, AI Postmortems: Assassin's Creed III, XCOM: Enemy Unknown, and Warframe (GDC2015)
http://www.gdcvault.com/play/1018223/AI-Postmortems-Assassin-s-Creed
アクティブ・エリアセットは、プレイヤーの周囲の領域で、
リアルタイムにメタAIがゲームを調整する領域
126. メタAI (AI Director,)による
動的ペース調整
Daniel Brewer, AI Postmortems: Assassin's Creed III, XCOM: Enemy Unknown, and Warframe (GDC2015)
http://www.gdcvault.com/play/1018223/AI-Postmortems-Assassin-s-Creed
127. メタAI(自動適応ペーシング)
メタAI (AI Director)による
動的ペース調整
Daniel Brewer, AI Postmortems: Assassin's Creed III, XCOM: Enemy Unknown, and Warframe (GDC2015)
http://www.gdcvault.com/play/1018223/AI-Postmortems-Assassin-s-Creed
128. メタAIによる出会うモンスターの数の
大域調整
Daniel Brewer, AI Postmortems: Assassin's Creed III, XCOM: Enemy Unknown, and Warframe (GDC2015)
http://www.gdcvault.com/play/1018223/AI-Postmortems-Assassin-s-Creed
プレイヤーのスタート地点から出口までの道のりで、
コンスタントにモンスターと出会うようにする。
130. FarCry 4 の事例
Julien Varnier, Far Cry's AI: A Manifesto for Systemic Gameplay
http://archives.nucl.ai/recording/far-crys-ai-a-manifesto-for-systemic-gameplay/
131. FarCry 4 の事例
Julien Varnier, Far Cry's AI: A Manifesto for Systemic Gameplay
http://archives.nucl.ai/recording/far-crys-ai-a-manifesto-for-systemic-gameplay/
132. FarCry 4 の事例
Julien Varnier, Far Cry's AI: A Manifesto for Systemic Gameplay
http://archives.nucl.ai/recording/far-crys-ai-a-manifesto-for-systemic-gameplay/
133. FarCry 4 の事例
Julien Varnier, Far Cry's AI: A Manifesto for Systemic Gameplay
http://archives.nucl.ai/recording/far-crys-ai-a-manifesto-for-systemic-gameplay/
134. FarCry 4 の事例
Julien Varnier, Far Cry's AI: A Manifesto for Systemic Gameplay
http://archives.nucl.ai/recording/far-crys-ai-a-manifesto-for-systemic-gameplay/
135. FarCry 4 の事例
Julien Varnier, Far Cry's AI: A Manifesto for Systemic Gameplay
http://archives.nucl.ai/recording/far-crys-ai-a-manifesto-for-systemic-gameplay/
136. FarCry 4 の事例
Julien Varnier, Far Cry's AI: A Manifesto for Systemic Gameplay
http://archives.nucl.ai/recording/far-crys-ai-a-manifesto-for-systemic-gameplay/
137. FarCry 4 の事例
Julien Varnier, Far Cry's AI: A Manifesto for Systemic Gameplay
http://archives.nucl.ai/recording/far-crys-ai-a-manifesto-for-systemic-gameplay/
138. FarCry 4 の事例
Julien Varnier, Far Cry's AI: A Manifesto for Systemic Gameplay
http://archives.nucl.ai/recording/far-crys-ai-a-manifesto-for-systemic-gameplay/
139. FarCry 4 の事例
Julien Varnier, Far Cry's AI: A Manifesto for Systemic Gameplay
http://archives.nucl.ai/recording/far-crys-ai-a-manifesto-for-systemic-gameplay/
140. FarCry 4 の事例
Julien Varnier, Far Cry's AI: A Manifesto for Systemic Gameplay
http://archives.nucl.ai/recording/far-crys-ai-a-manifesto-for-systemic-gameplay/
Future Work
141. FarCry 4 の事例
Julien Varnier, Far Cry's AI: A Manifesto for Systemic Gameplay
http://archives.nucl.ai/recording/far-crys-ai-a-manifesto-for-systemic-gameplay/
Future Work
142. Julien Varnier, Far Cry's AI: A Manifesto for Systemic Gameplay
http://archives.nucl.ai/recording/far-crys-ai-a-manifesto-for-systemic-gameplay/
FarCry 4 の事例Future Work
166. Scope : movie
Game AI Conference, Paris, June 2009
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
167. Architecture
Game AI Conference, Paris, June 2009
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
168. Scope
Game AI Conference, Paris, June 2009
Killzone 2 / PS3
• Max 32 players
• Team-based game modes
• Multiple game modes on one map
• Players unlock / mix “badge abilities”
• Offline (1 human player & bots)
• Online (human players & bots)
On the AI Strategy for KILLZONE 2′s Multiplayer
Bots
http://aigamedev.com/open/coverage/killzone2/
169. Scope
Game AI Conference, Paris, June 2009
Badges
• Scout: Cloak, Spot-and-Mark
• Tactician: Spawn Area, Air Support
• Assault: Boost
• Engineer: Sentry Turret, Repair
• Medic: Heal, Med packs
• Saboteur: Disguise, C4
On the AI Strategy for KILLZONE 2′s Multiplayer
Bots
http://aigamedev.com/open/coverage/killzone2/
170. Killzone 2 AI (マルチプレイヤーモード)
(1) Killzone 2 のAI思考
(2) Killzone 2 のマップ自動解析
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
171. Killzone 2 Screen
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
174. Individual AI
Game AI Conference, Paris, June 2009
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
186. HTN (Hierarchical Task Network)
Precondition
Task
Precondition
Task
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
187. HTN (Hierarchical Task Network)
各AIの思考 On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
189. On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
190. Strategic Graph
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
191. Strategic Graph
WHY?
Support runtime strategic decision making algorithms.
Help interpret the manual annotations dynamically.
WHAT?
Set of areas created as groups of waypoints.
High-level graph based on the low-level waypoint network.
HOW?
Automatic area generation algorithm done at export time.
On the AI Strategy for KILLZONE 2′s Multiplayer
Bots
http://aigamedev.com/open/coverage/killzone2
/
192. Waypoint Network
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
198. Assassination: Attack Wave 1
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
199. Assassination: Attack Wave 2
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
200. Strategic Pathfinding Costs
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
201. Strategic Pathfinder
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
202. Strategic Pathfinder
Paris Game AI Conference, 2009.
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
225. F.E.A.R.におけるゴール指向プランニング
Genre:Horror FPS
Developer: Monolith Production
Publisher : SIERRA
Hardware: Windows
Year: 2004
Agent Architecture Considerations for Real-Time Planning in Games (AIIDE 2005)
http://web.media.mit.edu/~jorkin/AIIDE05_Orkin_Planning.ppt
230. シンボル
kTargetAtme = ture
この兵士Bは自分を狙っているkTargetIsDead = ture
この兵士Aは死んだ
kWeaponIsLoaded = false
私Cの武器は装填済みでない
Jeff Orkin, “3 States and a Plan: The AI of F.E.A.R.",
http://web.media.mit.edu/~jorkin/gdc2006_orkin_jeff_fear.zip
242. Warfarmeにおける壁面移動
Daniel Brewer, “The Living AI in Warframe’s Procedural Space Ships” (Game AI Conference 2014) ※登録が必要なサイトです
http://archives.nucl.ai/recording/the-living-ai-in-warframes-procedural-space-ships/
プレイヤー
AI
プレイヤーが「ジャンプ・壁面走り・ジャンプ」したデータから
学習して、AIがそのデータをもとに同じ動きをする。
ジャンプ 壁面走り
ジャンプ
251. Mastering the game of Go with deep neural networks and tree search
David Silver,Aja Huang,Chris J. Maddison,Arthur Guez,Laurent
Sifre,George van den Driessche,Julian Schrittwieser,Ioannis
Antonoglou,Veda Panneershelvam,Marc Lanctot, Sander
Dieleman,Dominik Grewe,John Nham,Nal Kalchbrenner,
Ilya Sutskever,Timothy Lillicrap,Madeleine Leach,Koray
Kavukcuoglu,Thore Graepel& Demis Hassabis
Nature 529, 484–489 (28 January 2016) doi:10.1038/nature16961
252. ゲームツリー
• チェスとか(b 35; d 80)
• Go (b 250; d 150) ,
評価関数による
盤面評価
depth
(d)
breadth
(b)
256. ポリシーネットワーク
盤面の状態
19x19の
確率分布
バリューネットワーク
盤面の状態
一つの
評価値
ディープニューラルネットワークなので、実際はこういう形をしています。
入力は盤面の状態です。
Mastering the game of Go with deep neural networks and tree search
David Silver,Aja Huang,Chris J. Maddison, Arthur Guez,Laurent Sifre,George van den Driessche,Julian Schrittwieser,Ioannis Antonoglou,Veda Panneershelvam,Marc Lanctot, Sander
Dieleman,Dominik Grewe,John Nham,Nal Kalchbrenner, Ilya Sutskever,Timothy Lillicrap,Madeleine Leach,Koray Kavukcuoglu,Thore Graepel& Demis Hassabis
Nature 529, 484–489 (28 January 2016) doi:10.1038/nature16961
258. • Pπ ロールアウトポリシー(ロールアウトで討つ手を決める。
Pπ(a|s) sという状態でaを討つ確率)
• Pσ Supervised Learning Network プロの討つ手からその
手を討つ確率を決める。Pσ(a|s)sという状態でaを討つ確
率。
• Pρ 強化学習ネットワーク。Pρ(学習済み)に初期化。
• Vθ(s’) 局面の状態 S’ を見たときに、勝敗の確率を予測
する関数。つまり、勝つか、負けるかを返します。
Mastering the game of Go with deep neural networks and tree search
David Silver,Aja Huang,Chris J. Maddison, Arthur Guez,Laurent Sifre,George van den Driessche,Julian Schrittwieser,Ioannis Antonoglou,Veda Panneershelvam,Marc Lanctot, Sander
Dieleman,Dominik Grewe,John Nham,Nal Kalchbrenner, Ilya Sutskever,Timothy Lillicrap,Madeleine Leach,Koray Kavukcuoglu,Thore Graepel& Demis Hassabis
Nature 529, 484–489 (28 January 2016) doi:10.1038/nature16961
259. Mastering the game of Go with deep neural networks and tree search
David Silver,Aja Huang,Chris J. Maddison, Arthur Guez,Laurent Sifre,George van den Driessche,Julian Schrittwieser,Ioannis Antonoglou,Veda Panneershelvam,Marc Lanctot, Sander
Dieleman,Dominik Grewe,John Nham,Nal Kalchbrenner, Ilya Sutskever,Timothy Lillicrap,Madeleine Leach,Koray Kavukcuoglu,Thore Graepel& Demis Hassabis
Nature 529, 484–489 (28 January 2016) doi:10.1038/nature16961