SlideShare uma empresa Scribd logo
1 de 42
Baixar para ler offline
What is Game AI?
 Final Thoughts
What is Game AI?



    • Game AI is not about :
      ‣ Beating the player
      ‣ Optimality
      ‣ “making the bad guys shoot”




2
What is Game AI



    • Game AI is about :
      ‣ Delivering great experiences to players
      ‣ Building immersive environments
      ‣ Automating the functions of a human “Dungeon Master”




3
Batman - Arkham Asylum




4
Batman - Arkham Asylum


    • A classic example of the game AI challenge
    • We could coordinate the thugs, use small unit
     tactics etc.
    • Make use of existing AI techniques to make
     intelligent, successful thugs.
    • Is this the point?

5
Batman - Arkham Asylum




6
Batman - Arkham Asylum


    • The overall aim is to make a Batman “simulator”.
    • Make the player feel like they ARE Batman.
    • Recall “Losing with Style”
       ‣ Epic brawls
       ‣ Batman can generally win if he’s smart
    • Player is entertained and immersed in the world of
     Batman.

7
The “Odd Sock Drawer”

 Stuff That Didn’t Fit In
     Anywhere Else

      AKA “The Brain Dump”
Emergence


    • Emergence is the term for “interesting” things
     coming from seemingly simple rules.
    • Recall L-Systems from last week
      ‣ Basic rules : draw, turn left, turn right
      ‣ Complicated patterns emerged from the interaction of
        these rules


9
Reynolds Steering


     • Three simple rules for steering
       ‣ Separation - avoid crowding local units
       ‣ Alignment - steer towards the avg heading of local units
       ‣ Cohesion - steer towards the avg position of local units
     • From these three rules we can simulate “flock”
      behaviour

10
Boids




     • Demo - http://lukedicken.com/projects/AITest/
      WebPlayer.html




11
Cellular Automata


     • A CA is a grid representation
     • Individual cells are “off” or “on”
        ‣ Actually can take a range of values, but usually binary.
     • Iterative process to determine at a given step a cell’s
      state
     • Most famous ruleset is Conway’s Game of Life

12
Conway’s Game of Life

     • Under-population : Any live cell with fewer than
      two live neighbours dies
     • Overcrowding : Any live cell with more than three
      live neighbours dies
     • Reproduction : Any dead cell with exactly three live
      neighbours becomes a live cell
     • Live cells with two or three live neighbours lives
13
Gosper’s Glider Gun




14
The Glider




15
CA and the Universe

     • There are some people who believe that CA
      emergence reflects the nature of our universe.
     • The universe is claimed to be a Turing Machine.
     • Through the property of Turing Completeness any
      Turing Machine can replicate behaviour of another.
     • CAs are a Turing Machine.
       ‣ Some researchers claim to be discovering laws of our
         universe by analysis of CA systems
16
CAs for Games


     • CAs are of interest in the context of Game AI
     • Can be used to generate “particles”
        ‣ Think confetti
     • Particle systems are used for all sorts in graphics
        ‣ Smoke, vapour, dust, leaves, sparkles, explosions, flames
     • Rather than defining a complex particle system
     • Use a lightweight CA definition and a start state
17
Emergence


     • Emergence allows us to define complex systems
      simply.
     • Diverse behaviour can be exhibited
       ‣ Novel, unexpected behaviour
     • Loss of directorial control when AI becomes
      unpredictable.

18
Traditional vs Game AI


     • Something I hear on a fairly regular basis is how bad
      AI in games is.
     • “It’s not intelligent”
     • “You could do this with <insert algorithm>”
     • We’ve talked at length about the different
      motivations of Traditional AI and Game AI

19
Processing Time

     • One of the big things that is different between is the
      amount of CPU power available.
     • When we talk about traditional AI systems, that’s
      typically all that the computer is doing.
     • Our AI systems need horsepower.
     • Games need horsepower too.
        ‣ Graphics, physics, networking.
        ‣ 1ms of CPU time per frame - <10% of time given to AI
20
Memory Usage

     • Memory is another big factor.
     • Consider the kind of search trees we’ve been
      talking about.
       ‣ Combinatorial explosion
       ‣ Tracking massive amounts of states
     • Memory required for non-trivial planning quickly
      hits multiple gigabytes.
       ‣ For one planning problem
21
Debugging AI Systems


     • Lots of our AI systems are randomised
     • How can we accurately test behaviour if it relies on
      random chance?
     • We talked previously in Poker context about how
      to overcome randomness
       ‣ Many repetitions to minimise variance
       ‣ Find a way to rig the randomness

22
Pseudo-Random Behaviour


     • We know that computers cannot generate truly
      random numbers.
     • What they actually use are complicated functions
      using a “seed” number to initialise them.
     • We can generate the same number sequence iff
       ‣ We know the function
       ‣ We know the seed

