Artificial Intelligence in Computer and Video Games
Upcoming SlideShare
Loading in...5
×
 

Artificial Intelligence in Computer and Video Games

on

  • 5,168 views

This lecture was given at the April meeting of the Glasgow branch of the British Computer Society on 12th April 2010. The lecture was supposed to be given by Dr. Darryl Charles, who fell ill a couple ...

This lecture was given at the April meeting of the Glasgow branch of the British Computer Society on 12th April 2010. The lecture was supposed to be given by Dr. Darryl Charles, who fell ill a couple of days before the event, and I was asked to take the lecture instead.

In the presentation I cover the basics of why AI and Games are well suited and give a brief discussion of different types of AI as I see it. I discuss briefly how AI fits into the context of the game in terms of execution.

The bulk of the talk presents case studies in the format of Commercial game -> Theoretical technique used -> Research project using this technique.

It should be noted that the section on Left4Dead was omitted from the lecture as it was presented at the time due to concerns about the length

Statistics

Views

Total Views
5,168
Views on SlideShare
5,015
Embed Views
153

Actions

Likes
1
Downloads
365
Comments
1

3 Embeds 153

http://www.aalizwel.com 111
http://aalizwel.com 30
http://www.slideshare.net 12

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Slide 42 has not rendered properly. The text for the missing bullet point is

    'E.g. Space Invaders (1978) - not intelligent but enemies were not analogous to another player'

    And a picture of the Space Invaders game. This seems isolated to Windows.

    Slide 170 has not rendered properly for some people. Text for this missing bullet is:

    ' 'Activity Function' - output stream for HCSM '
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Artificial Intelligence in Computer and Video Games Artificial Intelligence in Computer and Video Games Presentation Transcript

  • AI in Computer and Video Games Luke Dicken
  • Disclaimers! 2
  • Disclaimers! • I am not Darryl Charles 2
  • Disclaimers! • I am not Darryl Charles • This presentation prepared at quite short notice 2
  • Disclaimers! • I am not Darryl Charles • This presentation prepared at quite short notice ‣ Please bear with me if I stutter or stumble more than usual 2
  • Disclaimers! • I am not Darryl Charles • This presentation prepared at quite short notice ‣ Please bear with me if I stutter or stumble more than usual • I am a PhD student 2
  • Disclaimers! • I am not Darryl Charles • This presentation prepared at quite short notice ‣ Please bear with me if I stutter or stumble more than usual • I am a PhD student ‣ Slides likely to have an academic bias 2
  • Disclaimers! • I am not Darryl Charles • This presentation prepared at quite short notice ‣ Please bear with me if I stutter or stumble more than usual • I am a PhD student ‣ Slides likely to have an academic bias ‣ Limited first-hand industry experience 2
  • About Me 3
  • About Me • Undergrad, MSc and MRes in AI-related disciplines. 3
  • About Me • Undergrad, MSc and MRes in AI-related disciplines. • Currently PhD Student at University of Strathclyde 3
  • About Me • Undergrad, MSc and MRes in AI-related disciplines. • Currently PhD Student at University of Strathclyde ‣ Member of Strathclyde AI and Games Research Group 3
  • About Me • Undergrad, MSc and MRes in AI-related disciplines. • Currently PhD Student at University of Strathclyde ‣ Member of Strathclyde AI and Games Research Group ‣ Member of Strathclyde Planning Group 3
  • About Me • Undergrad, MSc and MRes in AI-related disciplines. • Currently PhD Student at University of Strathclyde ‣ Member of Strathclyde AI and Games Research Group ‣ Member of Strathclyde Planning Group • Writer for AIGameDev.com 3
  • About Me • Undergrad, MSc and MRes in AI-related disciplines. • Currently PhD Student at University of Strathclyde ‣ Member of Strathclyde AI and Games Research Group ‣ Member of Strathclyde Planning Group • Writer for AIGameDev.com • Avid gaming enthusiast 3
  • Overview 4
  • Overview • AI and Games - Why? 4
  • Overview • AI and Games - Why? • A Brief Introduction 4
  • Overview • AI and Games - Why? • A Brief Introduction • Some Interesting Techniques 4
  • Overview • AI and Games - Why? • A Brief Introduction • Some Interesting Techniques • Conclusions 4
  • Overview • AI and Games - Why? • A Brief Introduction • Some Interesting Techniques • Conclusions 5
  • What is AI? 6
  • What is AI? • Any time a computer makes any sort of decision between a number of options, it can be thought of as acting “intelligently”. 6
  • What is AI? • Any time a computer makes any sort of decision between a number of options, it can be thought of as acting “intelligently”. • Whether or not those decisions are the right ones is how “good” the intelligence is. 6
  • AI in Games 7
  • AI in Games • From an Industry point of view, AI allows greater engagement between the player(s) and the game. 7
  • AI in Games • From an Industry point of view, AI allows greater engagement between the player(s) and the game. • For researchers, games provide excellent testbed environments for developing AI techniques. 7
  • AI in Games • From an Industry point of view, AI allows greater engagement between the player(s) and the game. • For researchers, games provide excellent testbed environments for developing AI techniques. • A desire to see better, more realistic games that give greater satisfaction and realism. 7
  • AI in Games • From an Industry point of view, AI allows greater engagement between the player(s) and the game. • For researchers, games provide excellent testbed environments for developing AI techniques. • A desire to see better, more realistic games that give greater satisfaction and realism. • Four different types of AI in games. 7
  • Automated Opponents 8
  • Automated Opponents • History of interest in playing games short-handed 8
  • Automated Opponents • History of interest in playing games short-handed ‣ Mechanical Turk claimed to be a chess player circa 1770 8
  • Automated Opponents • History of interest in playing games short-handed ‣ Mechanical Turk claimed to be a chess player circa 1770 ‣ First video game example - Pong 1972 8
  • Automated Opponents • History of interest in playing games short-handed ‣ Mechanical Turk claimed to be a chess player circa 1770 ‣ First video game example - Pong 1972 ‣ Ongoing commercial interest - FPS “Bots” RTS “Skirmish” 8
  • Automated Opponents • History of interest in playing games short-handed ‣ Mechanical Turk claimed to be a chess player circa 1770 ‣ First video game example - Pong 1972 ‣ Ongoing commercial interest - FPS “Bots” RTS “Skirmish” 8
  • Automated Opponents • History of interest in playing games short-handed ‣ Mechanical Turk claimed to be a chess player circa 1770 ‣ First video game example - Pong 1972 ‣ Ongoing commercial interest - FPS “Bots” RTS “Skirmish” • Emphasis now on delivering a good player experience. 8
  • Automated Opponents • History of interest in playing games short-handed ‣ Mechanical Turk claimed to be a chess player circa 1770 ‣ First video game example - Pong 1972 ‣ Ongoing commercial interest - FPS “Bots” RTS “Skirmish” • Emphasis now on delivering a good player experience. ‣ Human-like rather than “good” AI 8
  • Automated Opponents • History of interest in playing games short-handed ‣ Mechanical Turk claimed to be a chess player circa 1770 ‣ First video game example - Pong 1972 ‣ Ongoing commercial interest - FPS “Bots” RTS “Skirmish” • Emphasis now on delivering a good player experience. ‣ Human-like rather than “good” AI ‣ Sub-human in order to be beatable 8
  • “NPCs” in Games 9
  • “NPCs” in Games • As games evolved, they became asymetrical 9
  • “NPCs” in Games • As games evolved, they became asymetrical • Entities that did not have the same motivations as a player - Non-Player Characters 9
  • “NPCs” in Games • As games evolved, they became asymetrical • Entities that did not have the same motivations as a player - Non-Player Characters ‣ E.g. Space Invaders (1978) - not intelligent but enemies were not analogous to another player. 9
  • AI as the Player 10
  • AI as the Player • Current thread in research. 10
  • AI as the Player • Current thread in research. • Creating AI that interacts with the game in the manner of a human player 10
  • AI as the Player • Current thread in research. • Creating AI that interacts with the game in the manner of a human player 10
  • AI as the Player • Current thread in research. • Creating AI that interacts with the game in the manner of a human player ‣ “Seeing” the game world 10
  • AI as the Player • Current thread in research. • Creating AI that interacts with the game in the manner of a human player ‣ “Seeing” the game world ‣ “Pressing” keys 10
  • AI as the Player • Current thread in research. • Creating AI that interacts with the game in the manner of a human player ‣ “Seeing” the game world ‣ “Pressing” keys • External to the game environment 10
  • AI as the Player • Current thread in research. • Creating AI that interacts with the game in the manner of a human player ‣ “Seeing” the game world ‣ “Pressing” keys • External to the game environment ‣ No cheating 10
  • AI as the Player • Current thread in research. • Creating AI that interacts with the game in the manner of a human player ‣ “Seeing” the game world ‣ “Pressing” keys • External to the game environment ‣ No cheating ‣ A robot without the physical robot 10
  • AI as the Creator 11
  • AI as the Creator • New trend in both industry and academia 11
  • AI as the Creator • New trend in both industry and academia • AI techniques used to control the game 11
  • AI as the Creator • New trend in both industry and academia • AI techniques used to control the game ‣ Content creation 11
  • AI as the Creator • New trend in both industry and academia • AI techniques used to control the game ‣ Content creation - Adapt levels to suit players ability (Infinite Mario) 11
  • AI as the Creator • New trend in both industry and academia • AI techniques used to control the game ‣ Content creation - Adapt levels to suit players ability (Infinite Mario) - Create weapons based on player tastes (Galactic Arms Race) 11
  • AI as the Creator • New trend in both industry and academia • AI techniques used to control the game ‣ Content creation - Adapt levels to suit players ability (Infinite Mario) - Create weapons based on player tastes (Galactic Arms Race) ‣ Scene Management 11
  • AI as the Creator • New trend in both industry and academia • AI techniques used to control the game ‣ Content creation - Adapt levels to suit players ability (Infinite Mario) - Create weapons based on player tastes (Galactic Arms Race) ‣ Scene Management - Control flow of game to enhance replayability and maintain a predetermined pacing (Left4Dead) 11
  • Overview • AI and Games - Why? • A Brief Introduction • Some Interesting Techniques • Conclusions 12
  • How Games Work 13
  • How Games Work • Broadly, the main execution of a game is broken into iterations through a continuously executing loop. 13
  • How Games Work • Broadly, the main execution of a game is broken into iterations through a continuously executing loop. • Games put together from individual ticks - like film. 13
  • How Games Work • Broadly, the main execution of a game is broken into iterations through a continuously executing loop. • Games put together from individual ticks - like film. • Each iteration 13
  • How Games Work • Broadly, the main execution of a game is broken into iterations through a continuously executing loop. • Games put together from individual ticks - like film. • Each iteration ‣ Takes player input 13
  • How Games Work • Broadly, the main execution of a game is broken into iterations through a continuously executing loop. • Games put together from individual ticks - like film. • Each iteration ‣ Takes player input ‣ Calculates new state of gameworld 13
  • How Games Work • Broadly, the main execution of a game is broken into iterations through a continuously executing loop. • Games put together from individual ticks - like film. • Each iteration ‣ Takes player input ‣ Calculates new state of gameworld ‣ Draws new state to the screen 13
  • Execution Time 14
  • Execution Time • Games Industry aims for fast execution. 14
  • Execution Time • Games Industry aims for fast execution. ‣ 60 Frames Per Second 14
  • Execution Time • Games Industry aims for fast execution. ‣ 60 Frames Per Second ‣ Each iteration through main loop ~16ms 14
  • Execution Time • Games Industry aims for fast execution. ‣ 60 Frames Per Second ‣ Each iteration through main loop ~16ms ‣ Of that time, majority spent on graphics and physics 14
  • Execution Time • Games Industry aims for fast execution. ‣ 60 Frames Per Second ‣ Each iteration through main loop ~16ms ‣ Of that time, majority spent on graphics and physics • AI routines might expect 1ms per frame. 14
  • Execution Time • Games Industry aims for fast execution. ‣ 60 Frames Per Second ‣ Each iteration through main loop ~16ms ‣ Of that time, majority spent on graphics and physics • AI routines might expect 1ms per frame. • In that 1ms, make decisions for every agent. 14
  • State of the Art 15
  • State of the Art • 3D Graphics Cards have been around for 15 years 15
  • State of the Art • 3D Graphics Cards have been around for 15 years ‣ Increasingly diminishing returns on effort vs quality 15
  • State of the Art • 3D Graphics Cards have been around for 15 years ‣ Increasingly diminishing returns on effort vs quality • Physics Engines have enhanced realism since ~2000 15
  • State of the Art • 3D Graphics Cards have been around for 15 years ‣ Increasingly diminishing returns on effort vs quality • Physics Engines have enhanced realism since ~2000 ‣ Havok and PhysX widely used examples 15
  • State of the Art • 3D Graphics Cards have been around for 15 years ‣ Increasingly diminishing returns on effort vs quality • Physics Engines have enhanced realism since ~2000 ‣ Havok and PhysX widely used examples • Middleware such as Digital Molecular Matter and Euphoria mean ingame realism largely solved 15
  • State of the Art • 3D Graphics Cards have been around for 15 years ‣ Increasingly diminishing returns on effort vs quality • Physics Engines have enhanced realism since ~2000 ‣ Havok and PhysX widely used examples • Middleware such as Digital Molecular Matter and Euphoria mean ingame realism largely solved • No longer pushing the limits of the hardware 15
  • State of the Art • 3D Graphics Cards have been around for 15 years ‣ Increasingly diminishing returns on effort vs quality • Physics Engines have enhanced realism since ~2000 ‣ Havok and PhysX widely used examples • Middleware such as Digital Molecular Matter and Euphoria mean ingame realism largely solved • No longer pushing the limits of the hardware • More freedom - and need - for innovation 15
  • Overview • AI and Games - Why? • A Brief Introduction • Some Interesting Techniques • Examples From Successful Games • Examples From Academia • Conclusions 16
  • Creatures 17
  • Creatures 17
  • Creatures 17
  • Creatures • “Artificial Life” game series from 1997-2001 17
  • Creatures • “Artificial Life” game series from 1997-2001 ‣ Tamagotchi on steroids. 17
  • Creatures • “Artificial Life” game series from 1997-2001 ‣ Tamagotchi on steroids. • Sophisticated Evolutionary Algorithm controlled birth and reproduction of “Norns”. 17
  • Creatures • “Artificial Life” game series from 1997-2001 ‣ Tamagotchi on steroids. • Sophisticated Evolutionary Algorithm controlled birth and reproduction of “Norns”. 17
  • Creatures • “Artificial Life” game series from 1997-2001 ‣ Tamagotchi on steroids. • Sophisticated Evolutionary Algorithm controlled birth and reproduction of “Norns”. 17
  • Creatures • “Artificial Life” game series from 1997-2001 ‣ Tamagotchi on steroids. • Sophisticated Evolutionary Algorithm controlled birth and reproduction of “Norns”. • Each Norn has a Neural Network driving their actions. Ability to learn from mistakes. 17
  • Creatures • “Artificial Life” game series from 1997-2001 ‣ Tamagotchi on steroids. • Sophisticated Evolutionary Algorithm controlled birth and reproduction of “Norns”. • Each Norn has a Neural Network driving their actions. Ability to learn from mistakes. ‣ Lamarckian Inheritance - NN traits passed on via EA 17
  • Creatures • “Artificial Life” game series from 1997-2001 ‣ Tamagotchi on steroids. • Sophisticated Evolutionary Algorithm controlled birth and reproduction of “Norns”. • Each Norn has a Neural Network driving their actions. Ability to learn from mistakes. ‣ Lamarckian Inheritance - NN traits passed on via EA • Great AI - more of a toy than a game. 17
  • Neural Networks 18
  • Neural Networks • Artificial Neural Networks are inspired by mechanics of the human brain. 18
  • Neural Networks • Artificial Neural Networks are inspired by mechanics of the human brain. • Basic unit is the Perceptron 18
  • Neural Networks • Artificial Neural Networks are inspired by mechanics of the human brain. • Basic unit is the Perceptron ‣ Kind of like a transistor, but with a mathematical function instead of discrete step. 18
  • Neural Networks • Artificial Neural Networks are inspired by mechanics of the human brain. • Basic unit is the Perceptron ‣ Kind of like a transistor, but with a mathematical function instead of discrete step. • By wiring a bunch of these together and altering the weighting of the inputs and outputs, can derive fairly sophisticated behaviour. 18
  • Evolution 19
  • Evolution • Modelled closely on biological approach. 19
  • Evolution • Modelled closely on biological approach. • Candidates represented as chromosomes. 19
  • Evolution • Modelled closely on biological approach. • Candidates represented as chromosomes. • Candidates from generation n are selected by some criteria. 19
  • Evolution • Modelled closely on biological approach. • Candidates represented as chromosomes. • Candidates from generation n are selected by some criteria. • Chromosomal data of two candidates combined to form offspring candidates for generation n+1. 19
  • Evolution 20
  • Galactic Arms Race 21
  • Galactic Arms Race 21
  • Galactic Arms Race 21
  • Galactic Arms Race • GAR is a game created by University of Central Florida. Project led by Ken Stanley (who you may know as the creator of NERO) 21
  • Galactic Arms Race • GAR is a game created by University of Central Florida. Project led by Ken Stanley (who you may know as the creator of NERO) • Uses an algorithm to produce content within the game - Content Generating NeuroEvolution of Augmenting Topologies 21
  • Galactic Arms Race • GAR is a game created by University of Central Florida. Project led by Ken Stanley (who you may know as the creator of NERO) • Uses an algorithm to produce content within the game - Content Generating NeuroEvolution of Augmenting Topologies • Evolves new and unique weapons unsupervised 21
  • Galactic Arms Race 21
  • EvoTanks 22
  • EvoTanks • Project running at Strathclyde for several years 22
  • EvoTanks • Project running at Strathclyde for several years • Based on the 1974 game “Tank” 22
  • EvoTanks • Project running at Strathclyde for several years • Based on the 1974 game “Tank” • Two tanks battle against each other in a 2D top- down maze. 22
  • EvoTanks • Project running at Strathclyde for several years • Based on the 1974 game “Tank” • Two tanks battle against each other in a 2D top- down maze. • Broadly, uses evolvable neural networks and reinforcement learning to create tank controllers. 22
  • EvoTanks • Project running at Strathclyde for several years • Based on the 1974 game “Tank” • Two tanks battle against each other in a 2D top- down maze. • Broadly, uses evolvable neural networks and reinforcement learning to create tank controllers. • Also packaged as part of 3rd Year AI coursework. 22
  • Just Cause 2 23
  • Just Cause 2 23
  • Just Cause 2 23
  • Just Cause 2 • Makes use of a lightweight Planning architecture to independently determine action sequences. 23
  • Just Cause 2 • Makes use of a lightweight Planning architecture to independently determine action sequences. • Allows for highly unorthodox interactions with NPCs - and a much more memorable experience. 23
  • Just Cause 2 • Makes use of a lightweight Planning architecture to independently determine action sequences. • Allows for highly unorthodox interactions with NPCs - and a much more memorable experience. • Also highlights some pretty major oversights 23
  • Just Cause 2 • Makes use of a lightweight Planning architecture to independently determine action sequences. • Allows for highly unorthodox interactions with NPCs - and a much more memorable experience. • Also highlights some pretty major oversights ‣ Analogous to “Uncanny Valley” problem 23
  • Automated Planning 24
  • Automated Planning • Planning is a “Deliberative” or “Symbolic” technique. 24
  • Automated Planning • Planning is a “Deliberative” or “Symbolic” technique. • Attempts to produce a sequence of actions by which an agent can achieve a set of goals. 24
  • Automated Planning • Planning is a “Deliberative” or “Symbolic” technique. • Attempts to produce a sequence of actions by which an agent can achieve a set of goals. • Requires : 24
  • Automated Planning • Planning is a “Deliberative” or “Symbolic” technique. • Attempts to produce a sequence of actions by which an agent can achieve a set of goals. • Requires : ‣ Description of possible interactions with the world 24
  • Automated Planning • Planning is a “Deliberative” or “Symbolic” technique. • Attempts to produce a sequence of actions by which an agent can achieve a set of goals. • Requires : ‣ Description of possible interactions with the world ‣ Complete specification of initial state of the world 24
  • Automated Planning • Planning is a “Deliberative” or “Symbolic” technique. • Attempts to produce a sequence of actions by which an agent can achieve a set of goals. • Requires : ‣ Description of possible interactions with the world ‣ Complete specification of initial state of the world ‣ Partial specification of the key goals to be achieved 24
  • Planning as Search 25
  • Planning as Search • Initial state as the root node of a tree. 25
  • Planning as Search • Initial state as the root node of a tree. • Actions possible in each state form branches. 25
  • Planning as Search • Initial state as the root node of a tree. • Actions possible in each state form branches. • Planning problem then becomes a tree search to find a (possibly optimal) path from root node to a goal node. 25
  • Planning as Search • Initial state as the root node of a tree. • Actions possible in each state form branches. • Planning problem then becomes a tree search to find a (possibly optimal) path from root node to a goal node. • Majority of Planning research boils down to finding suitable heuristics and search/pruning algorithms. 25
  • Planning Complexity 26
  • Planning Complexity • Domains usually rich enough to express PSPACE- Complete problems 26
  • Planning Complexity • Domains usually rich enough to express PSPACE- Complete problems ‣ Though actual problems tend towards NP-Hard 26
  • Planning Complexity • Domains usually rich enough to express PSPACE- Complete problems ‣ Though actual problems tend towards NP-Hard • In either case, complexity is reasonably prohibitive to 1ms constraint games impose 26
  • Planning Complexity • Domains usually rich enough to express PSPACE- Complete problems ‣ Though actual problems tend towards NP-Hard • In either case, complexity is reasonably prohibitive to 1ms constraint games impose ‣ IPC tends to allow entrants 10-30 minutes per problem. 26
  • Planning Complexity • Domains usually rich enough to express PSPACE- Complete problems ‣ Though actual problems tend towards NP-Hard • In either case, complexity is reasonably prohibitive to 1ms constraint games impose ‣ IPC tends to allow entrants 10-30 minutes per problem. • For games, generally using planning to choose between pre-scripted actions at a high-level. 26
  • Pingus 27
  • Pingus • Pingus is an OS implementation of Lemmings 27
  • Pingus • Pingus is an OS implementation of Lemmings • Interesting problem for planning technologies 27
  • Pingus • Pingus is an OS implementation of Lemmings • Interesting problem for planning technologies ‣ Not only to find a spatial path from beginning to end 27
  • Pingus • Pingus is an OS implementation of Lemmings • Interesting problem for planning technologies ‣ Not only to find a spatial path from beginning to end ‣ Find a path given certain constraints e.g. number of unit types available 27
  • Pingus 27
  • Left 4 Dead 28
  • Left 4 Dead 28
  • Left 4 Dead 28
  • Left 4 Dead • Left 4 Dead is a Survival Horror shooter game. 28
  • Left 4 Dead • Left 4 Dead is a Survival Horror shooter game. • As one of four people not infected, kill waves of zombies as you push to escape the quarantine zone. 28
  • Left 4 Dead • Left 4 Dead is a Survival Horror shooter game. • As one of four people not infected, kill waves of zombies as you push to escape the quarantine zone. • Introduced the concept of an “AI Director” which controls the pacing of the game. 28
  • Left 4 Dead • Left 4 Dead is a Survival Horror shooter game. • As one of four people not infected, kill waves of zombies as you push to escape the quarantine zone. • Introduced the concept of an “AI Director” which controls the pacing of the game. • Aim is to replicate horror film cycle of: 28
  • Left 4 Dead • Left 4 Dead is a Survival Horror shooter game. • As one of four people not infected, kill waves of zombies as you push to escape the quarantine zone. • Introduced the concept of an “AI Director” which controls the pacing of the game. • Aim is to replicate horror film cycle of: Calm => Build-up => Frenzy => Relax => Calm 28
  • HCSM 29
  • HCSM • Hierarchical Concurrent State Machines 29
  • HCSM • Hierarchical Concurrent State Machines • More of a paradigm than a specific technique. 29
  • HCSM • Hierarchical Concurrent State Machines • More of a paradigm than a specific technique. • Based heavily on “State Charts” 29
  • HCSM • Hierarchical Concurrent State Machines • More of a paradigm than a specific technique. • Based heavily on “State Charts” ‣ Finite State Machines for AI Processes 29
  • HCSM • Hierarchical Concurrent State Machines • More of a paradigm than a specific technique. • Based heavily on “State Charts” ‣ Finite State Machines for AI Processes • Allows for complex interactions to be easily visualised and maintained. 29
  • HCSM Fundamentals 30
  • HCSM Fundamentals • Basic building block for an HCSM is itself an HCSM 30
  • HCSM Fundamentals • Basic building block for an HCSM is itself an HCSM ‣ Child HCSMs are not transparent to parent 30
  • HCSM Fundamentals • Basic building block for an HCSM is itself an HCSM ‣ Child HCSMs are not transparent to parent • Each HCSM has the following characteristics 30
  • HCSM Fundamentals • Basic building block for an HCSM is itself an HCSM ‣ Child HCSMs are not transparent to parent • Each HCSM has the following characteristics ‣ Continuous input stream to HCSM 30
  • HCSM Fundamentals • Basic building block for an HCSM is itself an HCSM ‣ Child HCSMs are not transparent to parent • Each HCSM has the following characteristics ‣ Continuous input stream to HCSM ‣ Parameterised input alterable per-tick 30
  • HCSM Fundamentals • Basic building block for an HCSM is itself an HCSM ‣ Child HCSMs are not transparent to parent • Each HCSM has the following characteristics ‣ Continuous input stream to HCSM ‣ Parameterised input alterable per-tick ‣ “Activity Function” - output stream for HCSM 30
  • HCSM Fundamentals • Basic building block for an HCSM is itself an HCSM ‣ Child HCSMs are not transparent to parent • Each HCSM has the following characteristics ‣ Continuous input stream to HCSM ‣ Parameterised input alterable per-tick ‣ “Activity Function” - output stream for HCSM ‣ Contains other HCSMs - not necessarily connected 30
  • HCSM Fundamentals • Basic building block for an HCSM is itself an HCSM ‣ Child HCSMs are not transparent to parent • Each HCSM has the following characteristics ‣ Continuous input stream to HCSM ‣ Parameterised input alterable per-tick ‣ “Activity Function” - output stream for HCSM ‣ Contains other HCSMs - not necessarily connected • HCSMs can be “sequential” or “concurrent” 30
  • HCSMs in Action 31
  • HCSM Code ExecuteHCSM(hcsm) { ExecutePreActivity(hcsm.pre_activity_function); transition_to_fire := SelectTransitionToFire(hcsm); if (transition_to_fire) then hcsm.active := transition_to_fire.to_state; ActivateState(hcsm.active); for each active child m of hcsm do ExecuteHCSM(m); return(ExecuteActivity(hcsm.activity_function)); } 32
  • HCSM in L4D 33
  • HCSM in L4D • Unlikely that a technique designed for scene control would only be used for NPC characters as claimed. 33
  • HCSM in L4D • Unlikely that a technique designed for scene control would only be used for NPC characters as claimed. • Not a huge leap to see applicability to AI Director 33
  • HCSM in L4D • Unlikely that a technique designed for scene control would only be used for NPC characters as claimed. • Not a huge leap to see applicability to AI Director ‣ Overall aim is to match output of the HCSM to desired intensity level 33
  • HCSM in L4D • Unlikely that a technique designed for scene control would only be used for NPC characters as claimed. • Not a huge leap to see applicability to AI Director ‣ Overall aim is to match output of the HCSM to desired intensity level ‣ Current intensity measured by amount of damage dealt/ taken, proximity of enemies. 33
  • HCSM in L4D • Unlikely that a technique designed for scene control would only be used for NPC characters as claimed. • Not a huge leap to see applicability to AI Director ‣ Overall aim is to match output of the HCSM to desired intensity level ‣ Current intensity measured by amount of damage dealt/ taken, proximity of enemies. ‣ HCSM alters the world by e.g. spawning more enemies 33
  • Eve Online 34
  • Eve Online 34
  • Eve Online 34
  • Eve Online • “Apocrypha” Expansion brought a new NPC type. 34
  • Eve Online • “Apocrypha” Expansion brought a new NPC type. • Capable of 34
  • Eve Online • “Apocrypha” Expansion brought a new NPC type. • Capable of ‣ Picking optimal target based on dynamic criteria 34
  • Eve Online • “Apocrypha” Expansion brought a new NPC type. • Capable of ‣ Picking optimal target based on dynamic criteria ‣ Assisting other NPCs - healing etc. 34
  • Eve Online • “Apocrypha” Expansion brought a new NPC type. • Capable of ‣ Picking optimal target based on dynamic criteria ‣ Assisting other NPCs - healing etc. ‣ Evasive manoeuvring 34
  • Eve Online • “Apocrypha” Expansion brought a new NPC type. • Capable of ‣ Picking optimal target based on dynamic criteria ‣ Assisting other NPCs - healing etc. ‣ Evasive manoeuvring • Aimed to bring PvE experience closer to PvP 34
  • Eve Online • “Apocrypha” Expansion brought a new NPC type. • Capable of ‣ Picking optimal target based on dynamic criteria ‣ Assisting other NPCs - healing etc. ‣ Evasive manoeuvring • Aimed to bring PvE experience closer to PvP • No specific implementation detail revealed, this is educated guessing 34
  • Monte Carlo 35
  • Monte Carlo • Developed by Von Neumann at Los Alamos 35
  • Monte Carlo • Developed by Von Neumann at Los Alamos • Random sampling for a sufficiently large sample can replace exhaustive enumeration of every value in the space. 35
  • Monte Carlo • Developed by Von Neumann at Los Alamos • Random sampling for a sufficiently large sample can replace exhaustive enumeration of every value in the space. • In terms of AI, an action’s value is equivalent to simulating all decisions beyond this action and averaging the final value of the states reached. 35
  • MC & UCT 36
  • MC & UCT • Monte Carlo is purely random sampling. 36
  • MC & UCT • Monte Carlo is purely random sampling. • UCT leverages Exploitation vs Exploration trade-off. 36
  • MC & UCT • Monte Carlo is purely random sampling. • UCT leverages Exploitation vs Exploration trade-off. • Weights good-seeming areas of the tree, but doesn’t remove totally possibility for exploration. 36
  • MC & UCT • Monte Carlo is purely random sampling. • UCT leverages Exploitation vs Exploration trade-off. • Weights good-seeming areas of the tree, but doesn’t remove totally possibility for exploration. • Values bubble back up the tree. 36
  • MC & UCT • Monte Carlo is purely random sampling. • UCT leverages Exploitation vs Exploration trade-off. • Weights good-seeming areas of the tree, but doesn’t remove totally possibility for exploration. • Values bubble back up the tree. • Proven to be a powerful technique in AI 36
  • MC & UCT • Monte Carlo is purely random sampling. • UCT leverages Exploitation vs Exploration trade-off. • Weights good-seeming areas of the tree, but doesn’t remove totally possibility for exploration. • Values bubble back up the tree. • Proven to be a powerful technique in AI ‣ Limited uptake since inception largely due to requiring fast rollouts. Only becoming possible recently. 36
  • MC/UCT in Eve 37
  • MC/UCT in Eve • Dynamically picking highest priority target handled by MC/UCT based on profile of players and actions. 37
  • MC/UCT in Eve • Dynamically picking highest priority target handled by MC/UCT based on profile of players and actions. • Eliminate the player most likely to contribute to your death 37
  • MC/UCT in Eve • Dynamically picking highest priority target handled by MC/UCT based on profile of players and actions. • Eliminate the player most likely to contribute to your death ‣ Rather than simply highest damage dealer, first damage dealer, most “aggressive” player etc. 37
  • MC/UCT in Eve • Dynamically picking highest priority target handled by MC/UCT based on profile of players and actions. • Eliminate the player most likely to contribute to your death ‣ Rather than simply highest damage dealer, first damage dealer, most “aggressive” player etc. • Potentially a very powerful technique. 37
  • MC/UCT in Eve • Dynamically picking highest priority target handled by MC/UCT based on profile of players and actions. • Eliminate the player most likely to contribute to your death ‣ Rather than simply highest damage dealer, first damage dealer, most “aggressive” player etc. • Potentially a very powerful technique. • Again - purely speculation. 37
  • StrathPoker 38
  • StrathPoker • Makes use of Monte Carlo to play Texas Hold ‘Em 38
  • StrathPoker • Makes use of Monte Carlo to play Texas Hold ‘Em • Work to date largely focused on building a system to accurately classify players in stereotypes 38
  • StrathPoker • Makes use of Monte Carlo to play Texas Hold ‘Em • Work to date largely focused on building a system to accurately classify players in stereotypes ‣ From that, a more accurate simulation can be generated during rollout. 38
  • StrathPoker • Makes use of Monte Carlo to play Texas Hold ‘Em • Work to date largely focused on building a system to accurately classify players in stereotypes ‣ From that, a more accurate simulation can be generated during rollout. • Intuitive principle, but results so far inconclusive 38
  • Overview • AI and Games - Why? • A Brief Introduction • Some Interesting Techniques • Conclusions 39
  • Summary 40
  • Summary • Presented a wide but shallow overview of number of techniques in use in industry. 40
  • Summary • Presented a wide but shallow overview of number of techniques in use in industry. • Highlighted how the AI routines add to the gaming experience. 40
  • Summary • Presented a wide but shallow overview of number of techniques in use in industry. • Highlighted how the AI routines add to the gaming experience. • Showcased some of the ways games are being used in academia here at Strathclyde and further afield. 40
  • Conclusions 41
  • Conclusions • Last year at AI & Games Network : 41
  • Conclusions • Last year at AI & Games Network : “A* accounts for 90% of game AI” 41
  • Conclusions • Last year at AI & Games Network : “A* accounts for 90% of game AI” • Seeing a definite trend towards new and interesting techniques applied in new ways. 41
  • Conclusions • Last year at AI & Games Network : “A* accounts for 90% of game AI” • Seeing a definite trend towards new and interesting techniques applied in new ways. • Increasing non-standard applications of AI. 41
  • Conclusions • Last year at AI & Games Network : “A* accounts for 90% of game AI” • Seeing a definite trend towards new and interesting techniques applied in new ways. • Increasing non-standard applications of AI. • More viable routes for “Indie” developers to publish games and reach a wide audience - more risk taking. 41
  • Conclusions 42
  • Conclusions • “Strong” AI isn’t necessarily a benefit to games. 42
  • Conclusions • “Strong” AI isn’t necessarily a benefit to games. ‣ Uncanny Valley when smart NPCs take a left turn. 42
  • Conclusions • “Strong” AI isn’t necessarily a benefit to games. ‣ Uncanny Valley when smart NPCs take a left turn. ‣ Means losing a lot of directorial control as a developer. 42
  • Conclusions • “Strong” AI isn’t necessarily a benefit to games. ‣ Uncanny Valley when smart NPCs take a left turn. ‣ Means losing a lot of directorial control as a developer. • Games are a benefit to making strong AI. 42
  • Conclusions • “Strong” AI isn’t necessarily a benefit to games. ‣ Uncanny Valley when smart NPCs take a left turn. ‣ Means losing a lot of directorial control as a developer. • Games are a benefit to making strong AI. ‣ Controlled environment to test theories in. 42
  • Conclusions • “Strong” AI isn’t necessarily a benefit to games. ‣ Uncanny Valley when smart NPCs take a left turn. ‣ Means losing a lot of directorial control as a developer. • Games are a benefit to making strong AI. ‣ Controlled environment to test theories in. ‣ Excellent visualisation tool makes theory look practical. 42
  • Conclusions • “Strong” AI isn’t necessarily a benefit to games. ‣ Uncanny Valley when smart NPCs take a left turn. ‣ Means losing a lot of directorial control as a developer. • Games are a benefit to making strong AI. ‣ Controlled environment to test theories in. ‣ Excellent visualisation tool makes theory look practical. • Easy to lose sight of the motivations for including AI in games and the constraints imposed. 42
  • 3 Key Takeaways 43
  • 3 Key Takeaways 1. AI can be an incredible tool to enhance games. 43
  • 3 Key Takeaways 1. AI can be an incredible tool to enhance games. 2. More than “the bit that makes the bad guys shoot back”. 43
  • 3 Key Takeaways 1. AI can be an incredible tool to enhance games. 2. More than “the bit that makes the bad guys shoot back”. 3. AI is going to be a major force behind game innovation in the future. 43
  • 3 Key Takeaways 43
  • Shameless Plugs • Me ‣ http://lukedicken.com ‣ luke@cis.strath.ac.uk • Strathclyde AI and Games Group ‣ John Levine - johnl@cis.strath.ac.uk • Strathclyde Planning Group ‣ Derek Long - derek@cis.strath.ac.uk 44