SlideShare uma empresa Scribd logo
1 de 39
Baixar para ler offline
52.426 - 4th Year AI
     Game AI

           Luke Dicken
 Strathclyde AI and Games Group
Background

    • This is the 1st lecture in an 8 lecture series that
     constitutes the 2nd half of the course.
    • Target audience is a 4th year class that has had
     exposure to AI previously
       ‣ 3rd year - Agent-based systems
       ‣ 4th year (1st half) - Algorithms and Search, bin-packing
    • Although it is a Game AI module, the course itself is
     a general AI class, many non-games students.
2
The Prisoner's Dilemma




    • Imagine you and another person are arrested
    • Keep silent? Or betray the other person?
    • They have the same choice...




3
Prisoners Dilemma



               Confess       Silent


              P1 - 5yrs    P1 - Free
    Confess
              P2 - 5yrs    P2 - 20yrs

              P1 - 20yrs    P1 - 1yr
     Silent
              P2 - Free     P2 - 1yr

4
Questions



    • Does it help to know the other person?
    • Is it better to be ignorant of your opponent than incorrectly
     predict their actions?
    • Do you want to minimise total time in jail, or your time in
     jail?



5
The Odds/Evens Game




    • Player 1 picks up some number of marbles.
    • Player 2 guesses if amount is odd or even.




6
The Odds/Evens Game

            Odd       Even



           P1 - -1   P1 - +1
    Odd
           P2 - +1   P2 - -1


           P1 - +1   P1 - -1
    Even
           P2 - -1   P2 - +1


7
Questions



    • Player 1 played odd last time, what should Player 2 guess this
     time?
    • Can Player 1 vary their strategy such that Player 2 can never
     guess it?




8
Intro to Game Theory
Game Theory 101



     • What we've just seen are examples "games"
     • Anytime we are talking about competing with other people
      for a reward, we can call it a "game"
     • Game Theory is a branch of mathematics that formally
      defines how best to play these games.



10
1 Player Games


     • Relatively trivial :


               A              B     C      D

                5             4     9      4




11
2 Player Games



     • Things get more complicated when there’s a second player.
     • How can you predict what that person will do?
     • Can you ensure that you will do well regardless of the other
      player?
     • This is the essence of Game Theory.



12
A Game's "Sum"


     • Games can be "zero-sum" or "non-zero sum"
     • If a game is zero-sum then the two players are directly
      competing - for one to win X, the other must lose X
     • Contrast this a game where the two players are not
      completely opposed.
        ‣ E.g. Prisoner's Dilemma
     • Zero-sum games allow us to make assumptions about how
      players will act but they are not the general case.

13
2 Player Zero-Sum Games


     • Although it's a special case, this comes up very very often in
      the real world.
        ‣ Elections, gambling, corporate competition
     • Previously shown payoff for both players - in zero-sum this
      isn’t necessary
        ‣ The more Player 1 wins, the more Player 2 loses


14
Equilibrium Points


     • A property of some games is that there is a single “solution”
     • If Player 1 changes strategy from their Equilibrium Strategy,
      they can only do worse (assuming Player 2 does not change)
     • Likewise Player 2 cannot change their strategy unilaterally
      and do any better either.
     • For both players, this is the best they can hope to achieve


15
The “Value” of a Game



     • The “Value” of a game is “the rationally expected outcome”
     • For games that have equilibrium points, the Value is the
      reward of the equilibrium strategies.
        ‣ Player 1 can’t do worse than this value.
        ‣ Player 2 can prevent Player 1 from doing better.



16
Political Example


     • Two candidates are deciding what position to take
      on an issue.
     • There are three options open to each of them
       ‣ Support X
       ‣ Support Y
       ‣ Duck the issue


17
Political Example

                 X      Y        Dodge


      X


      Y


     Dodge



18
Political Example

                  X          Y       Dodge


       X         45%        50%       40%


       Y         60%        55%       50%


     Dodge       45%        55%       40%


     Payoff Matrix wrt Player 1’s vote share
19
Political Example



     • Whatever Player 1 does, Player 2 does best if they
      dodge the issue.
     • Whatever Player 2 does, Player 1 does best if they
      support Y.



20
Dominant Strategies

     • Sometimes, a potential strategy choice is just bad.
     • Recall the 1-player game - one strategy was ALWAYS better.
     • This can happen in 2-player games too.
     • More formally, Strategy A dominates Strategy B iff for every
      move the opponent might choose, A always gives a better
      result.
     • Dominated strategies can safely be ignored then.
        ‣ A rational opponent would never play them, so you
          needn’t consider situations where they would.