23
Car Key

     • At a very basic level, this is how many cryptography
      techniques work.
     • Consider a remote car key
     • Lots of keys share the same frequency
        ‣ Need to distinguish our key/car pair
     • Thieves could intercept the unlock command if it
      was broadcast in the clear.
        ‣ Replay Attack
24
Rolling Code

     • Get around this using a pair of pseudo-random
      number generators between lock and key.
        ‣ Synchronised by having the same seed number
     • Both lock and key know what the next number in
      the sequence is.
     • If a thief intercepts it, that code is now “old”
        ‣ Need to be able to predict what the next number is
        ‣ Lots of extra stuff to make this difficult/impossible
25
Debugging AI Systems


     • We can use the same basic principles to ensure that
      when we debug an AI system, we are observing the
      same decisions.
     • Crash reports always report seed number used.
     • We can replicate the random number sequence that
      was generated before the crash
       ‣ Replicate the behaviour that caused the crash

26
A Note on Footprints


     • Activating debug code and changing your program
      can alter it’s footprint when compiled.
     • Can lead to unintentional changes in behaviour.
       ‣ Debug build takes longer to execute as there are more
         instructions - different amounts of processor available,
         behaves differently


27
Software Engineering for
                    (Game) AI
     • By now you will have been told about best practices
      for Software Engineering.
       ‣ UML diagrams
       ‣ Waterfall method
     • Good for well understood tasks
       ‣ Write an app that does this
     • What if the task isn’t understood?
       ‣ How can we design a system on paper if it isn’t specified?
28
Iteration, Iteration,
                         Iteration
     • The way we deal with not knowing the specification
      in advance is to constantly test.
     • Rapid iteration
        ‣ Building systems incrementally
        ‣ No monolithic approach
        ‣ Make it do something, make it do the right thing later
        ‣ Iterative refinement
     • Testing code correctness every few lines.
29
Reality

     • Continuous Integration
        ‣ Code being committed is going through automated tests
         to ensure correctness
     • Long build processes
     • Core reason a lot of AI is based on scripting
        ‣ No need to alter the code, no need to wait for a
         recompile.
        ‣ Script updates can be executed on the same build.
30
Scrum

     • Scrum is a project management technique getting a
      lot of use in development teams
     • Growing in popularity since 2001, although dates
      back to 1986
     • Tightly integrates a product-centric view of the
      development process
        ‣ Avoids teams working on “cool” rather than “useful”
         features.
31
Roles


     • Product Owner - Represents the “product”, client’s
      perspective. Ensures that the team is providing
      value.
     • Scrum Master - In charge of ensuring smooth
      operation of the team. Not leader of the team.
       ‣ Somewhere between Mum and Fixer
     • Team - Developers
32
The Product Backlog

     • Created by the Product Owner
     • Prioritised list of potential features.
        ‣ Priority based on value of feature and work involved
     • Product Owner and Team determine priority
        ‣ Value is set by the Product Owner
        ‣ Amount of work is set by the team
     • Items in the Product Backlog must be promoted to
      the Sprint Backlog before being worked on.
33
The Sprint

     • Building block of Scrum
     • A development process consists of multiple sprints
       ‣ Each sprint lasts between a week and a month
       ‣ Firm deadline for the length of the sprints
     • Sprint Planning Meeting selects what items from the
      Product Backlog are going to be tackled.
     • Sprint Review Meeting analyses what has/hasn’t
      been accomplished at the end. Demo.
34
The Scrum

     • Daily Team meeting - 15m
       ‣ What have you done since yesterday?
       ‣ What are you going to do today?
       ‣ Are there any obstacles right now?
     • Scrum of Scrums
       ‣ Daily summary
       ‣ Each team sends a delegate
       ‣ Allows inter-team communication and progress checking
35
Maslow’s Hammer


     • “If all you have is a hammer, everything looks like a
      nail” - The Psychology of Science, Maslow
     • This plagues the AI field - especially in academia
     • Experts in one particular aspect
        ‣ Or grads who learnt about one technique/algorithm
     • Go on to use it as standard approach everywhere,
      even when it’s not at all appropriate.
36
The Philosophy of this
                     Module
     • As much as possible I’ve avoided talking about
      specific algorithms.
     • Algorithms are available in books or on Wikipedia
     • What I’ve tried to emphasise is approaches and
      application areas.
     • Teaching ways of thinking about Game AI
       ‣ Not how to write Game AI

37
The AI Toolbox

     • Different techniques are suited to different jobs.
     • Whenever you come across a new technique, make
      a note of it.
        ‣ Add it to your toolbox
     • When you come across a new problem :
        ‣ Do you have a tool that can solve it?
        ‣ Is there a better one available?
     • These lectures hopefully give you a “starter kit”.
