ARTIFICIAL INTELLIGENCE IN GAMES

Ai
Niranjan Thilak CS-7 06414013 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 :

 Deterministic

methods : FSA , Pathfinding.  Non deterministic methods : Emergent behaviour, Human Player evaluation
3

Artificial Intelligence in Games

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 will choose move to get 3

5

Max

left branch has a value of 3

Right - > Min ( 5, 6, 7) (will choose 5, the minimum)

3

4

5

Min

right branch has a value of 5

3

9

4

5

6

7

Max

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 Hiding Interaction with world

•FSA •Behaviour Tree

F.E.A.R (2006) Vivendi
Artificial Intelligence in Games

Age Of Empires (2005) Microsoft

10

Learning & Behaviour AI

Learning includes dynamic change according to the timeline of gameplay

Behaviour AI 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 genetic algorithms

Artificial Intelligence in Games

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
Score = Cost from start + Heuristics

A*

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

open.

allows FSA from OO languages, more
13

Artificial Intelligence in Games

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
15

Artificial Intelligence in Games

Genetic Algorithms
Loosely based on genetics Evolving behaviour and appearance Random Mutations Controlled character growth Different character set, dynamically
Artificial Intelligence in Games

Spore (2008) : EA New character creation Simplified character modelling Characters grow according 16 to their

Sign up to vote on this title
UsefulNot useful