Artificial Intelligence for Games

bigskymanAI and Robotics

Oct 24, 2013 (3 years and 9 months ago)

91 views

Introduction

Artificial Intelligence for Games


1

|
P a g e


Introduction

-

What is AI?

-

Many of trivial problems ( playing Connect 4) were solved by computers b
ut there are many things that computers
aren’t good at which we find trivial:

recognizing familiar faces, speaking our own language, deciding what to do next,

and

being creative. These are the domain of AI: trying to work out what kinds of algorithms

are needed to display
these properties

-

In academia, some AI researchers are motivated by
philosophy
: understanding the nature of thought and the nature
of intellig
ence and building software to model how thinking might work. Some are motivated by
psychology
:
understanding the mechanics of the human brain and mental processes. Others are motivated by
engineering
:
building algorithms to perform human
-
like task
. Where g
ame developers concerns with the last motivation

-

History of Academic AI:

o

The Early Days:



In the early days (before computers) some questions appeared (in philosophy of mind) as:



What produces thought?



Could you give life to an inanimate object?



What’s the
difference between
cadavers

(
ةثج
) and human it previously was?



Pioneers of the field
these days were: Alan Turing (father of AI), von
-
Neumann, Shannon

o

The Symbolic Era
:



From 1
9
50s till 1980s main thrust in AI research was in “symbolic” systems



A
symbolic
system
:
is one in which the algorithm is divided into two components

(as Expert Systems)
:



Set of knowledge
:
represented as symbols such as words, numbers,
sentences, or pictures



Reasoning algorithm
:
that manipulates those symbols to create new combination
s of
symbols that hopefully represent problem solutions or new knowledge



Other symbolic approaches in games
: blackboard architecture,
pathfinding, decision trees, state
machines, steering algorithms



Common disadvantage of symbolic systems: when solving a problem
the more knowledge you have,
the less work you need to do in reasoning



The more knowledge you have, the less searching for an answer you need; the more search you can
do (i.e., the faster you
can search), the less knowledge you need

o

The Natural Era:



From 1980s to 1990s
frustration

symbolic approaches come into t
wo

categories:



From engineering point:

o

early success on simple problems didn’t seem to scale to more difficult problems



From
philosophical point:

o

Symbolic approaches are not biologically plausible (i.e.
You can’t understand how a
human being plans a route by using a symbolic route planning algorithm
)

o

The effect was a move toward natural computing: techniques inspired by biology
or
other natural systems

(like ANN, GA and simulated annealing)

-

The no
-
free
-
lunch theorem and subsequent work has shown that, over all problems, no single approach is better than
any other

-

The narrower the problem domain you focus on, the easier it will be

for the algorithm to shine. Which, in a
roundabout way, brings us back to the golden rule of AI: search (trying possible solutions) is the other side of the coin
to knowledge (knowledge about the problem is equivalent to narrowing the number of problems y
our approach is
applicable to)

-

Game AI:

-

Till 1990 all computer
-
controlled characters
used FSM

-

In 1997 the new technique included was ability to see colleagues and notify them when killed

-

In mid
-
1990s
RTS games (Warcraft II) was the first time popular game
having robust pathfinding implementation

-

The AI in most modern games addresses three basic needs:

o

T
he ability to move characters,

o

T
he ability to

make

decisions about where to move

Introduction

Artificial Intelligence for Games


2

|
P a g e


o

T
he ability to think tactically or strategically

-

Model of Game AI
:


-

Movement:

o

Movement refers to algorithms that turn dec
isions into some kind of motion

o

Example
s

(49)
:



Super Mario example when attacking enemies with bullets



Guard that want to reach alarm example

-

Decision Making:

o

Involves character working out what to do n
ext

o

Examples: take the decision to attack, defend, patrol…

-

Strategy:

o

To coordinate whole team you need a strategic AI

o

In the context of this book, strategy refers to an overall approach used by a group of characters

o

In this category are AI algorithms that
don’t control just one character, but influence the behavior of a whole
set of characters

o

Example: surrounding a player in FPS Game

-

Infrastructure:

o

These are

Information Gatherer

(perception)


and execution management issues

-

Agent
-
Based
-
AI
:

o

agent
-
based AI

is about producing autonomous characters that take in information from the game data,
determine what actions to take based on the information, and carry out those actions

-

Techniques in this book are implemented into 3 categories:

Algorithms, Data Structur
es, Game Infrastructure

-

Key elements to know when implementing algorithms:

o

Know the problem the algorithm want to solve

o

A general description of the working mechanism of the algorithm including diagrams

o

A pseudo
-
code presentation of the algorithm

o

Indicatio
n to the data structure used in the algorithm

o

Particular implementation node

o

Analysis of the algorithm performance
: execution speed, memory footprint and scalability

o

Weaknesses in the approach