29. Halo2: Orders & Styles
Order
Initial
If killed X enemies
If X dead
Order
fallback
Style A
Style C
Order
push
forward
Style B
Handling Complexity in the Halo 2 AI, D. Isla, GDC 2005
http://naimadgames.com/publications.html
30. Halo2: Orders & Styles
Order
Initial
If killed X enemies
If X dead
Order
fallback
Style A
Style C
Order
push
forward
Style B
まず、マップを3つの領域に区別する。
「それぞれの領域=戦術ポイント・グループ」として定義する。
Handling Complexity in the Halo 2 AI, D. Isla, GDC 2005
http://naimadgames.com/publications.html
31. Halo2: Orders & Styles
Handling Complexity in the Halo 2 AI, D. Isla, GDC 2005
http://naimadgames.com/publications.html
32. Halo2: Orders & Styles
Order
Initial
If killed X enemies
If X dead
Order
fallback
Style A
Style C
Order
push
forward
Style B
次にそれぞれの領域にビヘイビア・ツリーを割り当てる。
これが、その領域でAIが取る意思決定モジュールとなる。
Handling Complexity in the Halo 2 AI, D. Isla, GDC 2005
http://naimadgames.com/publications.html
33. Halo2: Orders & Styles
Order
Initial
If killed X enemies
If X dead
Order
fallback
Style A
Style C
Order
push
forward
Style B
Handling Complexity in the Halo 2 AI, D. Isla, GDC 2005
http://naimadgames.com/publications.html
こういうチェックボックスのツールで
マスターのビヘイビアツリーをカスタマイズする。
それぞれの領域に割り当てられたビヘイビアツリーを
「スタイル」と言う。 Handling Complexity in the Halo 2 AI, D. Isla, GDC 2005
http://naimadgames.com/publications.html
34. Halo2: Orders & Styles
Order
Initial
If killed X enemies
If X dead
Order
fallback
Style A
Style C
Order
push
forward
Style B
次にそれぞれの領域から領域の遷移条件を定義する。
つまり、これは「領域」をステートとするステートマシンとなる。
Handling Complexity in the Halo 2 AI, D. Isla, GDC 2005
http://naimadgames.com/publications.html
48. Killzone 2 のAI
Based on: Alex Champandard, Tim Verweij, Remco Straatman, "Killzone 2 Multiplayer Bots",
http://files.aigamedev.com/coverage/GAIC09_Killzone2Bots_StraatmanChampandard.pdf
単純なタスクベースのシステムは機能するし、使われることも多い。しかし、
近年の複雑なゲームのAIではよりマルチな時間・空間スケールに対応する必要があり、
階層型タスクネットワーク(HTN, Hierarchical Task Network)が使用される。
49. 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/
50. Killzone 2 Screen
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
51. 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/
59. HTN (Hierarchical Task Network)
Dana Nau et al., “SHOP2: An HTN Planning System”,
Journal of Artificial Intelligence Research 20 (2003) 379-404
60. HTN (Hierarchical Task Network)
Dana Nau et al., “SHOP2: An HTN Planning System”,
Journal of Artificial Intelligence Research 20 (2003) 379-404
Task はプラナーの
規則によって整列される
61. HTN (Hierarchical Task Network)
Dana S. Nau,"Hierarchical Task Network Planning", Lecture slides for Automated Planning:
Theory and Practice http://www.cs.umd.edu/~nau/planning/slides/chapter11.pdf
62. HTN (Hierarchical Task Network)
Dana S. Nau,"Hierarchical Task Network Planning", Lecture slides for Automated Planning:
Theory and Practice http://www.cs.umd.edu/~nau/planning/slides/chapter11.pdf
Task はプラナーの
規則によって整列される
63. HTN (Hierarchical Task Network)
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
64. HTN (Hierarchical Task Network)
Precondition
Task
Precondition
Task
On the AI Strategy for KILLZONE 2′s Multiplayer Bots
http://aigamedev.com/open/coverage/killzone2/
106. The Sims シリーズのAIの作り方
人をダイナミクス(力学系、動的な数値の仕組み )として動かす。
世界を動かす PeerAI(=キャラクターAI) を構築。
Sub
Peer
Meta
Meta
Peer
Sub
[原則] 周囲の対象に対する、あらゆる可能な行動から、
ムード(幸せ) 係数を最大化する行動を選択する。
Sims (not under direct player control) choose what to do by selecting, from all of the
possible behaviors in all of the objects, the behavior that maximizes their current happiness.
Will Wright, AI: A Design Perspective (AIIDE 2005)
http://www.aaai.org/Papers/AIIDE/2005/AIIDE05-041.ppt
Kenneth Forbus, Will Wright, “Some notes on programming objects in The Sims – Example”
http://www.qrg.cs.northwestern.edu/papers/Files/Programming_Objects_in_The_Sims.pdf
107. オブジェクトに仕込むデータ構造
Data (Class, Sate)
Graphics (sprites, z-
buffers)Animations (skeletal)
Sound Effects
Code (Edith)
-Main (object thread)
-External 1
-External 2
-External 3
パラメーター
グラフィックス
アニメーション
サウンド
メインスレッド
いろいろなインタラクションの仕方
Ken Forbus, “Simulation and Modeling: Under the hood of The Sims” (NorthWerstern大学、講義資料) ※IEで見てください。
http://www.cs.northwestern.edu/%7Eforbus/c95-gd/lectures/The_Sims_Under_the_Hood_files/frame.htm
Kenneth Forbus, Will Wright, “Some notes on programming objects in The Sims – Example”
http://www.qrg.cs.northwestern.edu/papers/Files/Programming_Objects_in_The_Sims.pdf
108. The Sims における「モチーフ・エンジン」
Ken Forbus, “Simulation and Modeling: Under the hood of The Sims” (NorthWerstern University)
http://www.cs.northwestern.edu/%7Eforbus/c95-gd/lectures/The_Sims_Under_the_Hood_files/frame.htm
Data
- Needs
- Personality
- Skills
- Relationships Sloppy - Neat
Shy - Outgoing
Serious - Playful
Lazy - Active
Mean - Nice
Physical
- Hunger
- Comfort
- Hygiene
- Bladder
Mental
- Energy
- Fun
- Social
- Room
Motive Engine
Cooking
Mechanical
Logic
Body
Etc.
AIの人格モデル
113. 限界効用逓減の法則
X_Hunger
W_Hunger(-80)
-80 60
W_Hunger(60)
Δ(-80 → 60)=W_Hunger(60)*(60) - W_Hunger(-80)*(-80)
Δ (60→90) =W_Hunger(90)*(90) - W_Hunger(60)*(60)
90
W_Hunger(90)
Δ(-80 → 60) is much larger than Δ(60→90)
ある程度満たされたものを満たすより、
満たされないものをある程度満たす方が大きな満足をもたらす
Utility for hunger
ビールは一杯目が一番おいしい
114. The Sims のAIの原理
三宅陽一郎、「Spore におけるゲームAI技術とプロシージャル」 (DiGRA Japan 第14回 月例研究
http://digrajapan.org/?wpdmact=process&did=Ni5ob3RsaW5r
Ken Forbus, “Simulation and Modeling: Under the hood of The Sims” (NorthWerstern大学、講義資料)
http://www.cs.northwestern.edu/%7Eforbus/c95-gd/lectures/The_Sims_Under_the_Hood_files/frame.htm
Richard Evans, Modeling Individual Personalities in The Sims 3, GDC 2010
http://www.gdcvault.com/play/1012450/Modeling-Individual-Personalities-in-The
115. The Sims 3 では、多くのムードや欲求が準備される。
行動 対象
GDC09 資料 http://www.gdcvault.com/play/1452/(307)-Breaking-the-Cookie-Cutter
123. 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がそのデータをもとに同じ動きをする。
ジャンプ 壁面走り
ジャンプ
132. Neural Networks in Supreme Commander 2 (GDC 2012)
Michael Robbins (Gas Powered Games)
http://www.gdcvault.com/play/1015406/Off-the-Beaten-Path-Non
http://www.gdcvault.com/play/1015667/Off-the-Beaten-Path-Non
ニューラルネットワークの応用
133. Neural Networks in Supreme Commander 2 (GDC 2012)
Michael Robbins (Gas Powered Games)
http://www.gdcvault.com/play/1015406/Off-the-Beaten-Path-Non
http://www.gdcvault.com/play/1015667/Off-the-Beaten-Path-Non
ニューラルネットワークの応用
134. Neural Networks in Supreme Commander 2 (GDC 2012)
Michael Robbins (Gas Powered Games)
http://www.gdcvault.com/play/1015406/Off-the-Beaten-Path-Non
http://www.gdcvault.com/play/1015667/Off-the-Beaten-Path-Non
ニューラルネットワークの応用
135. Neural Networks in Supreme Commander 2 (GDC 2012)
Michael Robbins (Gas Powered Games)
http://www.gdcvault.com/play/1015406/Off-the-Beaten-Path-Non
http://www.gdcvault.com/play/1015667/Off-the-Beaten-Path-Non
ニューラルネットワークの応用
136. ニューラルネットワークの応用
Black & White (Lionhead,2000)
クリーチャーを育てていくゲーム。
クリーチャーは自律的に行動するが、
訓練によって学習させることができる。
http://www.youtube.com/watch?v=2t9ULyYGN-s
http://www.lionhead.com/games/black-white/
137. Belief – Desire – Intention モデル
Desire
(Perceptrons)
Opinions
(Decision Trees)
Beliefs
(Attribute List)
Intention
Overall Plan
(Goal, Main Object)
Attack enemy town
Specific Plan
(Goal, Object List)
Throw stone at house
Primitive Action List
Walk towards stone,
Pick it up,
Walk towards house,
Aim at house,
Throw stone at house
Richard Evans, “Varieties of Learning”, 11.2, AI Programming Wisdom
138. Belief – Desire – Intention モデル
Desire
(Perceptrons)
Opinions
(Decision Trees)
Beliefs
(Attribute List)
Richard Evans, “Varieties of Learning”, 11.2, AI Programming Wisdom
Low Energy
Source =0.2
Weight =0.8
Value =
Source*Weight =
0.16
Tasty Food
Source =0.4
Weight =0.2
Value =
Source*Weight =
0.08
Unhappiness
Source =0.7
Weight =0.2
Value =
Source*Weight =
0.14
∑
0.16+0.08+0.14
Threshold
(0~1の値に
変換)
hunger
Desire(お腹すいた度)欲求を決定する
対象を決定する
それぞれの対象の
固有の情報
他にも
いろいろな
欲求を計算
Hunger
Compassion
Attack(戦いたい)
Help
ニューラルネットワークの応用
Black & White (Lionhead,2000)
157. ⑤ニューラルネットワークの構造が進化させる
「NEAT」の技術
Mat Buckland, Chapter 11, AI techniques for game programming, Premier Press, 2002
(実行ファイルとソースコードがCD-ROMにあります)
これまでニューラルネットは、最初に構造を定義した後は変化しなかった。
動的にニューラルネットの構造を変化させる技術
Neuron Evoluation of Augmenting Topologies (NEAT)
172. Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks
Alec Radford, Luke Metz, Soumith Chintala
(Submitted on 19 Nov 2015 (v1), last revised 7 Jan 2016 (this version, v2))
https://arxiv.org/abs/1511.06434
173. Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks
Alec Radford, Luke Metz, Soumith Chintala
(Submitted on 19 Nov 2015 (v1), last revised 7 Jan 2016 (this version, v2))
https://arxiv.org/abs/1511.06434
178. GPU-BASED PROCEDURAL PLACEMENT
IN HORIZON ZERO DAWN
• https://www.guerrilla-games.com/read/gpu-based-
procedural-placement-in-horizon-zero-dawn
• データからプロシージャルにマップなど、ゲームに必要なデー
タを生成
204. 機械学習
(例)FORZA MOTORSPORT におけるドライビング学習
Ralf Herbrich, Thore Graepel, Joaquin Quiñonero Candela Applied Games Group,Microsoft Research Cambridge
"Forza, Halo, Xbox Live The Magic of Research in Microsoft Products"
http://research.microsoft.com/en-us/projects/drivatar/ukstudentday.pptx
205. Ralf Herbrich, Thore Graepel, Joaquin Quiñonero Candela Applied Games Group,Microsoft Research Cambridge
"Forza, Halo, Xbox Live The Magic of Research in Microsoft Products"
http://research.microsoft.com/en-us/projects/drivatar/ukstudentday.pptx
機械学習
(例)FORZA MOTORSPORT におけるドライビング学習
206. 機械学習
(例)FORZA MOTORSPORT におけるドライビング学習
• 揺らぎ
• ライン – コーナーやそのコンビネーションに対し
て、どれぐらいスムーズに車をガイドするか
• コーナーへの突入スピードとブレーキを踏むタイ
ミングと。保守的か過激か。
• コーナーの頂点にどれぐらい近づくか、どれぐら
いの速度でそこを抜けるか?
• コーナーを抜ける時のスピードとコーナーを回る
時のスピード。
Drivatar がプレイヤーのコントロールから学習するもの
Microsoft Research
Drivatar™ in Forza Motorsport
http://research.microsoft.com/en-us/projects/drivatar/forza.aspx
207. Ralf Herbrich, Thore Graepel, Joaquin Quiñonero Candela Applied Games Group,Microsoft Research Cambridge
"Forza, Halo, Xbox Live The Magic of Research in Microsoft Products"
http://research.microsoft.com/en-us/projects/drivatar/ukstudentday.pptx
機械学習
(例)FORZA MOTORSPORT におけるドライビング学習
プレイヤーの特性を解析する
特徴となる数値をドライブモデルに渡す
208. 機械学習
(例)FORZA MOTORSPORT におけるドライビング学習
Ralf Herbrich, Thore Graepel, Joaquin Quiñonero Candela Applied Games Group,Microsoft Research Cambridge
"Forza, Halo, Xbox Live The Magic of Research in Microsoft Products"
http://research.microsoft.com/en-us/projects/drivatar/ukstudentday.pptx
レーシングラインを事前に構築する。生成というよるテーブルから組み合わせる。
209. 機械学習
(例)FORZA MOTORSPORT におけるドライビング学習
Ralf Herbrich, Thore Graepel, Joaquin Quiñonero Candela Applied Games Group,Microsoft Research Cambridge
"Forza, Halo, Xbox Live The Magic of Research in Microsoft Products"
http://research.microsoft.com/en-us/projects/drivatar/ukstudentday.pptx
レーシングラインを事前に構築する。生成というよるテーブルから組み合わせる。
210. 機械学習
(例)FORZA MOTORSPORT におけるドライビング学習
Ralf Herbrich, Thore Graepel, Joaquin Quiñonero Candela Applied Games Group,Microsoft Research Cambridge
"Forza, Halo, Xbox Live The Magic of Research in Microsoft Products"
http://research.microsoft.com/en-us/projects/drivatar/ukstudentday.pptx
レーシングラインに沿わせるのではなく、理想とする位置とスピードから
コントローラーの制御を計算して、物理制御によって車を運転する。
211. Ralf Herbrich, Thore Graepel, Joaquin Quiñonero Candela Applied Games Group,Microsoft Research Cambridge
"Forza, Halo, Xbox Live The Magic of Research in Microsoft Products"
http://research.microsoft.com/en-us/projects/drivatar/ukstudentday.pptx
機械学習
(例) Halo®3におけるオンライン・マッチング・システム
212. • TrusSkill =プレイヤーの強さを正規分布の中央値と標準偏差
として扱う。
Ralf Herbrich, Thore Graepel, Joaquin Quiñonero Candela Applied Games Group,Microsoft Research Cambridge
"Forza, Halo, Xbox Live The Magic of Research in Microsoft Products"
http://research.microsoft.com/en-us/projects/drivatar/ukstudentday.pptx
機械学習
(例) Halo®3におけるオンライン・マッチング・システム
μ : 中央値
σ: 標準偏差
213. • TrusSkill =プレイヤーの強さを正規分布の中央値と標準偏差
として扱う。
Ralf Herbrich, Thore Graepel, Joaquin Quiñonero Candela Applied Games Group,Microsoft Research Cambridge
"Forza, Halo, Xbox Live The Magic of Research in Microsoft Products"
http://research.microsoft.com/en-us/projects/drivatar/ukstudentday.pptx
機械学習
(例) Halo®3におけるオンライン・マッチング・システム
μ : 中央値
σ: 標準偏差
その人の強さを表す
その人の強さの正確さを示す。
100回やってこのランクの人と
1000回やってこのランクの人では
1000回の人の方が正確
=標準偏差が小さい
214. • スキル 𝜇 𝐴, 𝜎𝐴 のプレイヤーと、スキル 𝜇 𝐵, 𝜎 𝐵
のプレイヤーが
マッチングする確率は、
Ralf Herbrich, Thore Graepel, Joaquin Quiñonero Candela Applied Games Group,Microsoft Research Cambridge
"Forza, Halo, Xbox Live The Magic of Research in Microsoft Products"
http://research.microsoft.com/en-us/projects/drivatar/ukstudentday.pptx
機械学習
(例) Halo®3におけるオンライン・マッチング・システム
μ : 中央値
σ: 標準偏差
𝑒
−
(𝜇 𝐴−𝜇 𝐵)2
2𝐶2
𝑑 (𝑑 =
2𝛽2
𝑐
)
215. 機械学習
(例) Halo®3におけるオンライン・マッチング・システム
2人が対戦して勝ったとき、負けた時の中央値、標準偏差の変化
知能と情報 : 日本知能情報ファジィ学会誌 : journal of Japan Society for Fuzzy Theory and Intelligent Informatics 22(6), 745-756, 2010-12-15
日本知能情報ファジィ学会 「オンラインゲームにおける人工知能・. プロシージャル技術の応用」
http://igda.sakura.ne.jp/sblo_files/ai-igdajp/image/JSFTII_22-6_online20game_Miyake.pdf
224. 強化学習
(例)格闘ゲームTaoFeng におけるキャラクター学習
Ralf Herbrich, Thore Graepel, Joaquin Quiñonero Candela Applied Games Group,Microsoft Research Cambridge
"Forza, Halo, Xbox Live The Magic of Research in Microsoft Products"
http://research.microsoft.com/en-us/projects/drivatar/ukstudentday.pptx
225. 強化学習
(例)格闘ゲームTaoFeng におけるキャラクター学習
Ralf Herbrich, Thore Graepel, Joaquin Quiñonero Candela Applied Games Group,Microsoft Research Cambridge
"Forza, Halo, Xbox Live The Magic of Research in Microsoft Products"
http://research.microsoft.com/en-us/projects/drivatar/ukstudentday.pptx
229. 強化学習
(例)格闘ゲームTaoFeng におけるキャラクター学習
Ralf Herbrich, Thore Graepel, Joaquin Quiñonero Candela Applied Games Group,Microsoft Research Cambridge
"Forza, Halo, Xbox Live The Magic of Research in Microsoft Products"
http://research.microsoft.com/en-us/projects/drivatar/ukstudentday.pptx
Microsoft Research Playing Machines: Machine Learning Applications in Computer Games
http://research.microsoft.com/en-us/projects/mlgames2008/
Video Games and Artificial Intelligence
http://research.microsoft.com/en-us/projects/ijcaiigames/
246. Humanoid Agent
in Social Game Environment (HASGE)
Cladio Pedica - Spontaneous Avatar Behaviour for Social Territoriality Reykjavik University.
http://www.ru.is/~hannes/publications/JAAI2010.pdf
248. F-formation (Kendon, 1984)
• 人と人が向い合うときに、形成する立ち位置。
Paul Marshall,Yvonne Rogers,Nadia Pantidi
Using F-formations to analyse spatial patterns of interaction in physical environments
http://mcs.open.ac.uk/pervasive/pdfs/MarshallCSCW2011.pdf
249. いろいろな F-formation パターン
Paul Marshall,Yvonne Rogers,Nadia Pantidi
Using F-formations to analyse spatial patterns of interaction in physical environments
http://mcs.open.ac.uk/pervasive/pdfs/MarshallCSCW2011.pdf
250. いろいろな F-formation パターン
Paul Marshall,Yvonne Rogers,Nadia Pantidi
Using F-formations to analyse spatial patterns of interaction in physical environments
http://mcs.open.ac.uk/pervasive/pdfs/MarshallCSCW2011.pdf
251. EVE ONLINE
Cladio Pedica - Spontaneous Avatar Behaviour for Social Territoriality Reykjavik University.
http://www.ru.is/~hannes/publications/JAAI2010.pdf
278. Reckoning におけるターゲットシステム
GDC 2012 AI Postmortems:
Kingdoms of Amalur: Reckoning, Darkness II and Skulls of the Shogun
Michael Dawe,
http://www.gdcvault.com/play/1015380/AI-Postmortems-Kingdoms-of-Amalur
279. Reckoning におけるターゲットシステム
GDC 2012 AI Postmortems:
Kingdoms of Amalur: Reckoning, Darkness II and Skulls of the Shogun
Michael Dawe,
http://www.gdcvault.com/play/1015380/AI-Postmortems-Kingdoms-of-Amalur
280. Reckoning におけるターゲットシステム
GDC 2012 AI Postmortems:
Kingdoms of Amalur: Reckoning, Darkness II and Skulls of the Shogun
Michael Dawe,
http://www.gdcvault.com/play/1015380/AI-Postmortems-Kingdoms-of-Amalur
281. Reckoning におけるターゲットシステム
GDC 2012 AI Postmortems:
Kingdoms of Amalur: Reckoning, Darkness II and Skulls of the Shogun
Michael Dawe,
http://www.gdcvault.com/play/1015380/AI-Postmortems-Kingdoms-of-Amalur