SlideShare a Scribd company logo
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

More Related Content

PPTX
Artificial intelligence and video games
PDF
Artificial Intelligence in games
PPT
Artificial intelligence In Modern-Games.
PDF
06. Game Architecture
PPTX
Artificial Intelligence in Gaming
PPTX
Game Development Step by Step
PDF
Artificial intelligence in gaming.
PPTX
Game playing in artificial intelligent technique
Artificial intelligence and video games
Artificial Intelligence in games
Artificial intelligence In Modern-Games.
06. Game Architecture
Artificial Intelligence in Gaming
Game Development Step by Step
Artificial intelligence in gaming.
Game playing in artificial intelligent technique

What's hot (20)

PPSX
An Introduction To Game development
PPTX
Artificial Intelligence in Gaming
PPTX
Tic toc game presentation
PPTX
Game Architecture and Programming
PPTX
Introduction to Game Development
PDF
Game Design Fundamentals
PPTX
게임 개발 파이프라인과 시스템 기획(공개용)
PDF
Game Design fundamentals
PDF
Game Analytics & Machine Learning
PPTX
Project presentation FPS
PPTX
Game Design Principle
PDF
Introduction to Game Development
PPTX
AI in gaming
PPT
Game Interface Design
PPTX
Game development
PPTX
Video game proposal
PPTX
Game development
PDF
NHN NEXT 게임 전공 소개
PDF
Trustworthy Recommender Systems
PPT
Introduction to Unity3D Game Engine
An Introduction To Game development
Artificial Intelligence in Gaming
Tic toc game presentation
Game Architecture and Programming
Introduction to Game Development
Game Design Fundamentals
게임 개발 파이프라인과 시스템 기획(공개용)
Game Design fundamentals
Game Analytics & Machine Learning
Project presentation FPS
Game Design Principle
Introduction to Game Development
AI in gaming
Game Interface Design
Game development
Video game proposal
Game development
NHN NEXT 게임 전공 소개
Trustworthy Recommender Systems
Introduction to Unity3D Game Engine
Ad

Viewers also liked (20)

PPT
Game Playing in Artificial Intelligence
PPT
Artificial Intelligence
PPTX
Artificial Intelligence Presentation
PPTX
Artificial Intelligence Presentation
PPTX
Ai for games seminar: N-Grams prediction + intro to bayes inference
PPT
6 games
PPT
Alpha beta prouning
PPTX
Minimax
PPTX
Ai on video games
PPTX
AI SEO Presentation
PPTX
Artificial intelligence presentation finale
DOCX
Game Paper
PPT
A* Path Finding
PPT
AI AND EDUCATIO
PPTX
Artificial intellegence ppt
PDF
Computer Animation + Game Design Presentation
PPTX
Introduction To My Graduation Project
PDF
12 adversal search
PPTX
Ai Workshop Slides Used By John Loty In 2008.
PPT
Game Development With HTML5
Game Playing in Artificial Intelligence
Artificial Intelligence
Artificial Intelligence Presentation
Artificial Intelligence Presentation
Ai for games seminar: N-Grams prediction + intro to bayes inference
6 games
Alpha beta prouning
Minimax
Ai on video games
AI SEO Presentation
Artificial intelligence presentation finale
Game Paper
A* Path Finding
AI AND EDUCATIO
Artificial intellegence ppt
Computer Animation + Game Design Presentation
Introduction To My Graduation Project
12 adversal search
Ai Workshop Slides Used By John Loty In 2008.
Game Development With HTML5
Ad

Similar to Artificial Intelligence in Computer and Video Games (20)