38
Final Summary



     • Science of playing games
     • Building mathematical representations of players.
     • Generating content for games
     • Tailoring content to players
     • Managing the experience of players


39
Source Material

     • Largely drawn from articles I’ve written for
        ‣ AIGameDev.com
        ‣ AltDevBlogADay.com
        ‣ Gamasutra.com
     • Other aspects based on a series of posts
      forthcoming for Gamasutra
     • Also based on conversations with / talks from the
      following people (and more) over the past few years
40
Acknowledgements

     • Phil Carlisle (Namaste)
     • Alex Champandard (AIGameDev.com)
     • Kevin Dill (Lockheed Martin Advanced Simulation Center)
     • Richard Evans (Stumptown Game Machine)
     • Dan Kline (Electronic Arts - Maxis)
     • Dave Mark (Intrinsic Algorithm, Game AI Programmers Guild)
     • Gwaredd Mountain (Climax Studios)
     • Brian Schwab (Blizzard Entertainment)
     • Togelius and Yannakakis (ITU Copenhagen)
41
Finally

     • Strathclyde AI and Games research group
       ‣ Talk to us about postgrad opportunities
     • International Game Developers Association
       ‣ IGDA Scotland
       ‣ IGDA Scholarships
     • Organising some form of game-development based
      program here at Strathclyde
       ‣ Keep an eye on your email in the next week or two
42

Mais conteúdo relacionado

Mais procurados

Lecture 5 - Procedural Content Generation
Lecture 5 - Procedural Content GenerationLecture 5 - Procedural Content Generation
Lecture 5 - Procedural Content GenerationLuke Dicken
 
Game Development 2
Game Development 2Game Development 2
Game Development 2Luke Dicken
 
Lecture 7 - Experience Management
Lecture 7 - Experience ManagementLecture 7 - Experience Management
Lecture 7 - Experience ManagementLuke Dicken
 
Knowing When to Hold 'Em, When to Fold 'Em and When to Blow 'Em Up
Knowing When to Hold 'Em, When to Fold 'Em and When to Blow 'Em UpKnowing When to Hold 'Em, When to Fold 'Em and When to Blow 'Em Up
Knowing When to Hold 'Em, When to Fold 'Em and When to Blow 'Em UpLuke Dicken
 
Procedural Content Generation
Procedural Content GenerationProcedural Content Generation
Procedural Content GenerationPier Luca Lanzi
 
Bethesda's Iterative Level Design Process for Skyrim and Fallout 3
Bethesda's Iterative Level Design Process for Skyrim and Fallout 3Bethesda's Iterative Level Design Process for Skyrim and Fallout 3
Bethesda's Iterative Level Design Process for Skyrim and Fallout 3Joel Burgess
 
weekly AI tech talk #85 ml-agents Enabling Learned Behaviors with Reinforceme...
weekly AI tech talk #85 ml-agents Enabling Learned Behaviors with Reinforceme...weekly AI tech talk #85 ml-agents Enabling Learned Behaviors with Reinforceme...
weekly AI tech talk #85 ml-agents Enabling Learned Behaviors with Reinforceme...Bill Liu
 
Showcase of My Research on Games & AI "till the end of Oct. 2014"
Showcase of My Research on Games & AI "till the end of Oct. 2014"Showcase of My Research on Games & AI "till the end of Oct. 2014"
Showcase of My Research on Games & AI "till the end of Oct. 2014"Mohammad Shaker
 
Modelling Human Expert Behaviour in an Unreal Tournament 2004 Bot
Modelling Human Expert Behaviour in an Unreal Tournament 2004 BotModelling Human Expert Behaviour in an Unreal Tournament 2004 Bot
Modelling Human Expert Behaviour in an Unreal Tournament 2004 BotAntonio Mora
 
Level Design Workshop - GDC China 2012
Level Design Workshop - GDC China 2012Level Design Workshop - GDC China 2012
Level Design Workshop - GDC China 2012Joel Burgess
 

Mais procurados (11)

Lecture 5 - Procedural Content Generation
Lecture 5 - Procedural Content GenerationLecture 5 - Procedural Content Generation
Lecture 5 - Procedural Content Generation
 
Game Development 2
Game Development 2Game Development 2
Game Development 2
 
Lecture 7 - Experience Management
Lecture 7 - Experience ManagementLecture 7 - Experience Management
Lecture 7 - Experience Management
 
Knowing When to Hold 'Em, When to Fold 'Em and When to Blow 'Em Up
Knowing When to Hold 'Em, When to Fold 'Em and When to Blow 'Em UpKnowing When to Hold 'Em, When to Fold 'Em and When to Blow 'Em Up
Knowing When to Hold 'Em, When to Fold 'Em and When to Blow 'Em Up
 
