30. 3 第二次AIブーム(1980年代)
IF (A) then B
IF (C) then D
IF (E) then F
IF (G) then H
IF ( I ) then J
シンボルによる人工知能
(記号主義)
ニューラルネットによる人工知能
(コネクショニズム)
ルールベース
新しい学習法=
逆伝搬法
112. Halo AI のアーキテクチャー
イベント
Jaime Griesemer(GDC 2002),The Illusion of Intelligence: The Integration of AI and Level Design in Halo
http://www.bungie.net/Inside/publications.aspx
この図はHaloのキャラクターAIの
意思決定の仕組みを表す図。
114. Halo AI の意志決定部分
イベント
チャージ, 退却, 隠れる場所を探す
グレネードを投げる、車に入る、死体を確認、など。
単純なロジックで1ページ未満の
簡単なコードからなる。「グラントはすぐ逃げる。」
「エリートは傷つくと隠れる。」
「ジャッカルはシールドを持つ。」 など。
各ビヘイビア(振る舞い)はトリガー条件を持ち、
条件を満たすビヘイビアはオン(行動候補)になる。
意思決定
ロジック
モーション
コントロール
FSM
Jaime Griesemer(GDC 2002),The Illusion of Intelligence: The Integration of AI and Level Design in Halo
http://www.bungie.net/Inside/publications.aspx
115. Halo AI のアーキテクチャー
イベント
状況解析
Jaime Griesemer(GDC 2002),The Illusion of Intelligence: The Integration of AI and Level Design in Halo
http://www.bungie.net/Inside/publications.aspx
演出(セリフ)
最後はアクションを選択して、
モーションを作る。
116. Halo AI のアーキテクチャー
イベント
状況解析
Jaime Griesemer(GDC 2002),The Illusion of Intelligence: The Integration of AI and Level Design in Halo
http://www.bungie.net/Inside/publications.aspx
演出(セリフ)
このような仕組みで、
各キャラクターは、
各瞬間に意思決定を
し続ける。
118. Halo におけるキャラクターの位置取り
• マップに戦術ポイントを埋め込み。
• 戦術ポイントをグルーピング。
• 移動先を決めるために、各ポイン
トに対して、以下の要素を計算し
て重みを付けて評価する。
– 視線が通るか(LOS, Line of Sight)
– ターゲットへの距離
– カバーポイントへ近いかどうか
– 味方と敵への距離
– … Jaime Griesemer(GDC 2002),The Illusion of Intelligence: The Integration of AI and Level Design in Halo
http://halo.bungie.net/inside/publications.aspx
119. Halo におけるキャラクターの位置取り
(左図)はゲーム画面でAIが戦っている。
実際は(中央図)のように、あらかじめ設定された戦術ポイントに立って戦闘をしている。
いくつかの戦術ポイントのうち、どれを選ぶかと言えば、射線(LOS, Line of Sight)などの
情報を基にポイントを評価して選択する。
またプレイヤーの味方グループのキャラクターは、プレイヤーの近くの戦術ポイントに
入ることで、プレイヤーを護衛しているかのような行動を取ることができる。
Jaime Griesemer(GDC 2002),The Illusion of Intelligence: The Integration of AI and Level Design in Halo
http://halo.bungie.net/inside/publications.aspx
122. Halo におけるバトルフロー
プログラマは一体一体のAIの思考を作るが、ゲームデザイナーはバトル全体の流れを
作る。
キャラクターのグループは戦術ポイントグループから戦術ポイントグループへ移動する。
ポイントグループを作り、どのキャラクターグループがどこを占拠するべきか、また、どこ
に撤退すべきかを、グループごとの攻撃と撤退条件を決定する。
このようにゲームデザイナーは戦場の動き(バトルフロー)全体をデザインする。
Jaime Griesemer(GDC 2002),The Illusion of Intelligence: The Integration of AI and Level Design in Halo
http://halo.bungie.net/inside/publications.aspx
155. メタ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 の事例を見てみる。
157. メタ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
より具体的なアルゴリズム
159. メタ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) と
言う。
160. メタ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
161. メタ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
162. 安全な領域までの道のり(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
164. 敵出現領域
背後 前方
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
前方と背後のプレイヤー群から見えてない部屋に、
モンスターを発生させる。
166. メタ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 の事例を見てみる。
167. メタ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
より具体的なアルゴリズム
168. 安全な領域までの道のり(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
192. 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
193. 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の人格モデル
205. 強化学習
(例)格闘ゲーム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/
247. プレイヤーたちの戦力 > 1.4 x エージェントたちの戦力
P
プレイヤーたちの戦力 < 1.4 x エージェントたちの戦力
本拠地へ
退却
戦闘!
クロムハウンズにおけるマルチエージェント技術
③ 戦闘判断 エージェントが周りの敵と味方の戦力を計算して
戦うべきか、逃げるべきかを判断する。
P
P
P
P
P
P
P P
戦力比が大きい無駄な戦闘を回避し、常に相手を上回る
戦力を増築してプレイヤーに対抗する
デバッグの過程で追加
262. CORE Layer は、Physical Laryer 、Mission Layer のうちで、
どの認識を生成するかを決定するコマンドを投げる。
CERA-CRANIUM認識モデル
Arrabales, R. Ledezma, A. and Sanchis, A. "Towards the Generation of Visual Qualia
in Artificial Cognitive Architectures". (2010)
http://www.conscious-robots.com/raul/papers/Arrabales_BICS2010.pdf
280. 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
281. Black 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
284. スタートポイント、出口、目的地の
自動生成
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
285. ヒートマップ(影響マップ)を用いて
ゲーム中にプレイヤーの周囲を自動解析
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
ヒートマップ(影響マップ)とは、対象(ここではプレイヤー)を中心に、位置に温度(影響度)を
与える方法です。距離に応じて減衰します。また時間が経つと、周囲に熱が拡散します。
288. アクティブ・エリアセット(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がゲームを調整する領域
290. メタ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
291. メタ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
292. メタ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
プレイヤーのスタート地点から出口までの道のりで、
コンスタントにモンスターと出会うようにする。