KEY
Game AI 101 - NPCs and Agents and Algorithms... Oh My!
PDF
User Generated AI for Interactive Digital Entertainment 2011
PDF
Artificial Intelligence in Games Introduction.pdf
PDF
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1
PDF
Science and Videogames. Computational intelligence in videogames
PPTX
true caller hddijdfi fuudfid fjj16.pptx
PDF
AI For Gaming lecture1 introduction to AI for Gaming.pdf
PDF
Overview on computer games
PDF
Artificial Intelligence in Gaming
PPTX
Artificial Intelligence in Video Games: A Love Story
PDF
Why AI is shaping our games
PDF
Why AI Is Shaping our games - Johanna Pirker, 2019
PDF
Computational Intelligence in Games Tutorial @GECCO2012
PDF
Artificial Intelligence in Games PlayingGames-2.pdf
PPTX
Artificial Intelligence and Game playing
PPTX
Applications of Artificial Intelligence subject
PPTX
A survey on AI in computer games
PPT
Project on ai gaming
PPTX
Artificial intelligence
PDF
Artificial Intelligence In Video Games A Survey Written By
Game AI 101 - NPCs and Agents and Algorithms... Oh My!
User Generated AI for Interactive Digital Entertainment 2011
Artificial Intelligence in Games Introduction.pdf
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1
Science and Videogames. Computational intelligence in videogames
true caller hddijdfi fuudfid fjj16.pptx
AI For Gaming lecture1 introduction to AI for Gaming.pdf
Overview on computer games
Artificial Intelligence in Gaming
Artificial Intelligence in Video Games: A Love Story
Why AI is shaping our games
Why AI Is Shaping our games - Johanna Pirker, 2019
Computational Intelligence in Games Tutorial @GECCO2012
Artificial Intelligence in Games PlayingGames-2.pdf
Artificial Intelligence and Game playing
Applications of Artificial Intelligence subject
A survey on AI in computer games
Project on ai gaming
Artificial intelligence
Artificial Intelligence In Video Games A Survey Written By

More from Luke Dicken (20)

PPT
Advances in Game AI
PDF
Diversity in NPC AI
PDF
You're Not Special, Neither am I
PDF
Procedural Processes - Lessons Learnt from Automated Content Generation in "E...
KEY
Game AI For the Masses
PDF
The Next Generation of Game Planners
KEY
Game Development 2
KEY
Game Development 1 - What is a Game?
PDF
The International Game Developers Association
PDF
Lecture 7 - Experience Management
PDF
Lecture 6 - Procedural Content and Player Models
PDF
Lecture 5 - Procedural Content Generation
PDF
Lecture 8 - What is Game AI? Final Thoughts
PDF
Lecture 3 - Decision Making
PDF
Lecture 2 - Probability
PDF
Lecture 1 - Game Theory
PDF
Lecture 4 - Opponent Modelling
KEY
What I Done on my Holidays
KEY
Influence Landscapes - From Spatial to Conceptual Representations
KEY
The Strathclyde Poker Research Environment
Advances in Game AI
Diversity in NPC AI
You're Not Special, Neither am I
Procedural Processes - Lessons Learnt from Automated Content Generation in "E...
Game AI For the Masses
The Next Generation of Game Planners
Game Development 2
Game Development 1 - What is a Game?
The International Game Developers Association
Lecture 7 - Experience Management
Lecture 6 - Procedural Content and Player Models
Lecture 5 - Procedural Content Generation
Lecture 8 - What is Game AI? Final Thoughts
Lecture 3 - Decision Making
Lecture 2 - Probability
Lecture 1 - Game Theory
Lecture 4 - Opponent Modelling
What I Done on my Holidays
Influence Landscapes - From Spatial to Conceptual Representations
The Strathclyde Poker Research Environment

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PPT
Teaching material agriculture food technology
PDF
Electronic commerce courselecture one. Pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
cuic standard and advanced reporting.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Modernizing your data center with Dell and AMD
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
Big Data Technologies - Introduction.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Digital-Transformation-Roadmap-for-Companies.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
MYSQL Presentation for SQL database connectivity
Teaching material agriculture food technology
Electronic commerce courselecture one. Pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
cuic standard and advanced reporting.pdf
Understanding_Digital_Forensics_Presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Modernizing your data center with Dell and AMD
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Building Integrated photovoltaic BIPV_UPV.pdf