Procedural Content Generation
Procedural Content GenerationProcedural Content Generation
Procedural Content Generation
 
Introduction to Game Design
Introduction to Game DesignIntroduction to Game Design
Introduction to Game Design
 
Bethesda's Iterative Level Design Process for Skyrim and Fallout 3
Bethesda's Iterative Level Design Process for Skyrim and Fallout 3Bethesda's Iterative Level Design Process for Skyrim and Fallout 3
Bethesda's Iterative Level Design Process for Skyrim and Fallout 3
 
weekly AI tech talk #85 ml-agents Enabling Learned Behaviors with Reinforceme...
weekly AI tech talk #85 ml-agents Enabling Learned Behaviors with Reinforceme...weekly AI tech talk #85 ml-agents Enabling Learned Behaviors with Reinforceme...
weekly AI tech talk #85 ml-agents Enabling Learned Behaviors with Reinforceme...
 
Showcase of My Research on Games & AI "till the end of Oct. 2014"
Showcase of My Research on Games & AI "till the end of Oct. 2014"Showcase of My Research on Games & AI "till the end of Oct. 2014"
Showcase of My Research on Games & AI "till the end of Oct. 2014"
 
Modelling Human Expert Behaviour in an Unreal Tournament 2004 Bot
Modelling Human Expert Behaviour in an Unreal Tournament 2004 BotModelling Human Expert Behaviour in an Unreal Tournament 2004 Bot
Modelling Human Expert Behaviour in an Unreal Tournament 2004 Bot
 
Level Design Workshop - GDC China 2012
Level Design Workshop - GDC China 2012Level Design Workshop - GDC China 2012
Level Design Workshop - GDC China 2012
 

Semelhante a Lecture 8 - What is Game AI? Final Thoughts

SAIG Overview March 2011
SAIG Overview March 2011SAIG Overview March 2011
SAIG Overview March 2011Luke Dicken
 
Five Cliches of Online Game Development
Five Cliches of Online Game DevelopmentFive Cliches of Online Game Development
Five Cliches of Online Game Developmentiandundore
 
OGDC 2014: Architecting Games in Unity
OGDC 2014: Architecting Games in UnityOGDC 2014: Architecting Games in Unity
OGDC 2014: Architecting Games in UnityGameLandVN
 
OGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
OGDC 2014_Architecting Games in Unity_Mr. Rustum ScammellOGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
OGDC 2014_Architecting Games in Unity_Mr. Rustum Scammellogdc
 
Cross-Platform Game Engine
Cross-Platform Game EngineCross-Platform Game Engine
Cross-Platform Game EngineKiyoung Moon
 
20140228 fp and_performance
20140228 fp and_performance20140228 fp and_performance
20140228 fp and_performanceshinolajla
 
Scratching the itch, making Scratch for the Raspberry Pie
Scratching the itch, making Scratch for the Raspberry PieScratching the itch, making Scratch for the Raspberry Pie
Scratching the itch, making Scratch for the Raspberry PieESUG
 
Design for Scale / Surge 2010
Design for Scale / Surge 2010Design for Scale / Surge 2010
Design for Scale / Surge 2010Christopher Brown
 
Console Development in 15 minutes
Console Development in 15 minutesConsole Development in 15 minutes
Console Development in 15 minutesSperasoft
 
Steelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with PythonSteelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with Pythoninfodox
 
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven SystemsGo Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven SystemsJonas Bonér
 
Owning windows 8 with human interface devices
Owning windows 8 with human interface devicesOwning windows 8 with human interface devices
Owning windows 8 with human interface devicesNikhil Mittal
 
Antifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failureAntifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failureDiUS
 
Executing for Every Screen: Build, launch and sustain products for your custo...
Executing for Every Screen: Build, launch and sustain products for your custo...Executing for Every Screen: Build, launch and sustain products for your custo...
Executing for Every Screen: Build, launch and sustain products for your custo...Steven Hoober
 
Hadoop Operations: Keeping the Elephant Running Smoothly
Hadoop Operations: Keeping the Elephant Running SmoothlyHadoop Operations: Keeping the Elephant Running Smoothly
Hadoop Operations: Keeping the Elephant Running SmoothlyMichael Arnold
 
9 anti-patterns for node.js teams
9 anti-patterns for node.js teams9 anti-patterns for node.js teams
9 anti-patterns for node.js teamsJeff Harrell
 
Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)Techizzaa
 