21
Domination

          i     ii    iii


     A    19    0     1


     B    11    9     3


     C    23    7     -3



22
Domination

                          x          ii        iii


               A          x          0         1


                B         x          9         3


               C          x          7         -3

                        iii dominates i
     (remember: from Player 2’s perspective, lower = better)
23
Domination

              x        ii        iii


     x        x        x         x


     B        x        9         3


     x        x        x         x

     Now, B dominates both A and C
       Player 1 should choose B.
24
Domination

                         x          x          iii


              x          x          x          x


              B          x          x          3


              x          x          x          x

     As Player 1 will choose B, Player 2 should choose iii
            Note that this is an equilibrium point
25
Non-Zero Sum Games


     • Recall the Prisoner’s Dilemma problem.
     • In this game, the two players were not completely
      opposed
       ‣ Cooperation as well as competition
     • This means that a lot of the assumptions that we’ve
      made about what the players want to achieve don’t
      hold
26
Prisoners Dilemma



                Confess       Silent


               P1 - 5yrs    P1 - Free
     Confess
               P2 - 5yrs    P2 - 20yrs

               P1 - 20yrs    P1 - 1yr
      Silent
               P2 - Free     P2 - 1yr

27
Some More Examples




     • Which would you prefer, a guaranteed £1 or an even chance
      at £3?




28
Some More Examples




     • Suppose you lose concert tickets that cost you £40 to buy.
      Would you replace them for another £40 or do something
      else that night?




29
Some More Examples




     • If 1% of people your age and health die in a given year, would
      you be prepared to pay £1,000 for £100,000 of life
      insurance?




30
Some More Examples




     • You go to the store to buy a new video game costing £40.
      You find you've lost some money, also totalling £40, but you
      still have enough left to buy the game - do you?




31
Some More Examples




     • Which would you prefer, a guaranteed £1,000,000 or an even
      chance at £3,000,000?




32
Some More Examples




     • If 0.1% of people your age and health die in a given year,
      would you be prepared to pay £10 for £10,000 of life
      insurance?




33
Something else is
  happening...
Utility Theory


     • "Utility" is an evaluation of how much use a particular result
      is.
     • It allows us to compare things "through the eyes of the
      player" rather than just mathematically.
        ‣ £1 and £3 are relatively interchangeable, and £1 is not significant.
        ‣ £1,000,000 is significant, and £3,000,000 is not three times as
            significant.


35
Prisoners Dilemma
     Do we want an optimal solution for one player?
                    Or for both?

                        Confess       Silent


                        P1 - 5yrs   P1 - Free
             Confess
                        P2 - 5yrs   P2 - 20yrs

                       P1 - 20yrs    P1 - 1yr
              Silent
                       P2 - Free     P2 - 1yr

36
Irrational Actions


     • Utility functions for humans is beyond the scope of
      this session.
     • Behavioural Economics
       ‣ “Predictably Irrational” Dan Ariely
     • Be aware that players may not be rational.
       ‣ And we can exploit this to beat them even more :D


37
Summary



     • Fundamentals of Game Theory
     • Rational play for 2 Player Zero Sum games
     • Difference of a Non-Zero Sum game
     • Introduction to irrational play



38
Next Lecture



     • Fun With Probability!
     • How Spam Filters Work (Sort of)
     • Mixed Strategies in Games
     • ...And More




39

Mais conteúdo relacionado

Mais procurados

Artificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe gameArtificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe gamemanika kumari
 
Game theory
Game theoryGame theory
Game theorygtush24
 
Introduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of OptimalityIntroduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of OptimalityBhavin Darji
 
Android application - Tic Tac Toe
Android application - Tic Tac ToeAndroid application - Tic Tac Toe
Android application - Tic Tac ToeSarthak Srivastava
 
Minmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slidesMinmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slidesSamiaAziz4
 
Game theory and its applications
Game theory and its applicationsGame theory and its applications
Game theory and its applicationsEranga Weerasekara
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchTekendra Nath Yogi
 
Two persons zero sum game
Two persons zero sum gameTwo persons zero sum game
Two persons zero sum gameYasir Hashmi
 

Mais procurados (20)

Tic tac toe simple ai game
Tic tac toe simple ai gameTic tac toe simple ai game
Tic tac toe simple ai game
 
Artificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe gameArtificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe game
 
Game theory
Game theoryGame theory
Game theory
 
Game theory
Game theoryGame theory
Game theory
 
Game theory
Game theoryGame theory
Game theory
 
Game theory ppt
Game theory pptGame theory ppt
Game theory ppt
 
tic-tac-toe: Game playing
 tic-tac-toe: Game playing tic-tac-toe: Game playing
tic-tac-toe: Game playing
 
Game theory
Game theoryGame theory
Game theory
 
Game playing in AI
Game playing in AIGame playing in AI
Game playing in AI
 
Backtracking
Backtracking  Backtracking
Backtracking
 
Introduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of OptimalityIntroduction to Dynamic Programming, Principle of Optimality
Introduction to Dynamic Programming, Principle of Optimality
 
Android application - Tic Tac Toe
Android application - Tic Tac ToeAndroid application - Tic Tac Toe
Android application - Tic Tac Toe
 
Game theory
Game theoryGame theory
Game theory
 
Minmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slidesMinmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slides
 
Min-Max algorithm
Min-Max algorithmMin-Max algorithm
Min-Max algorithm
 
Game theory and its applications
Game theory and its applicationsGame theory and its applications
Game theory and its applications
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
 
PAC Learning
PAC LearningPAC Learning
PAC Learning
 
AI: Learning in AI
AI: Learning in AI AI: Learning in AI
AI: Learning in AI
 
Two persons zero sum game
Two persons zero sum gameTwo persons zero sum game
Two persons zero sum game
 

Destaque (7)

Game theory
Game theoryGame theory
Game theory
 
Game theory
Game theoryGame theory
Game theory
 
Game Development 2
Game Development 2Game Development 2
Game Development 2
 
Game theory
Game theory Game theory
Game theory
 
Game theory
Game theoryGame theory
Game theory
 
Game theory
Game theoryGame theory
Game theory
 
Game Theory
Game TheoryGame Theory
Game Theory
 

Semelhante a Lecture 1 - Game Theory

Lecture 2 - Probability
Lecture 2 - ProbabilityLecture 2 - Probability
Lecture 2 - ProbabilityLuke Dicken
 
Topic 3- Cooperation and Collective Action
Topic 3- Cooperation and Collective ActionTopic 3- Cooperation and Collective Action
Topic 3- Cooperation and Collective ActionJohn Bradford
 
Oligopoly and Game Theory
Oligopoly and Game TheoryOligopoly and Game Theory
Oligopoly and Game Theorytutor2u
 
Game theory application
Game theory applicationGame theory application
Game theory applicationshakebaumar
 
Types of Games type of games Types of Games type of games.pptx
Types of Games type of games Types of Games type of games.pptxTypes of Games type of games Types of Games type of games.pptx
Types of Games type of games Types of Games type of games.pptxtdoijod8
 
Applications of game theory on event management
Applications of game theory on event management Applications of game theory on event management
Applications of game theory on event management Sameer Dhurat
 
Game theory (Operation Research)
Game theory (Operation Research)Game theory (Operation Research)
Game theory (Operation Research)kashif ayaz
 
Bradford games and collective action 9 28-14
Bradford games and collective action 9 28-14Bradford games and collective action 9 28-14
Bradford games and collective action 9 28-14John Bradford
 
Game theory and strategy (PCA16, PCATX)
Game theory and strategy (PCA16, PCATX)Game theory and strategy (PCA16, PCATX)
Game theory and strategy (PCA16, PCATX)Nir Soffer
 
2013.05 Games We Play: Payoffs & Chaos Monkeys
2013.05 Games We Play: Payoffs & Chaos Monkeys2013.05 Games We Play: Payoffs & Chaos Monkeys
2013.05 Games We Play: Payoffs & Chaos MonkeysAllison Miller
 

Semelhante a Lecture 1 - Game Theory (20)

Lecture 2 - Probability
Lecture 2 - ProbabilityLecture 2 - Probability
Lecture 2 - Probability
 
Lect01 slides
Lect01 slidesLect01 slides
Lect01 slides
 
Topic 3- Cooperation and Collective Action
Topic 3- Cooperation and Collective ActionTopic 3- Cooperation and Collective Action
Topic 3- Cooperation and Collective Action
 
game theory
game theorygame theory
game theory
 
Oligopoly and Game Theory
Oligopoly and Game TheoryOligopoly and Game Theory
Oligopoly and Game Theory
 
