SlideShare una empresa de Scribd logo
1 de 23
Game Theory and Simulation in Ruby Presenter: Matt Pattison Based on Masters thesis:  ‘ An Investigation of Retaliation and Reconciliation Conventions in the Repeated Prisoner’s Dilemma’
I will talk tonight about the Ruby simulation code I wrote as part of my Masters thesis ,[object Object],[object Object],[object Object]
But first, you need to understand some  Game Theory ,[object Object],[object Object]
Game theory is not just about ‘games’, but ‘games’ are a good place to start Gonzales is playing  Federer, who has come in to the net, and hit the ball to Gonzalez’s forehand. Should Gonzalez return the ball down the line with his powerful forehand, whip the ball cross-court or risk a lob.  Federer vs. Gonzalez
How often should Gonzalez go cross court (CC), down the line (DL), or lob (Lob)? First we need to look at the probabilites of success for Gonzalez:
Then we can determine the correct proportions from a best response graph
Game theory is not just about ‘games’, but…
Game theory is not just about ‘games’, but… Player balance in Starcraft: It is important that no strategies are dominant or dominated. Therefore available strategies for different players usually have payoffs that resemble Rock-Scissors-Paper
Archers-Cavalry-Pikemen Rock-Paper-Scissors equivalent game-balancing Actual dominance relationships from ‘Age of Kings’
The battle of the local pizza joints Should each pizza joint price High, Medium, or Low?
The battle of the pizza joints cont... Pricing Low is a dominated strategy What we are left with is…
The Prisoner’s dilemma Using Greed (G) and Fear (F) factors  * Greed factor represents benefit from exploiting opponent.  * Fear factor represents disbenefit from cooperating and being    exploited
Zero sum vs non-zero sum ,[object Object],[object Object]
Nash equilibrium Strategies that are best responses to each other
Win-win or no deal ,[object Object],[object Object]
Grid-based prisoner’s dilemma simulation ,[object Object]
The repeated prisoner’s dilemma See the example…
Mistakes ,[object Object]
Strategy state machines See the code… Example of DSL
R1P2
Finite Markov Chain strategy pairs
R1P2 vs R1P2
Questions?

Más contenido relacionado

Similar a Game theory and simulation in Ruby

Lecture OverviewSolving the prisoner’s dilemmaInstrumental r.docx
Lecture OverviewSolving the prisoner’s dilemmaInstrumental r.docxLecture OverviewSolving the prisoner’s dilemmaInstrumental r.docx
Lecture OverviewSolving the prisoner’s dilemmaInstrumental r.docx
SHIVA101531
 
Game theory application
Game theory applicationGame theory application
Game theory application
shakebaumar
 
Feb 26th RPG PowerPoint for IMS 211
Feb 26th RPG PowerPoint for IMS 211Feb 26th RPG PowerPoint for IMS 211
Feb 26th RPG PowerPoint for IMS 211
Miami University
 

Similar a Game theory and simulation in Ruby (20)

Game balance part 2
Game balance part 2Game balance part 2
Game balance part 2
 
Game theory
Game theoryGame theory
Game theory
 
Lecture OverviewSolving the prisoner’s dilemmaInstrumental r.docx
Lecture OverviewSolving the prisoner’s dilemmaInstrumental r.docxLecture OverviewSolving the prisoner’s dilemmaInstrumental r.docx
Lecture OverviewSolving the prisoner’s dilemmaInstrumental r.docx
 
Designing balance (takeaway version)
Designing balance (takeaway version)Designing balance (takeaway version)
Designing balance (takeaway version)
 
Fatal
FatalFatal
Fatal
 
Game Balance 3: Interesting Strategies
Game Balance 3: Interesting StrategiesGame Balance 3: Interesting Strategies
Game Balance 3: Interesting Strategies
 
Game theory application
Game theory applicationGame theory application
Game theory application
 
1532 0545-2001-02-01-0050
1532 0545-2001-02-01-00501532 0545-2001-02-01-0050
1532 0545-2001-02-01-0050
 
gt_2007
gt_2007gt_2007
gt_2007
 
LAFS Game Design 10 - Fun and Accessability
LAFS Game Design 10 - Fun and AccessabilityLAFS Game Design 10 - Fun and Accessability
LAFS Game Design 10 - Fun and Accessability
 
Game theory
Game theoryGame theory
Game theory
 
GameTheory_popular.ppt
GameTheory_popular.pptGameTheory_popular.ppt
GameTheory_popular.ppt
 
GameTheory_popular.ppt in the operations reearch
GameTheory_popular.ppt in the operations reearchGameTheory_popular.ppt in the operations reearch
GameTheory_popular.ppt in the operations reearch
 
Phantom Doctrine: a Design Post-Mortem
Phantom Doctrine: a Design Post-MortemPhantom Doctrine: a Design Post-Mortem
Phantom Doctrine: a Design Post-Mortem
 
Game Theory Economics
Game Theory EconomicsGame Theory Economics
Game Theory Economics
 
Feb 26th RPG PowerPoint for IMS 211
Feb 26th RPG PowerPoint for IMS 211Feb 26th RPG PowerPoint for IMS 211
Feb 26th RPG PowerPoint for IMS 211
 
Task 2 research
Task 2 researchTask 2 research
Task 2 research
 
Learning Through Gaming
Learning Through GamingLearning Through Gaming
Learning Through Gaming
 
Superhuman AI for multiplayer poker
Superhuman AI for multiplayer pokerSuperhuman AI for multiplayer poker
Superhuman AI for multiplayer poker
 
Game Theory_1.pptx
Game Theory_1.pptxGame Theory_1.pptx
Game Theory_1.pptx
 

Último

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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+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@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
+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...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
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
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Game theory and simulation in Ruby

  • 1. Game Theory and Simulation in Ruby Presenter: Matt Pattison Based on Masters thesis: ‘ An Investigation of Retaliation and Reconciliation Conventions in the Repeated Prisoner’s Dilemma’
  • 2.
  • 3.
  • 4. Game theory is not just about ‘games’, but ‘games’ are a good place to start Gonzales is playing Federer, who has come in to the net, and hit the ball to Gonzalez’s forehand. Should Gonzalez return the ball down the line with his powerful forehand, whip the ball cross-court or risk a lob. Federer vs. Gonzalez
  • 5. How often should Gonzalez go cross court (CC), down the line (DL), or lob (Lob)? First we need to look at the probabilites of success for Gonzalez:
  • 6. Then we can determine the correct proportions from a best response graph
  • 7. Game theory is not just about ‘games’, but…
  • 8. Game theory is not just about ‘games’, but… Player balance in Starcraft: It is important that no strategies are dominant or dominated. Therefore available strategies for different players usually have payoffs that resemble Rock-Scissors-Paper
  • 9. Archers-Cavalry-Pikemen Rock-Paper-Scissors equivalent game-balancing Actual dominance relationships from ‘Age of Kings’
  • 10. The battle of the local pizza joints Should each pizza joint price High, Medium, or Low?
  • 11. The battle of the pizza joints cont... Pricing Low is a dominated strategy What we are left with is…
  • 12. The Prisoner’s dilemma Using Greed (G) and Fear (F) factors * Greed factor represents benefit from exploiting opponent. * Fear factor represents disbenefit from cooperating and being exploited
  • 13.
  • 14. Nash equilibrium Strategies that are best responses to each other
  • 15.
  • 16.
  • 17. The repeated prisoner’s dilemma See the example…
  • 18.
  • 19. Strategy state machines See the code… Example of DSL
  • 20. R1P2
  • 21. Finite Markov Chain strategy pairs