Non equilibrium Molecular Simulations of Polymers under Flow Saving Energy th...
Non equilibrium Molecular Simulations of Polymers under Flow Saving Energy th...Non equilibrium Molecular Simulations of Polymers under Flow Saving Energy th...
Non equilibrium Molecular Simulations of Polymers under Flow Saving Energy th...ORAU
 
BDM37 - Simon Grondin - Scaling an API proxy in OCaml
BDM37 - Simon Grondin - Scaling an API proxy in OCamlBDM37 - Simon Grondin - Scaling an API proxy in OCaml
BDM37 - Simon Grondin - Scaling an API proxy in OCamlBig Data Montreal
 
Debugging multiplayer games
Debugging multiplayer gamesDebugging multiplayer games
Debugging multiplayer gamesMaciej Siniło
 

Semelhante a Lecture 8 - What is Game AI? Final Thoughts (20)

SAIG Overview March 2011
SAIG Overview March 2011SAIG Overview March 2011
SAIG Overview March 2011
 
Five Cliches of Online Game Development
Five Cliches of Online Game DevelopmentFive Cliches of Online Game Development
Five Cliches of Online Game Development
 
OGDC 2014: Architecting Games in Unity
OGDC 2014: Architecting Games in UnityOGDC 2014: Architecting Games in Unity
OGDC 2014: Architecting Games in Unity
 
OGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
OGDC 2014_Architecting Games in Unity_Mr. Rustum ScammellOGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
OGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
 
Cross-Platform Game Engine
Cross-Platform Game EngineCross-Platform Game Engine
Cross-Platform Game Engine
 
20140228 fp and_performance
20140228 fp and_performance20140228 fp and_performance
20140228 fp and_performance
 
Scratching the itch, making Scratch for the Raspberry Pie
Scratching the itch, making Scratch for the Raspberry PieScratching the itch, making Scratch for the Raspberry Pie
Scratching the itch, making Scratch for the Raspberry Pie
 
Design for Scale / Surge 2010
Design for Scale / Surge 2010Design for Scale / Surge 2010
Design for Scale / Surge 2010
 
Console Development in 15 minutes
Console Development in 15 minutesConsole Development in 15 minutes
Console Development in 15 minutes
 
Steelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with PythonSteelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with Python
 
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven SystemsGo Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
 
Owning windows 8 with human interface devices
Owning windows 8 with human interface devicesOwning windows 8 with human interface devices
Owning windows 8 with human interface devices
 
Antifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failureAntifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failure
 
Executing for Every Screen: Build, launch and sustain products for your custo...
Executing for Every Screen: Build, launch and sustain products for your custo...Executing for Every Screen: Build, launch and sustain products for your custo...
Executing for Every Screen: Build, launch and sustain products for your custo...
 
Hadoop Operations: Keeping the Elephant Running Smoothly
Hadoop Operations: Keeping the Elephant Running SmoothlyHadoop Operations: Keeping the Elephant Running Smoothly
Hadoop Operations: Keeping the Elephant Running Smoothly
 
9 anti-patterns for node.js teams
9 anti-patterns for node.js teams9 anti-patterns for node.js teams
9 anti-patterns for node.js teams
 
Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)
 
Non equilibrium Molecular Simulations of Polymers under Flow Saving Energy th...
Non equilibrium Molecular Simulations of Polymers under Flow Saving Energy th...Non equilibrium Molecular Simulations of Polymers under Flow Saving Energy th...
Non equilibrium Molecular Simulations of Polymers under Flow Saving Energy th...
 
BDM37 - Simon Grondin - Scaling an API proxy in OCaml
BDM37 - Simon Grondin - Scaling an API proxy in OCamlBDM37 - Simon Grondin - Scaling an API proxy in OCaml
BDM37 - Simon Grondin - Scaling an API proxy in OCaml
 
Debugging multiplayer games
Debugging multiplayer gamesDebugging multiplayer games
Debugging multiplayer games
 

Mais de Luke Dicken

Diversity in NPC AI
Diversity in NPC AIDiversity in NPC AI
Diversity in NPC AILuke Dicken
 
You're Not Special, Neither am I
You're Not Special, Neither am IYou're Not Special, Neither am I
You're Not Special, Neither am ILuke Dicken
 
Game Development 1 - What is a Game?
Game Development 1 - What is a Game?Game Development 1 - What is a Game?
Game Development 1 - What is a Game?Luke Dicken
 
The International Game Developers Association
The International Game Developers AssociationThe International Game Developers Association
The International Game Developers AssociationLuke Dicken
 
Lecture 3 - Decision Making
Lecture 3 - Decision MakingLecture 3 - Decision Making
Lecture 3 - Decision MakingLuke Dicken
 
Lecture 2 - Probability
Lecture 2 - ProbabilityLecture 2 - Probability
Lecture 2 - ProbabilityLuke Dicken
 