Science of negotiation
Science of negotiationScience of negotiation
Science of negotiation
 
Lect02 slides
Lect02 slidesLect02 slides
Lect02 slides
 
Game theory application
Game theory applicationGame theory application
Game theory application
 
Types of Games type of games Types of Games type of games.pptx
Types of Games type of games Types of Games type of games.pptxTypes of Games type of games Types of Games type of games.pptx
Types of Games type of games Types of Games type of games.pptx
 
Lect04 slides
Lect04 slidesLect04 slides
Lect04 slides
 
Applications of game theory on event management
Applications of game theory on event management Applications of game theory on event management
Applications of game theory on event management
 
Game theory (Operation Research)
Game theory (Operation Research)Game theory (Operation Research)
Game theory (Operation Research)
 
Bradford games and collective action 9 28-14
Bradford games and collective action 9 28-14Bradford games and collective action 9 28-14
Bradford games and collective action 9 28-14
 
Game theory 1
Game theory 1Game theory 1
Game theory 1
 
lec3.pdf
lec3.pdflec3.pdf
lec3.pdf
 
Game theory and strategy (PCA16, PCATX)
Game theory and strategy (PCA16, PCATX)Game theory and strategy (PCA16, PCATX)
Game theory and strategy (PCA16, PCATX)
 
2013.05 Games We Play: Payoffs & Chaos Monkeys
2013.05 Games We Play: Payoffs & Chaos Monkeys2013.05 Games We Play: Payoffs & Chaos Monkeys
2013.05 Games We Play: Payoffs & Chaos Monkeys
 
Game theory
Game theoryGame theory
Game theory
 
Game theory
Game theoryGame theory
Game theory
 
Game theory
Game theoryGame theory
Game theory
 

Mais de Luke Dicken

Advances in Game AI
Advances in Game AIAdvances in Game AI
Advances in Game AILuke 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
 
Procedural Processes - Lessons Learnt from Automated Content Generation in "E...
Procedural Processes - Lessons Learnt from Automated Content Generation in "E...Procedural Processes - Lessons Learnt from Automated Content Generation in "E...
Procedural Processes - Lessons Learnt from Automated Content Generation in "E...Luke Dicken
 
Game AI For the Masses
Game AI For the MassesGame AI For the Masses
Game AI For the MassesLuke Dicken
 
The Next Generation of Game Planners
The Next Generation of Game PlannersThe Next Generation of Game Planners
The Next Generation of Game PlannersLuke Dicken
 
Game AI 101 - NPCs and Agents and Algorithms... Oh My!
Game AI 101 - NPCs and Agents and Algorithms... Oh My!Game AI 101 - NPCs and Agents and Algorithms... Oh My!
Game AI 101 - NPCs and Agents and Algorithms... Oh My!Luke 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 7 - Experience Management
Lecture 7 - Experience ManagementLecture 7 - Experience Management
Lecture 7 - Experience ManagementLuke Dicken
 
Lecture 6 - Procedural Content and Player Models
Lecture 6 - Procedural Content and Player ModelsLecture 6 - Procedural Content and Player Models
Lecture 6 - Procedural Content and Player ModelsLuke Dicken
 
Lecture 5 - Procedural Content Generation
Lecture 5 - Procedural Content GenerationLecture 5 - Procedural Content Generation
Lecture 5 - Procedural Content GenerationLuke Dicken
 
Lecture 8 - What is Game AI? Final Thoughts
Lecture 8 - What is Game AI? Final ThoughtsLecture 8 - What is Game AI? Final Thoughts
Lecture 8 - What is Game AI? Final ThoughtsLuke Dicken
 
Lecture 3 - Decision Making
Lecture 3 - Decision MakingLecture 3 - Decision Making
Lecture 3 - Decision MakingLuke 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
 
SAIG Overview March 2011
SAIG Overview March 2011SAIG Overview March 2011
SAIG Overview March 2011Luke 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
 

Mais de Luke Dicken (20)

Advances in Game AI
Advances in Game AIAdvances in Game AI
Advances in Game AI
 
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
 
Procedural Processes - Lessons Learnt from Automated Content Generation in "E...
Procedural Processes - Lessons Learnt from Automated Content Generation in "E...Procedural Processes - Lessons Learnt from Automated Content Generation in "E...
Procedural Processes - Lessons Learnt from Automated Content Generation in "E...
 
Game AI For the Masses
Game AI For the MassesGame AI For the Masses
Game AI For the Masses
 
