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.
Immutable Image-Based Operating Systems - EW2024.pdf
AIES 2021 Keynote lecture
1. Empathic Entertainment in Digital Game
Youichiro Miyake
AIES 2021
https://www.facebook.com/youichiro.miyake
http://www.slideshare.net/youichiromiyake
y.m.4160@gmail.com @miyayou
7. What is digital game ?
• Interactive Digital Space
• The space becomes structured
• AI becomes a module in a whole system
8. Level Script
Navigation AI
Character AI
メタAI
1995 2000 2005 2010
(3D Games)
1994
2005
(
2010頃~
(Open World Game)
Spatial AI
1980
PlayStation
(1994)
Xbox360
(2005)
PlayStation3
(2006)
Scripted AI
三宅陽一郎、水野勇太、里井大輝、 「メタAI」と「AI Director」の歴史的発展、日本デジタルゲーム学会(2020年、Vol.13, No.2)
LS-Model Model LCN-AI Model MCS-AI Cooperative
Model
MCN-AI Model
9. レベル
Character AI
Enemy
character
Player
情報獲得
Spatial AI
Meta-AI
Order
Ask &
Report
ゲーム全体をコントロール
Support
query
query
頭脳として機能
MCS-AI dynamic co-
operative model
Dynamic allocation of enemies
Observing level in real-time
Direction for agents
Making progress of game
Autonomous thinking
Cooperation
Team AI
Preparing data to make Meta-AI and
Character AI recognize the level
Managing object representation
Managing Navigation data
Path-finding / Tactical point analysis
10. AI in game, and AI outside of game
Game AI
(outside of game)
Game AI
(In game)
Meta-AI
Character
AI
Navigation
AI
Supporting
AI
QA-AI
Auto-balancing
AI
Interface-AI
Data Mining
Simulation
Game
Visualization
Biofeedback
11. Contents
• Chapter 1. Overview
• Chapter 2. Meta-AI
• Chapter 3. Meta-AI x ProceDural contents generation
• Chapter 4. Character AI
• Chapter 5. Character Behavior Learning
• Chapter 6. Decision Making Algorithm
• Chapter 7. Spatial AI
• Chapter 8. Deep Learning
• Chapter 9. Future of Game AI
12. レベル
Character AI
Enemy
character
Player
情報獲得
Spatial AI
Meta-AI
Order
Ask &
Report
ゲーム全体をコントロール
Support
query
query
頭脳として機能
MCS-AI dynamic co-
operative model
Dynamic allocation of enemies
Observing level in real-time
Direction for agents
Making progress of game
Autonomous thinking
Cooperation
Team AI
Preparing data to make Meta-AI and
Character AI recognize the level
Managing object representation
Managing Navigation data
Path-finding / Tactical point analysis
13. Meta AI History
1980 1990
1980 1990 2000
Classical Meta AI
Modern Meta AI
Development of Character AI
(Autonomous AI )
Classical Meta AI to control difficulty of the game (Weaken enemies).
Modern Meta AI to design game system dynamically.
15. Classical Meta AI = Dynamic difficulty Adaptive AI
岩谷徹氏: ファンと一般のユーザーを満足させる方法のひとつは人工知能AIのような考え方です。プ
レーヤースキルをプログラム側から判断して、難易度を調整していくというものです。これを私はセ
ルフゲームコントロールシステムと呼んで10年以上前から開発に使っています。
- International Game Designers Panel -
http://game.watch.impress.co.jp/docs/20050312/gdc_int.htm
Toru Iwatani (PACMAN Creator) said :
A way to satisfy game freak and game fun is AI .
By judging player’s skill by program, difficulty level is
dynamically adaptive to the player.
That is called “Level Control System”,
which had been used for 10 years.
16. AI Director (Meta 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
Example : Left 4 Dead
17. Modern Meta AI
Meta AI dynamically changes a game
Meta AI
Allocation of
enemies
Spawning
enemies
Story
Generation
Procedural
Terrain Generation
User
Experience
18. Left 4 Dead (Valve)
AI Director controls NPC spawning distribution and game-play-pacing.
Genre:Online Action
Developer: Valve software
Publisher : Valve software
Hardware: XBox360
Year: 2006 Using nav-mesh for recognizing and controlling
Real-time status of game.
Michael Booth, "Replayable Cooperative Game Design: Left 4 Dead," Game Developer's Conference, March 2009 http://www.valvesoftware.com/publications.html
19. Left 4 Dead – AI Director
Meta AI recognize game status in real-time
Predicting player’s route and spawning monsters dynamically.
Michael Booth, "Replayable Cooperative Game Design: Left 4 Dead," Game Developer's Conference, March 2009 http://www.valvesoftware.com/publications.html
20. AI Director decide when enemies are spawned.
USER’S INTENSITY
ACTUAL POPULATION
DESIRED
POPULATION
Build Up …プレイヤーの緊張度が目標値を超えるまで
敵を出現させ続ける。
Sustain Peak … 緊張度のピークを3-5秒維持するために、
敵の数を維持する。
Peak Fade … 敵の数を最小限へ減少して行く。
Relax … プレイヤーたちが安全な領域へ行くまで、30-45秒間、
敵の出現を最小限に維持する。
AI Director makes users relax, and break relax repeatedly.
Michael Booth, "Replayable Cooperative Game Design: Left 4 Dead," Game Developer's Conference, March 2009 http://www.valvesoftware.com/publications.html
Meta AI(=AI Director) observes players’ action in real-time in Left 4 Dead
21. Adaptive Dramatic Dynamic Pacing
[Basic Idea]
(1) Meta AI populates many enemies, enough to get
user’s intention up to the value (measured by
input).
(2) When user’s intention goes over the value, meta
AI stops the population.
(3) When user becomes relaxed, go to (1).
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and
Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
22. Meta AI recognize game status
via Navigation-Mesh
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
23. 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
The area where meta-AI
populate and extinguish
agents is called
AAS(= Active Area Set)
24. 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
25. 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
26. Flow Distance(predicting a path)
Meta- AI predict a path
- where they arrive
- where is back
- direction
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
27. Action to AAS
Meta AI spawns and extinguishes
enemies in 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
28. Area seen from player
In the Area where player can see,
Meta-AI cannot spawn enemies
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
29. Area to spawn enemies
FRONT BACK
Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
Meta- AI spawns enemies in the area players cannot see.
30. Monster and Item appearance frequency
High
Low
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 (High)
Mobs(Middle)
Special Infected (Middle)
Bosses (Low)
Weapon Caches (Low)
Scavenge Items (Middle)
31. Michael Booth, "The AI Systems of Left 4 Dead," Artificial Intelligence and Interactive Digital Entertainment Conference at Stanford.
http://www.valvesoftware.com/publications.html
(1) Decide number of enemies to populate
by user’s escape route length.
(2) Populate enemies along the route in a
area around the player.
(3) When a player goes out the area, the
population stops, and enemies vanish.
(4) In the state of relax or when the are
can be seen from a player, all enemies
are eliminated from the map.
Algorithm of Meta AI
32. References
(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, ソフトバンク クリエイティブ
33. Contents
• Chapter 1. Overview
• Chapter 2. Meta-AI
• Chapter 3. Meta-AI x ProceDural contents generation
• Chapter 4. Character AI
• Chapter 5. Character Behavior Learning
• Chapter 6. Decision Making Algorithm
• Chapter 7. Spatial AI
• Chapter 8. Deep Learning
• Chapter 9. Future of Game AI
35. Procedural Generation in WarFrame
The Living AI in Warframe's Procedural Space Ships Dan Brewer, Digital Extremes
http://aigamedev.com/open/coverage/vienna14-report/#session8
36. Black Combination in WarFrame
The Living AI in Warframe's Procedural Space Ships Dan Brewer, Digital Extremes
http://aigamedev.com/open/coverage/vienna14-report/#session8
37. Procedural Generation Map in WarFrame
The Living AI in Warframe's Procedural Space Ships Dan Brewer, Digital Extremes
http://aigamedev.com/open/coverage/vienna14-report/#session8
38. Auto-analyzing the map in WarFrame
The Living AI in Warframe's Procedural Space Ships Dan Brewer, Digital Extremes
http://aigamedev.com/open/coverage/vienna14-report/#session8
39. Start, Exit, objectives auto-distribution
in WarFrame
The Living AI in Warframe's Procedural Space Ships Dan Brewer, Digital Extremes
http://aigamedev.com/open/coverage/vienna14-report/#session8
40. Influence Map
The Living AI in Warframe's Procedural Space Ships Dan Brewer, Digital Extremes
http://aigamedev.com/open/coverage/vienna14-report/#session8
41. Influence Map
The Living AI in Warframe's Procedural Space Ships Dan Brewer, Digital Extremes
http://aigamedev.com/open/coverage/vienna14-report/#session8
42. Active Are Set
The Living AI in Warframe's Procedural Space Ships Dan Brewer, Digital Extremes
http://aigamedev.com/open/coverage/vienna14-report/#session8
43. Meta AI
(AI Director, Dynamic Adaptive Pacing)
The Living AI in Warframe's Procedural Space Ships Dan Brewer, Digital Extremes
http://aigamedev.com/open/coverage/vienna14-report/#session8
44. メタAI(自動適応ペーシング)
Meta AI
(AI Director, Dynamic Adaptive Pacing)
The Living AI in Warframe's Procedural Space Ships Dan Brewer, Digital Extremes
http://aigamedev.com/open/coverage/vienna14-report/#session8
45. Summary
Classical Game System Modern Game System
In classical game system, game contents are fixed after the development,
but in modern game system, game contents are dynamically created.
46. Summary
Classical Game System Modern Game System
Meta AI dynamically creates a game play flow, and gives an order to character AI and a game event.
The reason why meta AI action is simple is that character AI has become autonomous.
47. Referenced Papers
(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
48. Contents
• Chapter 1. Overview
• Chapter 2. Meta-AI
• Chapter 3. Meta-AI x ProceDural contents generation
• Chapter 4. Character AI
• Chapter 5. Character Behavior Learning
• Chapter 6. Decision Making Algorithm
• Chapter 7. Spatial AI
• Chapter 8. Deep Learning
• Chapter 9. Future of Game AI
50. レベル
Character AI
Enemy
character
Player
情報獲得
Spatial AI
Meta-AI
Order
Ask &
Report
ゲーム全体をコントロール
Support
query
query
頭脳として機能
MCS-AI dynamic co-
operative model
Dynamic allocation of enemies
Observing level in real-time
Direction for agents
Making progress of game
Autonomous thinking
Cooperation
Team AI
Preparing data to make Meta-AI and
Character AI recognize the level
Managing object representation
Managing Navigation data
Path-finding / Tactical point analysis
51. FC SFC SS, PS PS2,GC,Xbox Xbox360, PS3, Wii
DC (次世代)
Hardware 時間軸
2005
1999
Character AI
Complex AI
AI and game world has become more complex
Simple AI
(スペースインベーダー、タイトー、1978年) (アサシンクリード、ゲームロフト、2007年)
52. (Ex) Space Invader (1978)
プレイヤーの動きに関係なく、決められた動きをする
(スペースインベーダー、タイトー、1978年)
62. Deep Learning in Ubisoft
https://gdcvault.com/play/1025653/The-Alchemy-and-Science-of
The Alchemy and Science of Machine Learning for Games
Yves Jacquier (Ubisoft Montreal)
63. Deep Learning in Ubisoft
https://gdcvault.com/play/1025653/The-Alchemy-and-Science-of
The Alchemy and Science of Machine Learning for Games
Yves Jacquier (Ubisoft Montreal)
65. 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
Unhappines
s
Source =0.7
Weight =0.2
Value =
Source*Weight =
0.14
∑
0.16+0.08+0.14
Threshold
(0~1の値に
変換)
hunger
Perceptron in Black & White (Lionhead,2000)
66. Black & White (Lionhead,2000)
Training of creature by learning
http://www.youtube.com/watch?v=2t9ULyYGN-s
http://www.lionhead.com/games/black-white/
14:20-
67. Reinforcement Learning
(Ex) Fighting Game
Kick
Punc
h
Magic
R_0 : Reward = Damage
http://piposozai.blog76.fc2.com/
http://dear-croa.d.dooo.jp/download/illust.html
68. LEARNING TO FIGHT T. Graepel, R. Herbrich, Julian Gold Published 2004 Computer Science
https://www.microsoft.com/en-us/research/wp-content/uploads/2004/01/graehergol04.pdf
69. 3 ft
Q-Table THROW KICK STAND
1ft / GROUND
2ft / GROUND
3ft / GROUND
4ft / GROUND
5ft / GROUND
6ft / GROUND
1ft / KNOCKED
2ft / KNOCKED
3ft / KNOCKED
4ft / KNOCKED
5ft / KNOCKED
6ft / KNOCKED
actions
game
states
13.2 10.2 -1.3
3.2 6.0 4.0
+10.0
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
70. Early in the learning process … … after 15 minutes of learning
Reward for decrease in Wulong Goth’s health
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
71. Early in the learning process … … after 15 minutes of learning
Punishment for decrease in either player’s health
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
72. Typical Agents in Digital Games
(1)Morikawa-kun (SCE、1997年)
(2)Astronoka (ENIX、1998年)
(3)The Sims(EA, Maxis, 2000)
73. 1997「GANBARE MORIKAWAKUN 2GO」 (PLAYSTATION)
Character Control by
Neural Network
三宅 陽一郎「ゲームAI技術20年の進化とこれから」 https://cedil.cesa.or.jp/cedil_sessions/view/1943 森川幸人「やってきたこと」より引用
Action
Player orders an action Player orders an action
Reaction from an item
Decision Making
Learning from the result
AI!
74. Color1
Color 2
Form
Smell
Sound
Behavior
…
Take an action
Knock
Kick
Take back
Eat
Jump
Push
おいしい
快い
不快
Impression from item
Nourishing
Enjoyable
Damaged
Fear
Fine
…
Table Data
…
…
…
…
Texture
Neural Network with
Backpropagation in game
ゲーム中にBP学習される
ニューラルネットワーク②
Put it on
the head
75. Typical Agents in Digital Games
(1)Morikawa-kun (SCE、1997年)
(2)Astronoka (ENIX、1998年)
(3)The Sims(EA, Maxis, 2000)
77. Genetic Algorithm
Make a group evolve in one direction
First generation New generation(100~)
…
Evolution by generation
One generation produces a next generation
78. Genetic Algorithm
遺伝子
Gene
Next
Generation
Parent ①
Parent②
Pick up two parents
from base group
Crossover two genes Produce new generation
(selection) (crossover) (production)
Present Generation
The iteration makes a desired generation in the environment
遺伝子
Gene
79. Flow chart
of GA
A player makes traps
Beginning of a day
Trap battle begins
Trap battle ends
Evaluation
Fitness value
Order
Delete the last two NPC
Pick up two parents from NPCs with high fitness value
Generate two new NPCs
Generate new generation
Get enough number of new NPC
The day ends
Generation exchange
rate changes
Mutation rate changes
80. 4-② Simulation and evaluation
Evaluation score is proportional to how long NPC go into the field
avoiding and breaking traps.
G
Fitness=Score+Time*0.3+Enjoy param*0.5+Trap_Score+Safety+HP*0.5
Time for clear
G
C B A B C
C B C
C
S
G
A
B
C
Start
Bonus =100
Goal
Bonus =50
Bonus =30
Bonus =10
Bonus =0
81. GA improvement in Game system
Average of fitness
A curve of fitness a day
Generations
(1) To give a feeling of evolution to users,
the game system evolves 5 generations a day by GA.
(2) To make constant speed of evolution of one day,
the game system controls the number of iterations of GA evolution.
82. Typical Agents in Digital Games
(1)Morikawa-kun (SCE、1997年)
(2)Astronoka (ENIX、1998年)
(3)The Sims(EA, Maxis, 2000)
83. The Sims(EA, Maxis, 2000)
• The game is to observe a society of agents
Ken Forbus, “Simulation and Modeling: Under the hood of The Sims” (NorthWerstern Univ)
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
84. The Sims 「Motif Engine」
• AI Character Engine
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.
85. Utility-based Agent
• Principle = Maximize a modd
Hunger +20
Comfort -12
Hygiene -30
Bladder -75
Energy +80
Fun +40
Social +10
Room - 60
Mood +18
- Urinate (+40 Bladder)
- Clean (+30 Room)
- Unclog (+40 Room)
Mood +26
- Take Bath (+40 Hygiene)
(+30 Comfort)
- Clean (+20 Room)
Mood +20
Bathtub
Toilet
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
86. Mood calculation
Mood =
W_Hunger(X_Hunger) * X_Hunger + W_Engergy(X_Energy) * X_Energy + …
-100 0 100
-100 0 100 -100 0 100
-100 0 100
-100 0 100 -100 0 100
W_Hunger W_Energy
W_Comfort W_Fun
W_Hygiene W_Social
W_Bladder W_Room
-100 0 100 -100 0 100
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
96. Decision Making Model
State-based AI
Goal-based AI
Rule-based AI
Behavior-based AI
Usually decision-Making is a very complex process.
But in artificial intelligence, there are some simple basic styles.
Simulation-based AI
Utility-based AI
Task-based AI
Decision Making
Reactive
Non-Reactive
97. Decision Making Model
State-based AI
Goal-based AI
Rule-based AI
Behavior-based AI
Usually decision-Making is a very complex process.
But in artificial intelligence, there are some simple basic styles.
Simulation-based AI
Utility-based AI
Task-based AI
Decision Making
Reactive
Non-Reactive
98. F.E.A.R Agent Architecture
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
Sensors
Working
Memory
Planner
Blackboard
Navigation
Animation /
Movement
Targeting
Weapons
World
World
99. Planning by Chaining Example
kSymbol_
TargetIsDead
kSymbol_
TargetIsDead
Attack
kSymbol_
WeaponLoaded
kSymbol_
WeaponLoaded
Reload
kSymbol_
WeaponArmed
kSymbol_
WeaponArmed
Pick up
a weapon
None
Planner
Planning
Action
Pools
100. Replaning AI in F.E.A.R.
Jeff Orkins, Three States and a Plan: The AI of FEAR
http://alumni.media.mit.edu/~jorkin/gdc2006_orkin_jeff_fear.pdf
101. Decision Making Model
State-based AI
Goal-based AI
Rule-based AI
Behavior-based AI
Decision Making is generally a very complex high-degree process.
But for digital game there are 7 simple decision making algorithms.
Simulation-based AI
Utility-based AI
「(something)-based AI」means that an algorithm uses (something) as a unit.
Task-based AI
Decision Making
102. State Machine
State
State State
State Machine(Finite State Machine)
AI’s instruction is described in a state, and changes in the world and
AI are described in a transition condition.
A state machine has a loop structure but does not have feedback dynamics.
103. Hierarchical State Machine
Two enemy characters are patrolling. One player comes to the room.
AI character is described as Hierarchical Finite State Machine (HFSM).
106. Watch
Chase Chase
Attack
Attack Warning
Command Ally
Watch the exit
Call an Ally
Ally not found
& Out of
battle field
Join with Ally
Join with Ally
Found Ally
Lost enemy
Found enemy
Lost enemy
Found enemy
Patrol
10 sec.
passed
Hear a
sound
Ally Responds
Transition
Condition State
Higher State
Hierarchical State Machine
107. Decision Making Model
State-based AI
Goal-based AI
Rule-based AI
Behavior-based AI
Decision Making is generally a very complex high-degree process.
But for digital game there are 7 simple decision making algorithms.
Simulation-based AI
Utility-based AI
「(something)-based AI」means that an algorithm uses (something) as a unit.
Task-based AI
Decision Making
110. (1) Hierarchical Structure of Box
(2) Each box has some behaviors
(3) Each box has one selection-rule
(random, sequential, priority-order…)
(4) Finally, one behavior is selected at end-of-tree.
(5) Decision Making
Behavior-based AI
Genre:SciFi-FPS
Developer: BUNGIE Studio
Publisher : Microsoft
Hardware: Xbox, Windows, Mac
Year: 2004
Behavior-Tree (has become very popular method .)
Damian Isla (2005), Handling Complexity in the Halo 2 AI,
GDC Proceedings.,
http://www.gamasutra.com/gdc2005/features/20050311/isla_01.shtml
112. Decision Making Model
State-based AI
Goal-based AI
Rule-based AI
Behavior-based AI
Decision Making is generally a very complex high-degree process.
But for digital game there are 7 simple decision making algorithms.
Simulation-based AI
Utility-based AI
「(something)-based AI」means that an algorithm uses (something) as a unit.
Task-based AI
Decision Making
113. State machine compared to Behavior tree
• State machine= Steady control step by step
• Behavior tree = Adapt behavior fluently
We want to use both good points
114. Contents
• Chapter 1. Overview
• Chapter 2. Meta-AI
• Chapter 3. Meta-AI x ProceDural contents generation
• Chapter 4. Character AI
• Chapter 5. Character Behavior Learning
• Chapter 6. Decision Making Algorithm
• Chapter 7. Spatial AI
• Chapter 8. Deep Learning
• Chapter 9. Future of Game AI
117. レベル
Character AI
Enemy
character
Player
情報獲得
Spatial AI
Meta-AI
Order
Ask &
Report
ゲーム全体をコントロール
Support
query
query
頭脳として機能
MCS-AI dynamic co-
operative model
Dynamic allocation of enemies
Observing level in real-time
Direction for agents
Making progress of game
Autonomous thinking
Cooperation
Team AI
Preparing data to make Meta-AI and
Character AI recognize the level
Managing object representation
Managing Navigation data
Path-finding / Tactical point analysis
122. History of Tactical Point System
• Tactical Position Picking
Killzone (2005, Guerrilla) in Program
• TPS (Tactical Point System)
CRYENGINE (2010, CRYTEK) Tool & Runtime System
• EQS(Environment Query System)
UNREAL ENGINE 4 (2014, Epic games)Tool & Runtime System
• PQS (Point Query System)
FINAL FANTASY XV (2016, SQUARE ENIX)
123. Point Query System
A system to find a best positon
- for a character’s ability
- in a terrain
- in real-time
124. Point Query System principle
Point distribution (Generation)
distributing point around the objective (例)grid、circle
Filtering
Removing points not adjust for a purpose by a conditon (1)
.
.
.
Evaluation
Evaluation for remained points and pick up one points with best score
Filtering
Removing points not adjust for a purpose by a conditon (2)
Filtering
Removing points not adjust for a purpose by a conditon (N)
125. PQS (Point Query System)
A bowman finds the best point
(i) Game situation
(ii) Generating points around it
(iii) Filtering points with bad terrain
(iv) Filtering points where it’s arrow
can not reach
(v) Filtering points around buddies
(vi) Picking up one point with
highest terrain
139. StarCraftのAI
• Santiago Ontañon, Gabriel Synnaeve, Alberto Uriarte, Florian
Richoux, David Churchill, et al..
• “A Survey of Real-Time Strategy Game AI Research and
Competition in StarCraft”. IEEE Transactions on
Computational Intelligence and AI in games, IEEE
Computational Intelligence Society, 2013, 5(4), pp.1-19. hal-
00871001
• https://hal.archives-ouvertes.fr/hal-00871001
143. StarCraft II API
StarCraft II Binary
PySC2
Agent
アクション select_rect(p1, p2) or build_supply(p3) or …
観察
Resource
Possible action
Construction order
Screen
(Game
Information)
Minimap
Reward
-1/0/+1
SC2LE
154. ボードゲーム自動生成
[参考文献]
Mark J. Nelson, “Bibliography: Encoding and generating videogame mechanics”,
IEEE CIG 2012 tutorial
https://www.kmjn.org/notes/generating_mechanics_bibliography.html
Cameron Browne,“Evolutionary Game Design”, SpringerBriefs in Computer Science, 2011
Cameron Browne, Frederic Maire, “Evolutionary Game Design”,
IEEE Transactions on Computational Intelligence and AI in Games ( Volume: 2, Issue: 1, March 2010)
155. game
Tic-Tac-Toe
Players
White
Black
board
end
All
Win
In-a-row
3
tiling
Square
i-nbors
shape
square
size
3 3
[参考文献]
Mark J. Nelson, “Bibliography: Encoding and generating videogame mechanics”,
IEEE CIG 2012 tutorial
https://www.kmjn.org/notes/generating_mechanics_bibliography.html
Cameron Browne,“Evolutionary Game Design”, SpringerBriefs in Computer Science, 2011
Cameron Browne, Frederic Maire, “Evolutionary Game Design”,
IEEE Transactions on Computational Intelligence and AI in Games ( Volume: 2, Issue: 1, March
2010)
159. [参考文献]
Mark J. Nelson, “Bibliography: Encoding and generating videogame mechanics”,
IEEE CIG 2012 tutorial
https://www.kmjn.org/notes/generating_mechanics_bibliography.html
Cameron Browne,“Evolutionary Game Design”, SpringerBriefs in Computer Science, 2011
Cameron Browne, Frederic Maire, “Evolutionary Game Design”,
IEEE Transactions on Computational Intelligence and AI in Games ( Volume: 2, Issue: 1, March
2010)
164. Contents
• Chapter 1. Overview
• Chapter 2. Meta-AI
• Chapter 3. Meta-AI x ProceDural contents generation
• Chapter 4. Character AI
• Chapter 5. Character Behavior Learning
• Chapter 6. Decision Making Algorithm
• Chapter 7. Spatial AI
• Chapter 8. Deep Learning
• Chapter 9. Future of Game AI
165. City Control AI
Road obeserbing AI
Area Control AI
Observing and
Controlling AI
For building
Observing and
Controlling AI
For roads
Observing and
Controlling AI
For Park
Observing and
Controlling AI
For Human
Command Report Command Report
監視
制御
Huma
n Drone Robot
Digital
Avatar
Human
監視
制御
監視
制御
監視
制御
監視
制御
協調
協調
Coope
ration
Coopera
tion
監視
制御
監視
制御
監視
制御
City
166. City Control AI
Road obserbing AI
Area Control AI
Observing and
Controlling AI
For building
Observing and
Controlling AI
For roads
Observing and
Controlling AI
For Park
Observing and
Controlling AI
For Human
Command Report Command Report
監視
制御
Huma
n Drone Robot
Digital
Avatar
Human
監視
制御
監視
制御
監視
制御
監視
制御
協調
協調
Coope
ration
Coopera
tion
監視
制御
監視
制御
監視
制御
City
MetaAI
Character AI
Character AI
Character AI
Spatial AI