Lecture 1 - Game Theory
Lecture 1 - Game TheoryLecture 1 - Game Theory
Lecture 1 - Game TheoryLuke Dicken
 
Lecture 4 - Opponent Modelling
Lecture 4 - Opponent ModellingLecture 4 - Opponent Modelling
Lecture 4 - Opponent ModellingLuke Dicken
 
What I Done on my Holidays
What I Done on my HolidaysWhat I Done on my Holidays
What I Done on my HolidaysLuke Dicken
 
Influence Landscapes - From Spatial to Conceptual Representations
Influence Landscapes - From Spatial to Conceptual RepresentationsInfluence Landscapes - From Spatial to Conceptual Representations
Influence Landscapes - From Spatial to Conceptual RepresentationsLuke Dicken
 
The Strathclyde Poker Research Environment
The Strathclyde Poker Research EnvironmentThe Strathclyde Poker Research Environment
The Strathclyde Poker Research EnvironmentLuke Dicken
 
The Ludic Fallacy Applied to Automated Planning
The Ludic Fallacy Applied to Automated PlanningThe Ludic Fallacy Applied to Automated Planning
The Ludic Fallacy Applied to Automated PlanningLuke Dicken
 
Integrated Influence - The Six Million Dollar Man of AI
Integrated Influence - The Six Million Dollar Man of AIIntegrated Influence - The Six Million Dollar Man of AI
Integrated Influence - The Six Million Dollar Man of AILuke Dicken
 
Robust Agent Execution
Robust Agent ExecutionRobust Agent Execution
Robust Agent ExecutionLuke Dicken
 
General Game Playing
General Game PlayingGeneral Game Playing
General Game PlayingLuke Dicken
 

Mais de Luke Dicken (15)

Diversity in NPC AI
Diversity in NPC AIDiversity in NPC AI
Diversity in NPC AI
 
You're Not Special, Neither am I
You're Not Special, Neither am IYou're Not Special, Neither am I
You're Not Special, Neither am I
 
Game Development 1 - What is a Game?
Game Development 1 - What is a Game?Game Development 1 - What is a Game?
Game Development 1 - What is a Game?
 
The International Game Developers Association
The International Game Developers AssociationThe International Game Developers Association
The International Game Developers Association
 
Lecture 3 - Decision Making
Lecture 3 - Decision MakingLecture 3 - Decision Making
Lecture 3 - Decision Making
 
Lecture 2 - Probability
Lecture 2 - ProbabilityLecture 2 - Probability
Lecture 2 - Probability
 
Lecture 1 - Game Theory
Lecture 1 - Game TheoryLecture 1 - Game Theory
Lecture 1 - Game Theory
 
Lecture 4 - Opponent Modelling
Lecture 4 - Opponent ModellingLecture 4 - Opponent Modelling
Lecture 4 - Opponent Modelling
 
What I Done on my Holidays
What I Done on my HolidaysWhat I Done on my Holidays
What I Done on my Holidays
 
Influence Landscapes - From Spatial to Conceptual Representations
Influence Landscapes - From Spatial to Conceptual RepresentationsInfluence Landscapes - From Spatial to Conceptual Representations
Influence Landscapes - From Spatial to Conceptual Representations
 
The Strathclyde Poker Research Environment
The Strathclyde Poker Research EnvironmentThe Strathclyde Poker Research Environment
The Strathclyde Poker Research Environment
 
The Ludic Fallacy Applied to Automated Planning
The Ludic Fallacy Applied to Automated PlanningThe Ludic Fallacy Applied to Automated Planning
The Ludic Fallacy Applied to Automated Planning
 
Integrated Influence - The Six Million Dollar Man of AI
Integrated Influence - The Six Million Dollar Man of AIIntegrated Influence - The Six Million Dollar Man of AI
Integrated Influence - The Six Million Dollar Man of AI
 
Robust Agent Execution
Robust Agent ExecutionRobust Agent Execution
Robust Agent Execution
 
General Game Playing
General Game PlayingGeneral Game Playing
General Game Playing
 

