You are on page 1of 16

ARTIFICIAL

INTELLIGENCE
IN GAMES
Niranjan Thilak CS-7 06414013
Ai Guide : Mr. Anil A. R.
AI : Introduction
 “The science and engineering of making
intelligent machines.“ – John McCarthy.
 Applications : biometrics , language processing ,
Simulation ,Video Games .

Artificial Intelligence in Games 2


AI : In Games
 Board Games -1960’s : Fixed
Algorithm based
 Pattern analysis : movement, user

inputs
 Start of Modern Game AI techniques :

 Deterministicmethods : FSA , Pathfinding.


 Non deterministic methods : Emergent
behaviour, Human Player evaluation

Artificial Intelligence in Games 3


Board Games
 Chess , checkers and Tic Tac Toe :
based on fixed algorithms
 Games based on turns
 Have perfect information
 Beatable when the moves are perfectly
predicted
 Intensive combinatorial calculation.
 MiniMax Algorithm

Artificial Intelligence in Games 4


MiniMax Algorithm
 Games with turn based gameplay.
 Players : Min & Max

 Assumes best abilities by both.

 Computing power used for looking

ahead through almost all possible


moves
 Strategy

 Max - Maximum points


 Min – Minimum points
Artificial Intelligence in Games 5
Tic Tac Toe : Possible 1st 3 Plies

•Symmetric moves
combined

Artificial Intelligence in Games 6


MiniMax : Detailed
 Max’s turn
 left branch -> Min Max
will choose move to 5
get 3
 left branch has a value
of 3
3 4 5 Min
 Right - > Min ( 5, 6,
7) (will choose 5, the
minimum)
 right branch has a Max
value of 5 3 9 4 5 6 7
 Maximum is Right
Branch -> Max
chooses right.
Artificial Intelligence in Games 7
Modern Techniques
 Finite State Automata
 Scripting

 Pathfinding Algorithms

 Neural Networks

 Emergent Behaviour & Sandbox .


 Genetic Algorithms

Artificial Intelligence in Games 8


Applications in Games
 Movement AI
 Learning AI

 Behaviour AI

 Tactical AI

 Decision Making

 Path Finding

Artificial Intelligence in Games 9


Movement AI
 Gestures •FSA
 Hiding •Behaviour Tree
 Interaction with world

F.E.A.R (2006) - Age Of Empires (2005) -


Vivendi Microsoft
Artificial Intelligence in Games 10
Learning & Behaviour AI
 Learning includes dynamic  Behaviour AI
change according to the
timeline of gameplay
includes evolving
behaviour patterns
 Sims 3 (2009) : EA is a
simulation game
,which has realistic
simulation of human
behaviour,including
emotions.
 Uses Behaviour Trees
and modified neural
networks and also
Artificial Intelligence in Games
genetic algorithms 11
PathFinding Techniques
 Finding optimal path between two points
 Makes use of graphs with world divided into weighted
blocks, of nodes
 Algorithms used:
 Dijkstra’s shortest path algorithm
 A* Pathfinding algorithm
 A*
 Score = Cost from start + Heuristics

Artificial Intelligence in Games 12


Finite State Automata
 States and behaviours
 Advantages
 Easy to be designed logically
 Small events can be considered
 Scalable Logic

 Disadvantages
 Labor intensive
 Editing difficult for designer

Scripting
 Scripting allows FSA from OO languages, more
open.
Artificial Intelligence in Games 13
Behaviour Trees and Decision
Trees
 Tree structure
 Simplifies
logical implementation
 More open to expansion

Behaviour tree
 Flexible behaviours
and decisions
 Autonomous &
parallel
 Reactive
 States are self
contained
Artificial Intelligence in Games 14
Neural Networks
 Modeled to imitate neurons
 Logical device
 Uses: Simulates A-Life, Learning behaviour,
Behaviour management, character growth.
 One or more i/p
 Single o/p
 Feedforward
 Learning rules

Artificial Intelligence in Games 15


Genetic Algorithms

Loosely based on
genetics
Evolving
behaviour and
appearance
Random  Spore (2008) :
Mutations EA
Controlled  New character
creation
character growth  Simplified
Different character
modelling
character set, Characters
dynamically

grow according
16
Artificial Intelligence in Games to their

You might also like