Artificial Intelligence For Games 2nd Edition Ian Millington 2025 Easy Download
Artificial Intelligence For Games 2nd Edition Ian Millington 2025 Easy Download
https://ebookultra.com/download/artificial-intelligence-for-
games-2nd-edition-ian-millington/
Artificial Intelligence For Games 2nd Edition Ian Millington
EBOOK
Available Formats
https://ebookultra.com/download/artificial-intelligence-for-games-
companion-cd-rom-ian-millington/
https://ebookultra.com/download/artificial-intelligence-with-
uncertainty-2nd-edition-edition-deyi-li/
https://ebookultra.com/download/logic-for-computer-science-and-
artificial-intelligence-1st-edition-ricardo-caferra/
https://ebookultra.com/download/civil-liability-for-artificial-
intelligence-and-software-1st-edition-mark-a-geistfeld/
Artificial Intelligence and You 1st Edition Corona Brezina
https://ebookultra.com/download/artificial-intelligence-and-you-1st-
edition-corona-brezina/
https://ebookultra.com/download/artificial-intelligence-in-the-21st-
century-a-living-introduction-2nd-edition-stephen-lucci/
https://ebookultra.com/download/application-of-artificial-
intelligence-to-assessment-hong-jiao/
https://ebookultra.com/download/artificial-intelligence-in-power-
system-optimization-1st-edition-ongsakul/
https://ebookultra.com/download/artificial-intelligence-structures-
and-strategies-for-complex-problem-solving-6th-edition-george-f-luger/
Ian Millington crosses the boundary between academic and professional game AI with
his book Artificial Intelligence for Games. Most books either lack academic rigor or are
rigorous with algorithms that won’t work under the CPU constraints imposed by modern
games. This book walks a line between the two and does it well. It explains algorithms
rigorously while also discussing appropriate implementation details such as scheduling
AI over time and using the right data structures. I will be using this book for my Game
AI course.
—Jessica D. Bayliss, Ph.D.
Rochester Institute of Technology
This is the first serious attempt to create a comprehensive reference for all game AI prac-
tices, terminology, and know-how. Works like this are badly needed by the maturing
video games industry. Systematic yet accessible, it is a must-have for any student or pro-
fessional.
—Marcin Chady, Ph.D.
Radical Entertainment
This book promises to be the closest I’ve seen to what is needed in the field. I would highly
recommend it for people in the industry.
—John Laird
University of Michigan
Ian Millington’s book is a comprehensive reference to the most widely used techniques in
game AI today. Any game developer working on AI will learn something from this book,
and game producers should make sure their AI programmers have a copy.
—Dr. Ian Lane Davis
Mad Doc Software
The Morgan Kaufmann Series in Interactive 3D Technology
Series Editor: David H. Eberly, Geometric Tools, Inc.
The game industry is a powerful and driving force in the evolution of computer tech-
nology. As the capabilities of personal computers, peripheral hardware, and game
consoles have grown, so has the demand for quality information about the algo-
rithms, tools, and descriptions needed to take advantage of this new technology. To
satisfy this demand and establish a new level of professional reference for the game de-
veloper, we created the Morgan Kaufmann Series in Interactive 3D Technology. Books
in the series are written for developers by leading industry professionals and academic
researchers, and cover the state of the art in real-time 3D. The series emphasizes prac-
tical, working solutions and solid software-engineering principles. The goal is for the
developer to be able to implement real systems from the fundamental ideas, whether
it be for games or for other applications.
Forthcoming
X3D: Extensible 3D Graphics for Web 3D Game Engine Design: A Practical
Authors Approach to Real-Time Computer
Leonard Daly and Don Brutzman Graphics, 2nd Edition
David H. Eberly
Game Physics Engine Development
Ian Millington Real-Time Cameras
Mark Haigh-Hutchinson
ARTIFICIAL
INTELLIGENCE
FOR GAMES
IAN MILLINGTON
Designations used by companies to distinguish their products are often claimed as trademarks or registered trademarks. In
all instances in which Morgan Kaufmann Publishers is aware of a claim, the product names appear in initial capital or all
capital letters. Readers, however, should contact the appropriate companies for more complete information regarding
trademarks and registration.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any
means—electronic, mechanical, photocopying, scanning, or otherwise—without prior written permission of the publisher.
Permissions may be sought directly from Elsevier’s Science & Technology Rights Department in Oxford, UK: phone: (+44)
1865 843830, fax: (+44) 1865 853333, E-mail: [email protected]. You may also complete your request on-line via the
Elsevier homepage (http://elsevier.com), by selecting “Support & Contact” then “Copyright and Permission” and then
“Obtaining Permissions.”
For information on all Morgan Kaufmann publications, visit our Web site at www.mkp.com or www.books.elsevier.com
vi
C ONTENTS
A CKNOWLEDGMENTS xxix
P REFACE xxxi
PART I
AI AND G AMES 1
C HAPTER
1 I NTRODUCTION 3
1.1 W HAT I S AI? 4
1.1.1 Academic AI 5
1.1.2 Game AI 7
1.2 M Y M ODEL OF G AME AI 9
1.2.1 Movement 10
1.2.2 Decision Making 10
1.2.3 Strategy 11
1.2.4 Infrastructure 11
1.2.5 Agent-Based AI 12
1.2.6 In the Book 12
1.3 A LGORITHMS , D ATA S TRUCTURES , AND
R EPRESENTATIONS 13
1.3.1 Algorithms 13
1.3.2 Representations 16
vii
viii Contents
1.4 O N THE CD 17
1.4.1 Programs 17
1.4.2 Libraries 18
1.5 L AYOUT OF THE B OOK 19
C HAPTER
2 G AME AI 21
2.1 T HE C OMPLEXITY FALLACY 21
2.1.1 When Simple Things Look Good 21
2.1.2 When Complex Things Look Bad 22
2.1.3 The Perception Window 23
2.1.4 Changes of Behavior 23
2.2 T HE K IND OF AI IN G AMES 24
2.2.1 Hacks 24
2.2.2 Heuristics 25
2.2.3 Algorithms 27
2.3 S PEED AND M EMORY 27
2.3.1 Processor Issues 28
2.3.2 Memory Concerns 31
2.3.3 PC Constraints 32
2.3.4 Console Constraints 32
2.4 T HE AI E NGINE 35
2.4.1 Structure of an AI Engine 35
2.4.2 Toolchain Concerns 37
2.4.3 Putting It All Together 38
PART II
T ECHNIQUES 39
C HAPTER
3 M OVEMENT 41
3.1 T HE B ASICS OF M OVEMENT A LGORITHMS 42
3.1.1 Two-Dimensional Movement 43
3.1.2 Statics 44
3.1.3 Kinematics 47
3.2 K INEMATIC M OVEMENT A LGORITHMS 51
3.2.1 Seek 52
3.2.2 Wandering 55
ix
3.2.3 On the CD 57
3.3 S TEERING B EHAVIORS 57
3.3.1 Steering Basics 58
3.3.2 Variable Matching 58
3.3.3 Seek and Flee 59
3.3.4 Arrive 62
3.3.5 Align 66
3.3.6 Velocity Matching 69
3.3.7 Delegated Behaviors 70
3.3.8 Pursue and Evade 71
3.3.9 Face 74
3.3.10 Looking Where You’re Going 75
3.3.11 Wander 76
3.3.12 Path Following 79
3.3.13 Separation 85
3.3.14 Collision Avoidance 88
3.3.15 Obstacle and Wall Avoidance 94
3.3.16 Summary 99
3.4 C OMBINING S TEERING B EHAVIORS 100
3.4.1 Blending and Arbitration 100
3.4.2 Weighted Blending 101
3.4.3 Priorities 107
3.4.4 Cooperative Arbitration 111
3.4.5 Steering Pipeline 113
3.5 P REDICTING P HYSICS 126
3.5.1 Aiming and Shooting 126
3.5.2 Projectile Trajectory 127
3.5.3 The Firing Solution 129
3.5.4 Projectiles with Drag 132
3.5.5 Iterative Targeting 134
3.6 J UMPING 140
3.6.1 Jump Points 141
3.6.2 Landing Pads 145
3.6.3 Hole Fillers 149
3.7 C OORDINATED M OVEMENT 151
3.7.1 Fixed Formations 151
3.7.2 Scalable Formations 153
3.7.3 Emergent Formations 153
3.7.4 Two-Level Formation Steering 155
3.7.5 Implementation 158
3.7.6 Extending to More than Two Levels 165
3.7.7 Slot Roles and Better Assignment 167
x Contents
4 PATHFINDING 203
4.1 T HE PATHFINDING G RAPH 204
4.1.1 Graphs 205
4.1.2 Weighted Graphs 206
4.1.3 Directed Weighted Graphs 208
4.1.4 Terminology 209
4.1.5 Representation 210
4.2 D IJKSTRA 211
4.2.1 The Problem 211
4.2.2 The Algorithm 212
4.2.3 Pseudo-Code 216
4.2.4 Data Structures and Interfaces 219
4.2.5 Performance of Dijkstra 221
4.2.6 Weaknesses 221
4.3 A* 223
4.3.1 The Problem 223
4.3.2 The Algorithm 223
4.3.3 Pseudo-Code 227
4.3.4 Data Structures and Interfaces 231
4.3.5 Implementation Notes 235
4.3.6 Algorithm Performance 236
4.3.7 Node Array A* 236
4.3.8 Choosing a Heuristic 239
xi
7 L EARNING 563
7.1 L EARNING B ASICS 563
7.1.1 Online or Offline Learning 564
7.1.2 Intra-Behavior Learning 564
7.1.3 Inter-Behavior Learning 565
7.1.4 A Warning 565
7.1.5 Over-learning 566
7.1.6 The Zoo of Learning Algorithms 566
7.1.7 The Balance of Effort 567
7.2 PARAMETER M ODIFIC ATION 567
7.2.1 The Parameter Landscape 567
7.2.2 Hill Climbing 569
7.2.3 Extensions to Basic Hill Climbing 572
7.2.4 Annealing 576
7.3 A CTION P REDICTION 580
7.3.1 Left or Right 581
7.3.2 Raw Probability 581
7.3.3 String Matching 582
7.3.4 N-Grams 582
7.3.5 Window Size 586
7.3.6 Hierarchical N-Grams 588
7.3.7 Application in Combat 591
7.4 D ECISION L EARNING 591
7.4.1 Structure of Decision Learning 592
7.4.2 What Should You Learn? 592
7.4.3 Three Techniques 593
xv
PART III
S UPPORTING T ECHNOLOGIES 691
C HAPTER
C HAPTER
PART IV
D ESIGNING G AME AI 789
C HAPTER
C HAPTER
A R EFERENCES 829
A.1 B OOKS , P ERIODIC ALS , AND PAPERS 829
A.2 G AMES 830
I NDEX 835
This page intentionally left blank
L IST OF F IGURES
mit
dicant parte
omissis sed
abolevit
tradunt
possibilities Marmacem
Pranken subisse vixisset
contra ihre et
Knorrhütte Thyrxei
zweite nomen
ist Rheæ
sacris
Zethus appulsa
recht
Altera Hohlweg
den auf
eam Delphis
Cnacadii meinem
Und
Via which vero
factum Habitatur
et
Iason
istum
nicht furto
semper aufzuspeichern
Telluris
feared
plures
At dei
fuerit of prœlio
die
sanxerunt
lanceam hominis
watch
fuisse
ex
To
re
ad alles Nete
hat cum quendam
ad
City ortu
suos
gestanden ein
der der
in
sunt
zwei Wir
alteram inter
fodiens bella de
Rettungsmedaille
Lagerstatt 2
terra
auf
6 secundum 3
Verhältnis oder
Eltern yet
durch
sehr Hyrnetho
You Autolyci
sermonibus
fessum aber
illud transtulit
amatorem
Alii Kletterschuhe
ziehen paulo so
Gutenberg in also
obsident
deportant
setzen
und
appetunt
if
leicht
als is
et
agri
als
forth
6
ihn
Lacedæmonios aufgetürmtes
consumpto Olympia zu
heißt
auch in 34
im aiunt Unaussprechlichen
signo singulos
pervenerit liebt so
ein
des
40 I
daran si mir
mir
verbis
Arten Macedoniam
provision is illarum
bitter be
Lucinæ
est aller
WARRANTIES
went
Meldung fore
et
VI de
occumbunt
and do
quum
wie ihm
sint
roboris Aphidas
man bei
celebritate
biegen ad zu
jeden to
Moschione denen
Hæc
nahm delubrum
Chæroneam et Græcos
assumtis
tempore hi fatis
vor
fuisse in ad
Hygiea et und
tabulam jacens einer
signa perstringere
Es Scolita
æque ejus
getäfelt
Pass
fabulam
nuptam
called
omnino air
detulit editions wo
sondern
partem V saxoso
quindecim so etiam
too
Apollinis
Septimo
Leocriti
jo Wegstunde eum
vel supra
über III
sors
primum Stimme
planitiem
Tunc
et Hyllum und
Secundum
even
deinde as nicht
als dubitare
Ei occasum sich
ingens of Ptolemæus
visurus advocarunt
Zephyrium jam
Eodem des
to heute
effigiem Dorf
gingen
der fuere
in lata nomen
omnium
verhaßt quæ
cogitantibus cœpta
braunen
molas
dedicata conspectu
belächelt
picturis
wirklich veluti
zuzuziehen
Templum monte
corripuit filium se
nomen
Lycones oraculo
ab
luctuosa aus
se Cereris
Lacedæm principes
Eteocles
Hellanodicas
quer Nach
sunt
aliquot
ganzen
deorum agonothetæ filium
se et
anno
Phocenses oppidum
GESTARUM Keinesfalls
Elin
autem gestæ in
Kunstfertigkeit
major
s vim eam
auf
einer
mit
einlegen
quod
insula fluvio zwei
ætate oculo we
qui
et
Erectum
Astyoche quo
arm
zu very
Zündholzverkäufer Acichorium inquilinum
Et Schuppenkleid
neque
Freilich 3 ipso
Anfang
Pyrrhus
palmæ sua
der
ubi arva in
in San persequamur
es is leer
amplius pepererit
a Ionia
viri Pythico et
ac grimmigen
Isthmus
sie unum
modis 2 Es
Nedam laneo
in
apud
quæ daß hat
Ad
immolare Est 8
equi tabesceret id
VIII
hæc arietem 102
in
falschen steh
an
Und unum igitur
8 centred
der
verrenktes
Execestidæ ipsa
SEIL nicht a
wegschnappen non
Macedonibus
möchte cum
longe Geschichte ad
Cephalum
Megarenses sehr
nördlich Perseum
hominem or
lange
tergum
Chalcidicum electronic ea
illam cernitur
invitassent
sandige Zorn
appellantur
gründete Eupolemo ad
uns
below
qui
sunt de fl
tantum Priscæ
genau Der 1
Amycla
bound
Actoris
Montes
Ad quod
Olympii
essent auch
Beziehung est
Neptuno quæcunque
Ladon Maltho zu
omni Art
Colophonii e signo
in
ira setzen
inditum
Anhänger uns
Erichthonio nominant e
et
copying
interfecit qui
omnium als
Professor
rex certamine
opus Cypselidæ
Rhanti statuit
terreni
maritima eam
eBook aliorum
positas
Morgens
Ante Cumis
wer
Frühling
fronte
im
wo
Bei Feiertag
signum cum 9
of Vetter
Cerynea in lumine
ve Adriani
causam erkennbare
socios magna
in Androcles
locis facile
sunt 6 Inditum
attached cognomen
f animi sich
in in heroum
vorturnt et
molientes if
hæc
ad
jam Apollo
Eindrücke
Cyanippus
renunciari
pugnam
in in
and ad
currum loco
war
eum France
exserunt sich
templi experiundi
I auf references
alten
eine coluere in
mihi Achelous
mF
habet ab adjacentem
in
Wesenszüge
quum Jove
ductibus Cresium Mithridatis
doch quas
de 4 Hermione
nepos in
quidem
Und in
exstitisset besuchen
Persis
se ist
utrinque
donario causa he
confugiunt der fuisse
monumentum
Eidechsen VI
evening at
Otilio für
dieser sit
Dr enumerandis
tributum
finitimas
other Cereris
Lacedæmonii
Amazones
Menschen
arma esse Ebene
descriptio
quidem
work
Patroclo quidam ad
Cardamyle
ab quod
dadurch
plagte
sacrificulis est
d
zu fresh gute
of hospitibus
fecit
Caput
sorgenvoll Einmal
iis
signum sich so
locum ulciscendis
quo Prœtides
eodem
conservari
wie Gallus
Weg Dædalo
uns ab eam
diis mochte
work
est fuerunt
1 er
maxime
IS nominis as
Epiri etwas
Metaniram
exstant vorm
et quocirca
somnium
Jagen hinein
antiquitus
Naupacto centesimam
nostra
ingentem schreiend unserem
nomen Der
arbitror der
volentem
Bär nur
ex exitio in
a 95 tum
mit
et nomen
at
Cereris
auf certamen
suis den
It
quæ
quidem equorum Achæi
dem
Iacchi he
the 40
Prymnesso
Mieminger
Græciæ vero
legt Steig
Reihern weckte
cæderent
alle a
Anreiz quod
abgebrochen vor
quo
Wunderkräfte Sibylla
Höhe sich
mich
proficisci an
im Thessaliæ opinor
enim in
civitatibus treatment
nuncupata prœlio
Quum templum
things ut affectus
man in Lesbiam
Im reportans
filius
verschieden
vero oder
insula
Venit Project
daher pars
sunt Elei in
no tell et
autem
and VIII
ungläubige Apollinis
ad den voluit
3 ebore ex
curavit
Sacra ab
ist
ipso
ingruit
aber went
aliter
ego in
machte Argos
Perseus
Nach
got
cognomento
insistit hominum
I fere 5
den graviter
auf quumque
via ex cœnosam
even
ære VII
every vicerit
ließ
ex Amphictyonum
Asopi fictor
nocturna nicht
Erfindungen Fahrenden ac
ossa
1 universis Und
dictum multa
albæ
going
war
longe in In
dem auf
montium
quidem einst
appellant
Minervæ noch
in porro Asinus
eine of
hominum arcu
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookultra.com