The Next Generation of Game Planners
The Next Generation of Game PlannersThe Next Generation of Game Planners
The Next Generation of Game Planners
 
Game AI 101 - NPCs and Agents and Algorithms... Oh My!
Game AI 101 - NPCs and Agents and Algorithms... Oh My!Game AI 101 - NPCs and Agents and Algorithms... Oh My!
Game AI 101 - NPCs and Agents and Algorithms... Oh My!
 
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 7 - Experience Management
Lecture 7 - Experience ManagementLecture 7 - Experience Management
Lecture 7 - Experience Management
 
Lecture 6 - Procedural Content and Player Models
Lecture 6 - Procedural Content and Player ModelsLecture 6 - Procedural Content and Player Models
Lecture 6 - Procedural Content and Player Models
 
Lecture 5 - Procedural Content Generation
Lecture 5 - Procedural Content GenerationLecture 5 - Procedural Content Generation
Lecture 5 - Procedural Content Generation
 
Lecture 8 - What is Game AI? Final Thoughts
Lecture 8 - What is Game AI? Final ThoughtsLecture 8 - What is Game AI? Final Thoughts
Lecture 8 - What is Game AI? Final Thoughts
 
Lecture 3 - Decision Making
Lecture 3 - Decision MakingLecture 3 - Decision Making
Lecture 3 - Decision Making
 
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
 
SAIG Overview March 2011
SAIG Overview March 2011SAIG Overview March 2011
SAIG Overview March 2011
 
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
 

Último

ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastUXDXConf
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCzechDreamin
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 

Último (20)

ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 