Último

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Último (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

Lecture 8 - What is Game AI? Final Thoughts

  • 1. What is Game AI? Final Thoughts
  • 2. What is Game AI? • Game AI is not about : ‣ Beating the player ‣ Optimality ‣ “making the bad guys shoot” 2
  • 3. What is Game AI • Game AI is about : ‣ Delivering great experiences to players ‣ Building immersive environments ‣ Automating the functions of a human “Dungeon Master” 3
  • 4. Batman - Arkham Asylum 4
  • 5. Batman - Arkham Asylum • A classic example of the game AI challenge • We could coordinate the thugs, use small unit tactics etc. • Make use of existing AI techniques to make intelligent, successful thugs. • Is this the point? 5
  • 6. Batman - Arkham Asylum 6
  • 7. Batman - Arkham Asylum • The overall aim is to make a Batman “simulator”. • Make the player feel like they ARE Batman. • Recall “Losing with Style” ‣ Epic brawls ‣ Batman can generally win if he’s smart • Player is entertained and immersed in the world of Batman. 7
  • 8. The “Odd Sock Drawer” Stuff That Didn’t Fit In Anywhere Else AKA “The Brain Dump”
  • 9. Emergence • Emergence is the term for “interesting” things coming from seemingly simple rules. • Recall L-Systems from last week ‣ Basic rules : draw, turn left, turn right ‣ Complicated patterns emerged from the interaction of these rules 9
  • 10. Reynolds Steering • Three simple rules for steering ‣ Separation - avoid crowding local units ‣ Alignment - steer towards the avg heading of local units ‣ Cohesion - steer towards the avg position of local units • From these three rules we can simulate “flock” behaviour 10
  • 11. Boids • Demo - http://lukedicken.com/projects/AITest/ WebPlayer.html 11
  • 12. Cellular Automata • A CA is a grid representation • Individual cells are “off” or “on” ‣ Actually can take a range of values, but usually binary. • Iterative process to determine at a given step a cell’s state • Most famous ruleset is Conway’s Game of Life 12
  • 13. Conway’s Game of Life • Under-population : Any live cell with fewer than two live neighbours dies • Overcrowding : Any live cell with more than three live neighbours dies • Reproduction : Any dead cell with exactly three live neighbours becomes a live cell • Live cells with two or three live neighbours lives 13
  • 16. CA and the Universe • There are some people who believe that CA emergence reflects the nature of our universe. • The universe is claimed to be a Turing Machine. • Through the property of Turing Completeness any Turing Machine can replicate behaviour of another. • CAs are a Turing Machine. ‣ Some researchers claim to be discovering laws of our universe by analysis of CA systems 16
  • 17. CAs for Games • CAs are of interest in the context of Game AI • Can be used to generate “particles” ‣ Think confetti • Particle systems are used for all sorts in graphics ‣ Smoke, vapour, dust, leaves, sparkles, explosions, flames • Rather than defining a complex particle system • Use a lightweight CA definition and a start state 17
  • 18. Emergence • Emergence allows us to define complex systems simply. • Diverse behaviour can be exhibited ‣ Novel, unexpected behaviour • Loss of directorial control when AI becomes unpredictable. 18
  • 19. Traditional vs Game AI • Something I hear on a fairly regular basis is how bad AI in games is. • “It’s not intelligent” • “You could do this with <insert algorithm>” • We’ve talked at length about the different motivations of Traditional AI and Game AI 19
  • 20. Processing Time • One of the big things that is different between is the amount of CPU power available. • When we talk about traditional AI systems, that’s typically all that the computer is doing. • Our AI systems need horsepower. • Games need horsepower too. ‣ Graphics, physics, networking. ‣ 1ms of CPU time per frame - <10% of time given to AI 20
  • 21. Memory Usage • Memory is another big factor. • Consider the kind of search trees we’ve been talking about. ‣ Combinatorial explosion ‣ Tracking massive amounts of states • Memory required for non-trivial planning quickly hits multiple gigabytes. ‣ For one planning problem 21
  • 22. Debugging AI Systems • Lots of our AI systems are randomised • How can we accurately test behaviour if it relies on random chance? • We talked previously in Poker context about how to overcome randomness ‣ Many repetitions to minimise variance ‣ Find a way to rig the randomness 22
  • 23. Pseudo-Random Behaviour • We know that computers cannot generate truly random numbers. • What they actually use are complicated functions using a “seed” number to initialise them. • We can generate the same number sequence iff ‣ We know the function ‣ We know the seed 23
  • 24. Car Key • At a very basic level, this is how many cryptography techniques work. • Consider a remote car key • Lots of keys share the same frequency ‣ Need to distinguish our key/car pair • Thieves could intercept the unlock command if it was broadcast in the clear. ‣ Replay Attack 24
  • 25. Rolling Code • Get around this using a pair of pseudo-random number generators between lock and key. ‣ Synchronised by having the same seed number • Both lock and key know what the next number in the sequence is. • If a thief intercepts it, that code is now “old” ‣ Need to be able to predict what the next number is ‣ Lots of extra stuff to make this difficult/impossible 25
  • 26. Debugging AI Systems • We can use the same basic principles to ensure that when we debug an AI system, we are observing the same decisions. • Crash reports always report seed number used. • We can replicate the random number sequence that was generated before the crash ‣ Replicate the behaviour that caused the crash 26
  • 27. A Note on Footprints • Activating debug code and changing your program can alter it’s footprint when compiled. • Can lead to unintentional changes in behaviour. ‣ Debug build takes longer to execute as there are more instructions - different amounts of processor available, behaves differently 27
  • 28. Software Engineering for (Game) AI • By now you will have been told about best practices for Software Engineering. ‣ UML diagrams ‣ Waterfall method • Good for well understood tasks ‣ Write an app that does this • What if the task isn’t understood? ‣ How can we design a system on paper if it isn’t specified? 28
  • 29. Iteration, Iteration, Iteration • The way we deal with not knowing the specification in advance is to constantly test. • Rapid iteration ‣ Building systems incrementally ‣ No monolithic approach ‣ Make it do something, make it do the right thing later ‣ Iterative refinement • Testing code correctness every few lines. 29
  • 30. Reality • Continuous Integration ‣ Code being committed is going through automated tests to ensure correctness • Long build processes • Core reason a lot of AI is based on scripting ‣ No need to alter the code, no need to wait for a recompile. ‣ Script updates can be executed on the same build. 30
  • 31. Scrum • Scrum is a project management technique getting a lot of use in development teams • Growing in popularity since 2001, although dates back to 1986 • Tightly integrates a product-centric view of the development process ‣ Avoids teams working on “cool” rather than “useful” features. 31
  • 32. Roles • Product Owner - Represents the “product”, client’s perspective. Ensures that the team is providing value. • Scrum Master - In charge of ensuring smooth operation of the team. Not leader of the team. ‣ Somewhere between Mum and Fixer • Team - Developers 32
  • 33. The Product Backlog • Created by the Product Owner • Prioritised list of potential features. ‣ Priority based on value of feature and work involved • Product Owner and Team determine priority ‣ Value is set by the Product Owner ‣ Amount of work is set by the team • Items in the Product Backlog must be promoted to the Sprint Backlog before being worked on. 33
  • 34. The Sprint • Building block of Scrum • A development process consists of multiple sprints ‣ Each sprint lasts between a week and a month ‣ Firm deadline for the length of the sprints • Sprint Planning Meeting selects what items from the Product Backlog are going to be tackled. • Sprint Review Meeting analyses what has/hasn’t been accomplished at the end. Demo. 34
  • 35. The Scrum • Daily Team meeting - 15m ‣ What have you done since yesterday? ‣ What are you going to do today? ‣ Are there any obstacles right now? • Scrum of Scrums ‣ Daily summary ‣ Each team sends a delegate ‣ Allows inter-team communication and progress checking 35
  • 36. Maslow’s Hammer • “If all you have is a hammer, everything looks like a nail” - The Psychology of Science, Maslow • This plagues the AI field - especially in academia • Experts in one particular aspect ‣ Or grads who learnt about one technique/algorithm • Go on to use it as standard approach everywhere, even when it’s not at all appropriate. 36
  • 37. The Philosophy of this Module • As much as possible I’ve avoided talking about specific algorithms. • Algorithms are available in books or on Wikipedia • What I’ve tried to emphasise is approaches and application areas. • Teaching ways of thinking about Game AI ‣ Not how to write Game AI 37
  • 38. The AI Toolbox • Different techniques are suited to different jobs. • Whenever you come across a new technique, make a note of it. ‣ Add it to your toolbox • When you come across a new problem : ‣ Do you have a tool that can solve it? ‣ Is there a better one available? • These lectures hopefully give you a “starter kit”. 38
  • 39. Final Summary • Science of playing games • Building mathematical representations of players. • Generating content for games • Tailoring content to players • Managing the experience of players 39
  • 40. Source Material • Largely drawn from articles I’ve written for ‣ AIGameDev.com ‣ AltDevBlogADay.com ‣ Gamasutra.com • Other aspects based on a series of posts forthcoming for Gamasutra • Also based on conversations with / talks from the following people (and more) over the past few years 40
  • 41. Acknowledgements • Phil Carlisle (Namaste) • Alex Champandard (AIGameDev.com) • Kevin Dill (Lockheed Martin Advanced Simulation Center) • Richard Evans (Stumptown Game Machine) • Dan Kline (Electronic Arts - Maxis) • Dave Mark (Intrinsic Algorithm, Game AI Programmers Guild) • Gwaredd Mountain (Climax Studios) • Brian Schwab (Blizzard Entertainment) • Togelius and Yannakakis (ITU Copenhagen) 41
  • 42. Finally • Strathclyde AI and Games research group ‣ Talk to us about postgrad opportunities • International Game Developers Association ‣ IGDA Scotland ‣ IGDA Scholarships • Organising some form of game-development based program here at Strathclyde ‣ Keep an eye on your email in the next week or two 42