Artificial Intelligence in Computer and Video Games

  • 1. AI in Computer and Video Games Luke Dicken
  • 3. Disclaimers! • I am not Darryl Charles 2
  • 4. Disclaimers! • I am not Darryl Charles • This presentation prepared at quite short notice 2
  • 5. 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
  • 6. 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
  • 7. 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
  • 8. 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
  • 10. About Me • Undergrad, MSc and MRes in AI-related disciplines. 3
  • 11. About Me • Undergrad, MSc and MRes in AI-related disciplines. • Currently PhD Student at University of Strathclyde 3
  • 12. 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
  • 13. 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
  • 14. 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
  • 15. 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
  • 17. Overview • AI and Games - Why? 4
  • 18. Overview • AI and Games - Why? • A Brief Introduction 4
  • 19. Overview • AI and Games - Why? • A Brief Introduction • Some Interesting Techniques 4
  • 20. Overview • AI and Games - Why? • A Brief Introduction • Some Interesting Techniques • Conclusions 4
  • 21. Overview • AI and Games - Why? • A Brief Introduction • Some Interesting Techniques • Conclusions 5
  • 23. 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
  • 24. 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
  • 26. AI in Games • From an Industry point of view, AI allows greater engagement between the player(s) and the game. 7
  • 27. 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
  • 28. 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
  • 29. 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
  • 31. Automated Opponents • History of interest in playing games short-handed 8
  • 32. Automated Opponents • History of interest in playing games short-handed ‣ Mechanical Turk claimed to be a chess player circa 1770 8
  • 33. 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
  • 34. 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
  • 35. 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
  • 36. 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
  • 37. 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
  • 38. 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
  • 40. “NPCs” in Games • As games evolved, they became asymetrical 9
  • 41. “NPCs” in Games • As games evolved, they became asymetrical • Entities that did not have the same motivations as a player - Non-Player Characters 9
  • 42. “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
  • 43. AI as the Player 10
  • 44. AI as the Player • Current thread in research. 10
  • 45. AI as the Player • Current thread in research. • Creating AI that interacts with the game in the manner of a human player 10
  • 46. AI as the Player • Current thread in research. • Creating AI that interacts with the game in the manner of a human player 10
  • 47. 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
  • 48. 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
  • 49. 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
  • 50. 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
  • 51. 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
  • 52. AI as the Creator 11
  • 53. AI as the Creator • New trend in both industry and academia 11
  • 54. AI as the Creator • New trend in both industry and academia • AI techniques used to control the game 11
  • 55. AI as the Creator • New trend in both industry and academia • AI techniques used to control the game ‣ Content creation 11
  • 56. 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
  • 57. 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
  • 58. 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
  • 59. 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
  • 60. Overview • AI and Games - Why? • A Brief Introduction • Some Interesting Techniques • Conclusions 12
  • 62. How Games Work • Broadly, the main execution of a game is broken into iterations through a continuously executing loop. 13
  • 63. 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
  • 64. 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
  • 65. 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
  • 66. 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
  • 67. 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
  • 69. Execution Time • Games Industry aims for fast execution. 14
  • 70. Execution Time • Games Industry aims for fast execution. ‣ 60 Frames Per Second 14
  • 71. Execution Time • Games Industry aims for fast execution. ‣ 60 Frames Per Second ‣ Each iteration through main loop ~16ms 14
  • 72. 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
  • 73. 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
  • 74. 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
  • 75. State of the Art 15
  • 76. State of the Art • 3D Graphics Cards have been around for 15 years 15
  • 77. State of the Art • 3D Graphics Cards have been around for 15 years ‣ Increasingly diminishing returns on effort vs quality 15
  • 78. 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
  • 79. 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
  • 80. 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
  • 81. 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
  • 82. 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
  • 83. Overview • AI and Games - Why? • A Brief Introduction • Some Interesting Techniques • Examples From Successful Games • Examples From Academia • Conclusions 16
  • 87. Creatures • “Artificial Life” game series from 1997-2001 17
  • 88. Creatures • “Artificial Life” game series from 1997-2001 ‣ Tamagotchi on steroids. 17
  • 89. Creatures • “Artificial Life” game series from 1997-2001 ‣ Tamagotchi on steroids. • Sophisticated Evolutionary Algorithm controlled birth and reproduction of “Norns”. 17
  • 90. Creatures • “Artificial Life” game series from 1997-2001 ‣ Tamagotchi on steroids. • Sophisticated Evolutionary Algorithm controlled birth and reproduction of “Norns”. 17
  • 91. Creatures • “Artificial Life” game series from 1997-2001 ‣ Tamagotchi on steroids. • Sophisticated Evolutionary Algorithm controlled birth and reproduction of “Norns”. 17
  • 92. 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
  • 93. 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
  • 94. 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
  • 96. Neural Networks • Artificial Neural Networks are inspired by mechanics of the human brain. 18
  • 97. Neural Networks • Artificial Neural Networks are inspired by mechanics of the human brain. • Basic unit is the Perceptron 18
  • 98. 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
  • 99. 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
  • 101. Evolution • Modelled closely on biological approach. 19
  • 102. Evolution • Modelled closely on biological approach. • Candidates represented as chromosomes. 19
  • 103. Evolution • Modelled closely on biological approach. • Candidates represented as chromosomes. • Candidates from generation n are selected by some criteria. 19
  • 104. 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
  • 109. 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
  • 110. 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
  • 111. 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
  • 114. EvoTanks • Project running at Strathclyde for several years 22
  • 115. EvoTanks • Project running at Strathclyde for several years • Based on the 1974 game “Tank” 22
  • 116. 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
  • 117. 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
  • 118. 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
  • 122. Just Cause 2 • Makes use of a lightweight Planning architecture to independently determine action sequences. 23
  • 123. 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
  • 124. 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
  • 125. 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
  • 127. Automated Planning • Planning is a “Deliberative” or “Symbolic” technique. 24
  • 128. 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
  • 129. 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
  • 130. 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
  • 131. 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
  • 132. 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
  • 134. Planning as Search • Initial state as the root node of a tree. 25
  • 135. Planning as Search • Initial state as the root node of a tree. • Actions possible in each state form branches. 25
  • 136. 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
  • 137. 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
  • 139. Planning Complexity • Domains usually rich enough to express PSPACE- Complete problems 26
  • 140. Planning Complexity • Domains usually rich enough to express PSPACE- Complete problems ‣ Though actual problems tend towards NP-Hard 26
  • 141. 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
  • 142. 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
  • 143. 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
  • 145. Pingus • Pingus is an OS implementation of Lemmings 27
  • 146. Pingus • Pingus is an OS implementation of Lemmings • Interesting problem for planning technologies 27
  • 147. 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
  • 148. 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
  • 153. Left 4 Dead • Left 4 Dead is a Survival Horror shooter game. 28
  • 154. 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
  • 155. 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
  • 156. 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
  • 157. 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
  • 159. HCSM • Hierarchical Concurrent State Machines 29
  • 160. HCSM • Hierarchical Concurrent State Machines • More of a paradigm than a specific technique. 29
  • 161. HCSM • Hierarchical Concurrent State Machines • More of a paradigm than a specific technique. • Based heavily on “State Charts” 29
  • 162. 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
  • 163. 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
  • 165. HCSM Fundamentals • Basic building block for an HCSM is itself an HCSM 30
  • 166. HCSM Fundamentals • Basic building block for an HCSM is itself an HCSM ‣ Child HCSMs are not transparent to parent 30
  • 167. 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
  • 168. 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
  • 169. 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
  • 170. 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
  • 171. 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
  • 172. 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
  • 174. 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
  • 176. HCSM in L4D • Unlikely that a technique designed for scene control would only be used for NPC characters as claimed. 33
  • 177. 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
  • 178. 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
  • 179. 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
  • 180. 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
  • 184. Eve Online • “Apocrypha” Expansion brought a new NPC type. 34
  • 185. Eve Online • “Apocrypha” Expansion brought a new NPC type. • Capable of 34
  • 186. Eve Online • “Apocrypha” Expansion brought a new NPC type. • Capable of ‣ Picking optimal target based on dynamic criteria 34
  • 187. Eve Online • “Apocrypha” Expansion brought a new NPC type. • Capable of ‣ Picking optimal target based on dynamic criteria ‣ Assisting other NPCs - healing etc. 34
  • 188. 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
  • 189. 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
  • 190. 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
  • 192. Monte Carlo • Developed by Von Neumann at Los Alamos 35
  • 193. 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
  • 194. 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
  • 196. MC & UCT • Monte Carlo is purely random sampling. 36
  • 197. MC & UCT • Monte Carlo is purely random sampling. • UCT leverages Exploitation vs Exploration trade-off. 36
  • 198. 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
  • 199. 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
  • 200. 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
  • 201. 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
  • 203. MC/UCT in Eve • Dynamically picking highest priority target handled by MC/UCT based on profile of players and actions. 37
  • 204. 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
  • 205. 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
  • 206. 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
  • 207. 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
  • 209. StrathPoker • Makes use of Monte Carlo to play Texas Hold ‘Em 38
  • 210. 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
  • 211. 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
  • 212. 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
  • 213. Overview • AI and Games - Why? • A Brief Introduction • Some Interesting Techniques • Conclusions 39
  • 215. Summary • Presented a wide but shallow overview of number of techniques in use in industry. 40
  • 216. 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
  • 217. 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
  • 219. Conclusions • Last year at AI & Games Network : 41
  • 220. Conclusions • Last year at AI & Games Network : “A* accounts for 90% of game AI” 41
  • 221. 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
  • 222. 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
  • 223. 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
  • 225. Conclusions • “Strong” AI isn’t necessarily a benefit to games. 42
  • 226. Conclusions • “Strong” AI isn’t necessarily a benefit to games. ‣ Uncanny Valley when smart NPCs take a left turn. 42
  • 227. 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
  • 228. 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
  • 229. 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
  • 230. 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
  • 231. 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
  • 233. 3 Key Takeaways 1. AI can be an incredible tool to enhance games. 43
  • 234. 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
  • 235. 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
  • 237. 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