Lecture 1 - Game Theory

  • 1. 52.426 - 4th Year AI Game AI Luke Dicken Strathclyde AI and Games Group
  • 2. Background • This is the 1st lecture in an 8 lecture series that constitutes the 2nd half of the course. • Target audience is a 4th year class that has had exposure to AI previously ‣ 3rd year - Agent-based systems ‣ 4th year (1st half) - Algorithms and Search, bin-packing • Although it is a Game AI module, the course itself is a general AI class, many non-games students. 2
  • 3. The Prisoner's Dilemma • Imagine you and another person are arrested • Keep silent? Or betray the other person? • They have the same choice... 3
  • 4. Prisoners Dilemma Confess Silent P1 - 5yrs P1 - Free Confess P2 - 5yrs P2 - 20yrs P1 - 20yrs P1 - 1yr Silent P2 - Free P2 - 1yr 4
  • 5. Questions • Does it help to know the other person? • Is it better to be ignorant of your opponent than incorrectly predict their actions? • Do you want to minimise total time in jail, or your time in jail? 5
  • 6. The Odds/Evens Game • Player 1 picks up some number of marbles. • Player 2 guesses if amount is odd or even. 6
  • 7. The Odds/Evens Game Odd Even P1 - -1 P1 - +1 Odd P2 - +1 P2 - -1 P1 - +1 P1 - -1 Even P2 - -1 P2 - +1 7
  • 8. Questions • Player 1 played odd last time, what should Player 2 guess this time? • Can Player 1 vary their strategy such that Player 2 can never guess it? 8
  • 9. Intro to Game Theory
  • 10. Game Theory 101 • What we've just seen are examples "games" • Anytime we are talking about competing with other people for a reward, we can call it a "game" • Game Theory is a branch of mathematics that formally defines how best to play these games. 10
  • 11. 1 Player Games • Relatively trivial : A B C D 5 4 9 4 11
  • 12. 2 Player Games • Things get more complicated when there’s a second player. • How can you predict what that person will do? • Can you ensure that you will do well regardless of the other player? • This is the essence of Game Theory. 12
  • 13. A Game's "Sum" • Games can be "zero-sum" or "non-zero sum" • If a game is zero-sum then the two players are directly competing - for one to win X, the other must lose X • Contrast this a game where the two players are not completely opposed. ‣ E.g. Prisoner's Dilemma • Zero-sum games allow us to make assumptions about how players will act but they are not the general case. 13
  • 14. 2 Player Zero-Sum Games • Although it's a special case, this comes up very very often in the real world. ‣ Elections, gambling, corporate competition • Previously shown payoff for both players - in zero-sum this isn’t necessary ‣ The more Player 1 wins, the more Player 2 loses 14
  • 15. Equilibrium Points • A property of some games is that there is a single “solution” • If Player 1 changes strategy from their Equilibrium Strategy, they can only do worse (assuming Player 2 does not change) • Likewise Player 2 cannot change their strategy unilaterally and do any better either. • For both players, this is the best they can hope to achieve 15
  • 16. The “Value” of a Game • The “Value” of a game is “the rationally expected outcome” • For games that have equilibrium points, the Value is the reward of the equilibrium strategies. ‣ Player 1 can’t do worse than this value. ‣ Player 2 can prevent Player 1 from doing better. 16
  • 17. Political Example • Two candidates are deciding what position to take on an issue. • There are three options open to each of them ‣ Support X ‣ Support Y ‣ Duck the issue 17
  • 18. Political Example X Y Dodge X Y Dodge 18
  • 19. Political Example X Y Dodge X 45% 50% 40% Y 60% 55% 50% Dodge 45% 55% 40% Payoff Matrix wrt Player 1’s vote share 19
  • 20. Political Example • Whatever Player 1 does, Player 2 does best if they dodge the issue. • Whatever Player 2 does, Player 1 does best if they support Y. 20
  • 21. Dominant Strategies • Sometimes, a potential strategy choice is just bad. • Recall the 1-player game - one strategy was ALWAYS better. • This can happen in 2-player games too. • More formally, Strategy A dominates Strategy B iff for every move the opponent might choose, A always gives a better result. • Dominated strategies can safely be ignored then. ‣ A rational opponent would never play them, so you needn’t consider situations where they would. 21
  • 22. Domination i ii iii A 19 0 1 B 11 9 3 C 23 7 -3 22
  • 23. Domination x ii iii A x 0 1 B x 9 3 C x 7 -3 iii dominates i (remember: from Player 2’s perspective, lower = better) 23
  • 24. Domination x ii iii x x x x B x 9 3 x x x x Now, B dominates both A and C Player 1 should choose B. 24
  • 25. Domination x x iii x x x x B x x 3 x x x x As Player 1 will choose B, Player 2 should choose iii Note that this is an equilibrium point 25
  • 26. Non-Zero Sum Games • Recall the Prisoner’s Dilemma problem. • In this game, the two players were not completely opposed ‣ Cooperation as well as competition • This means that a lot of the assumptions that we’ve made about what the players want to achieve don’t hold 26
  • 27. Prisoners Dilemma Confess Silent P1 - 5yrs P1 - Free Confess P2 - 5yrs P2 - 20yrs P1 - 20yrs P1 - 1yr Silent P2 - Free P2 - 1yr 27
  • 28. Some More Examples • Which would you prefer, a guaranteed £1 or an even chance at £3? 28
  • 29. Some More Examples • Suppose you lose concert tickets that cost you £40 to buy. Would you replace them for another £40 or do something else that night? 29
  • 30. Some More Examples • If 1% of people your age and health die in a given year, would you be prepared to pay £1,000 for £100,000 of life insurance? 30
  • 31. Some More Examples • You go to the store to buy a new video game costing £40. You find you've lost some money, also totalling £40, but you still have enough left to buy the game - do you? 31
  • 32. Some More Examples • Which would you prefer, a guaranteed £1,000,000 or an even chance at £3,000,000? 32
  • 33. Some More Examples • If 0.1% of people your age and health die in a given year, would you be prepared to pay £10 for £10,000 of life insurance? 33
  • 34. Something else is happening...
  • 35. Utility Theory • "Utility" is an evaluation of how much use a particular result is. • It allows us to compare things "through the eyes of the player" rather than just mathematically. ‣ £1 and £3 are relatively interchangeable, and £1 is not significant. ‣ £1,000,000 is significant, and £3,000,000 is not three times as significant. 35
  • 36. Prisoners Dilemma Do we want an optimal solution for one player? Or for both? Confess Silent P1 - 5yrs P1 - Free Confess P2 - 5yrs P2 - 20yrs P1 - 20yrs P1 - 1yr Silent P2 - Free P2 - 1yr 36
  • 37. Irrational Actions • Utility functions for humans is beyond the scope of this session. • Behavioural Economics ‣ “Predictably Irrational” Dan Ariely • Be aware that players may not be rational. ‣ And we can exploit this to beat them even more :D 37
  • 38. Summary • Fundamentals of Game Theory • Rational play for 2 Player Zero Sum games • Difference of a Non-Zero Sum game • Introduction to irrational play 38
  • 39. Next Lecture • Fun With Probability! • How Spam Filters Work (Sort of) • Mixed Strategies in Games • ...And More 39