SlideShare une entreprise Scribd logo
1  sur  42
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Tendances (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
 

Similaire à Lecture 8 - What is Game AI? Final Thoughts

OGDC 2014: Architecting Games in Unity
OGDC 2014: Architecting Games in UnityOGDC 2014: Architecting Games in Unity
OGDC 2014: Architecting Games in Unity
GameLandVN
 
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
ogdc
 
20140228 fp and_performance
20140228 fp and_performance20140228 fp and_performance
20140228 fp and_performance
shinolajla
 
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
Big Data Montreal
 

Similaire à 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
 

Plus de Luke Dicken

Plus 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
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

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