Professional Documents
Culture Documents
AI
Architectures
Gustavo
Patow
IMAE
-
UdG
Par7ally
based
on
AI
Architectures:
A
Culinary
Guide
h>p://intrinsicalgorithm.com/IAonAI/tag/hfsm/
3/28/15
Bunch
of
rules
Simply
adding
rules
here
or
there
around
our
code
that
change
the
direcBon
of
things
in
a
fairly
haphazard
manner
Obviously,
the
problem
with
that
is
you
can
only
get
so
much
content
before
things
become
unstable
Its
a
bit
unwieldy
as
well
Most
importantly,
every
Bme
you
take
a
bite
of
your
content,
you
never
know
when
the
enBre
plaKorm
is
going
to
simply
fall
apart
3/28/15
an
AI
agent
is
doing
or
being
something
at
a
given
point
in
Bme
It
is
said
to
be
in
a
state
TheoreBcally,
an
agent
can
only
be
in
one
state
at
a
Bme
(although
other
implementaBons
exist)
Unaware
Combat
Investigate
Search
3/28/15
An
example
The
transiBon
logic
in
any
given
state
may
be
as
simple
or
as
complex
as
needed
For
example,
it
may
simply
involve
a
countdown
Bmer
that
says
to
switch
to
a
new
state
aVer
a
designated
amount
of
Bme
Another
one
More
commonly,
state
machines
employ
elaborate
trigger
mechanisms
that
involve
the
game
logic
and
situaBon
For
instance
our
guard
state
may
have
the
logic,
if
[the
player
enters
the
room]
and
[is
holding
the
Taco
of
Power]
and
[I
have
the
Salsa
of
SmiBng],
then
aLack
the
player
at
which
point
my
state
changes
from
guard
to
a>ack.
Note
the
three
individual
criteria
in
the
statement
3/28/15
Problems
First,
as
the
number
of
states
increases,
the
number
of
potenBal
transiBons
increases
as
well
at
an
alarming
rate!
3/28/15
Workload
AddiBonally,
any
logic
that
would
be
involved
in
that
transiBon
must
also
be
interworked
into
the
other
state-specic
logic
that
may
already
be
there
Suers
from
some
of
the
same
fragility
of
the
ad
hoc
bunch
of
rules
we
menBoned
earlier
Inside
each
state
was
decision
logic
that
told
them
if
they
should
change
to
something
else
and,
in
fact,
what
they
should
change
to
That
logic
oVen
has
very
li>le
to
do
with
the
state
contained
in
and
more
to
do
with
what
is
going
on
outside
the
state
or
even
the
agent
itself
If
I
hear
a
gunshot,
it
really
doesnt
maLer
what
Im
doing
at
the
BmeIm
going
to
inch,
duck
for
cover,
wet
myself,
or
any
number
of
other
appropriate
responses.
Therefore,
why
would
I
need
to
have
the
decision
logic
for
React
to
Gunshot
in
each
and
every
other
state
I
could
have
been
in
at
the
Bme?
3/28/15
3/28/15
3/28/15
Planner
Like
a
behavior
tree,
the
reasoning
architecture
behind
a
planner
is
separate
from
the
code
that
does
stu
While
the
end
result
of
a
planner
is
a
state
(just
like
the
FSM
and
behavior
tree),
how
it
gets
to
that
state
is
signicantly
dierent
A
planner
compares
its
situaBonthe
state
of
the
world
at
the
momentand
compares
it
to
a
collecBon
of
individual
atomic
acBons
that
it
could
do
It
then
assembles
one
or
more
of
these
tasks
into
a
sequence
(the
plan)
so
that
its
current
goal
is
met
3/28/15
Planner
Planner
10
3/28/15
Dierences
The
planner
diverges
from
the
FSM
and
BT
in
that
it
isnt
specically
hand-authored
Therein
lies
the
dierence
in
plannersthey
actually
solve
situaBons
based
on
what
is
available
to
do
and
how
those
available
acBons
can
be
chained
together
One
of
the
benets
of
this
sort
of
structure
is
that
it
can
oVen
come
up
with
soluBons
to
novel
situaBons
that
the
designer
or
programmer
didnt
necessarily
account
for
and
handle
directly
in
code
In
a
FSM
or
BT,
creaBve,
outside
the
box
soluBons
were
the
excepBon
from
the
predictable,
hand-authored
systems
In
a
planner,
the
scripted,
predictable
moments
are
the
excepBon;
you
must
specically
override
or
trick
the
planning
system
to
say,
no
I
really
want
you
to
do
this
exact
thing
at
this
moment
11
3/28/15
Example
A
more
recent
avor
of
planner
is
the
hierarchical
task
network
(or
HTN)
planner
such
as
was
used
to
great
eect
in
Guerillas
Killzone
2
hLp://aigamedev.com/open/coverage/htn-planning-discussion/
uBlity-based
method
Instead
of
assembling
a
plan
like
the
planner,
however,
the
uBlity-based
system
simply
selects
the
single
next
acBon
All
the
ingredients
are
in
the
mix
and
available
at
all
Bmes.
However,
you
simply
select
what
it
is
that
would
like
to
poke
at
and
execute.
You
can
select
it
based
on
what
you
have
a
taste
for
or
what
is
most
accessible
at
the
moment.
12
3/28/15
uBlity-based method
uBlity-based
method
While
uBlity-based
systems
can
be
used
in
many
types
of
games,
they
are
more
appropriate
in
situaBons
where
there
are
a
large
number
of
potenBally
compeBng
acBons
the
AI
can
takeoVen
with
no
obvious
right
answer
In
those
Bmes,
the
mathemaBcal
approach
that
uBlity-based
systems
employ
is
necessary
to
ferret
out
what
the
most
reasonable
acBon
to
take
is
Aside
from
The
Sims,
other
common
areas
where
uBlity-
based
systems
are
appropriate
are
in
RPGs,
RTS,
and
simulaBons.
13
3/28/15
ImplementaBon
Drawback
There
isnt
always
a
good
way
to
intuit
what
will
happen
in
a
given
situaBon
In
a
behavior
tree,
for
example,
it
is
a
relaBvely
simple
exercise
to
traverse
the
tree
and
nd
the
branches
and
nodes
that
would
be
acBve
in
a
parBcular
situaBon
14
3/28/15
15
3/28/15
Wrap
up
This
has
by
no
means
been
an
exhausBve
treatment
of
AI
architectures
The
purpose
was
simply
to
expose
you
to
the
opBons
that
are
out
there
and
why
you
may
or
may
not
want
to
select
each
for
the
parBcular
tastes
and
needs
of
your
project
To
sum
up,
though,
lets
go
through
the
opBons
once
again
Wrap up
16
3/28/15
Conclusions
there
is
no
one
size
ts
all
solu7on
to
AI
architectures
Homework
(HFSM)
Michael
Booth.
2009.
"The
AI
Systems
of
LeV
4
Dead."
ArBcial
Intelligence
and
InteracBve
Digital
Entertainment
Conference
(Stanford
University).
(On
Moodle)
17
3/28/15
Thanks!
18