SlideShare ist ein Scribd-Unternehmen logo
1 von 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?

Weitere ähnliche Inhalte

Ähnlich wie 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.docxSHIVA101531
 
Designing balance (takeaway version)
Designing balance (takeaway version)Designing balance (takeaway version)
Designing balance (takeaway version)Kacper Szymczak
 
Game Balance 3: Interesting Strategies
Game Balance 3: Interesting StrategiesGame Balance 3: Interesting Strategies
Game Balance 3: Interesting StrategiesMarc Miquel
 
Game theory application
Game theory applicationGame theory application
Game theory applicationshakebaumar
 
1532 0545-2001-02-01-0050
1532 0545-2001-02-01-00501532 0545-2001-02-01-0050
1532 0545-2001-02-01-0050Rana Ahmad
 
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 AccessabilityDavid Mullich
 
Game theory
Game theoryGame theory
Game theorygtush24
 
GameTheory_popular.ppt
GameTheory_popular.pptGameTheory_popular.ppt
GameTheory_popular.pptAMRITRANJAN30
 
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 reearchssuser96912f1
 
Phantom Doctrine: a Design Post-Mortem
Phantom Doctrine: a Design Post-MortemPhantom Doctrine: a Design Post-Mortem
Phantom Doctrine: a Design Post-MortemKacper Szymczak
 
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 211Miami University
 
Superhuman AI for multiplayer poker
Superhuman AI for multiplayer pokerSuperhuman AI for multiplayer poker
Superhuman AI for multiplayer pokerPeerasak C.
 
Game Theory_1.pptx
Game Theory_1.pptxGame Theory_1.pptx
Game Theory_1.pptxssuser8c2631
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
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
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
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
 

Kürzlich hochgeladen (20)

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
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
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
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!
 

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