Course 4

COURSE 4 · SIMULATION, AI & DATA PRACTICE

Contents

Every tutorial in the course, topic by topic. Within a topic the tutorials are listed alphabetically.

← Back to Course 4 — Simulation, AI & Data Practice

Topic 1 · Simulations

Monte Carlo, agent-based models, stochastic simulations, RL agents, tournaments. Topic page →

Title Description
Agent-based modeling for game theory in R Build agent-based models where heterogeneous agents play games on networks, exploring emergent cooperation through update rules, spatial dynamics, and comparison with analytical equilibrium predictions.
Agent-based simulation of market dynamics — price discovery in a continuous double auction Build an agent-based model of a continuous double auction with zero-intelligence, trend-following, and fundamentalist traders, simulate price discovery and convergence to competitive equilibrium, and visualize how agent composition affects market efficiency and volatility.
Cellular automata and spatial game theory Implement spatial games on lattice grids where agents play the Prisoner’s Dilemma with neighbors, exploring strategy invasion dynamics, cluster formation, and the Nowak-May spatial chaos phenomenon.
Monte Carlo methods for equilibrium computation Use Monte Carlo simulation in R to approximate Nash equilibria, estimate equilibrium payoffs under uncertainty, and validate analytical solutions through large-sample simulation experiments.
Replicator Dynamics Simulation for Three-Strategy Games Large-scale replicator dynamics simulation for Rock-Paper-Scissors and other three-strategy games, comparing deterministic and stochastic dynamics across population sizes.
Spatial Prisoner’s Dilemma on a lattice — Nowak & May 1992 Replicate the seminal Nowak & May (1992) spatial Prisoner’s Dilemma on a 2D lattice in R, showing how spatial structure sustains cooperation through cluster formation.
No matching items

Topic 2 · ML and Game Theory

AlphaZero, CFR, multi-agent RL, GANs, adversarial robustness. Topic page →

Title Description
Adversarial robustness as a game Adversarial machine learning formulated as a two-player zero-sum game between a Defender (classifier) and an Attacker who perturbs inputs: minimax optimisation, adversarial training, and the effect on decision boundaries demonstrated with a 2D classification task.
Deep reinforcement learning for strategic games Implement simple deep RL agents from scratch in R that learn game strategies through self-play, comparing learned policies with analytical Nash equilibria.
Fictitious play and convergence Implement Brown’s fictitious play algorithm for 2x2 and 3x3 games, demonstrating convergence in zero-sum and potential games and the classic non-convergence cycling in Shapley’s counterexample.
GANs as a game-theoretic training process Analyse generative adversarial networks through the lens of two-player zero-sum games, implementing a simple 1D GAN from scratch in R to study minimax formulation, training dynamics, mode collapse, and convergence conditions.
Multi-agent reinforcement learning in matrix games Implement independent Q-learning agents that learn to play 2x2 matrix games, analyse convergence behaviour across game classes, and investigate when learning dynamics converge (or fail to converge) to Nash equilibria.
No-regret learning in games: from multiplicative weights to equilibrium Implement the Multiplicative Weights Update algorithm and show that when all players use no-regret learning, the time-averaged strategy profile converges to a coarse correlated equilibrium.
No matching items

Topic 3 · AI/ML Foundations

From perceptrons to transformers — history, theory, and R implementations. Topic page →

Title Description
Automated Mechanism Design for Optimal Auctions Training a data-driven auction mechanism using gradient-free optimisation in pure R — learning payment rules from bidder profiles, enforcing incentive compatibility and individual rationality, and benchmarking against Myerson’s optimal auction.
From Perceptron to deep learning — a historical R implementation Trace the evolution of neural networks from Rosenblatt’s 1958 Perceptron through the Minsky-Papert critique to backpropagation and modern deep learning, implementing key milestones in R.
Generative adversarial networks as minimax games Frame GANs as two-player zero-sum games in R, implement a simple GAN training loop for 1D data, visualise the generator-discriminator dynamics, and connect the equilibrium to Nash equilibrium theory.
Multi-armed bandits and the exploration-exploitation trade-off Implementation and analysis of bandit algorithms including epsilon-greedy, UCB1, and Thompson sampling, framed as single-agent games against nature with regret analysis, Bayesian updating, and interactive performance comparisons.
SHAP Values as Shapley Values — Cooperative Game Theory Meets Explainable AI Demonstrate that SHAP (SHapley Additive exPlanations) is a direct application of the Shapley value from cooperative game theory, computing exact Shapley values for a 4-feature prediction model by enumerating all coalitions and verifying the efficiency, symmetry, dummy, and additivity axioms in R.
No matching items

Topic 4 · Public APIs and Datasets

World Bank, ACLED, NOAA, arXiv, Lichess — live data for game-theoretic analysis. Topic page →

Title Description
Development Economics as Game Theory with World Bank Data Modelling international development as strategic interaction — aid allocation auctions, trade as repeated prisoner’s dilemma, and technology transfer as signalling games, using simulated indicators inspired by World Bank data.
FRED economic data for game-theoretic calibration Access Federal Reserve FRED data via the fredr API or direct CSV download to calibrate game-theoretic models with real-world economic parameters such as interest rates, GDP growth, and manufacturing output.
Game Theory Environments for Reinforcement Learning in R Build OpenAI Gym-inspired game theory environments in pure R using R6 classes with reset(), step(), and render() methods. Implement Q-learning agents that learn Nash equilibrium strategies in Prisoner’s Dilemma and Hawk-Dove games.
Kaggle competitions as strategic interactions Analyze Kaggle competitions through a game-theoretic lens, modeling competitor strategies, Nash equilibria of submission timing, and strategic model selection under competition rules.
World Bank WDI — economic indicators for game-theoretic analysis Access the World Bank’s World Development Indicators via the WDI R package, explore GDP, trade openness, and military expenditure data relevant to international game-theoretic models.
World trade data for strategic analysis Analyse international trade flows as strategic interactions using simulated trade network data, gravity model estimation, trade war scenarios, tariff equilibria, and welfare effects of trade agreements.
No matching items

Topic 5 · Real-World Data Applications

Empirical game theory with public historical data — trade, conflict, climate, health. Topic page →

Title Description
Airbnb host pricing as a strategic game Model Airbnb host pricing as a local competition game with spatial competition on a network, price undercutting dynamics, differentiation strategies, and equilibrium pricing with heterogeneous listings.
Penalty kicks as a minimax game — testing mixed-strategy equilibrium with football data Model penalty kicks as a zero-sum game between kicker and goalkeeper, compute minimax mixed strategies from realistic scoring data, and test equilibrium predictions against observed professional football frequencies.
Spectrum Auction Analysis: Revenue, Efficiency, and the Exposure Problem Simulate and analyse multi-round ascending spectrum auction data inspired by FCC designs, computing winning prices, revenue efficiency, VCG benchmarks, bidder surplus, and diagnosing the exposure problem with complementary valuations.
The Cuban Missile Crisis as a signaling game Model the 1962 Cuban Missile Crisis as a game-theoretic signaling game in R, analyzing Kennedy’s and Khrushchev’s strategic choices through incomplete information, credibility, and escalation dynamics.
The arms race as iterated Prisoner’s Dilemma — a Cold War analysis Model the US-Soviet nuclear arms race as an iterated Prisoner’s Dilemma in R, simulate strategy profiles including MAD, compare with stylised historical spending patterns, and connect to the folk theorem.
Uber surge pricing as a dynamic game Model ride-sharing surge pricing as a multi-player game between platform, drivers, and riders, simulating demand-supply dynamics, driver repositioning strategies, price equilibria, and welfare analysis.
No matching items

Topic 6 · Visualization & Communication

Publication-ready ggplot2, plotly, game trees, network graphs, dashboards. Topic page →

Title Description
Advanced ggplot2 Annotation Techniques for Game Theory Figures Master publication-quality game theory diagrams with Nash equilibrium labels, best-response arrows, payoff region shading, and mathematical annotations using ggplot2.
Building Shiny Apps for Interactive Game Theory Exploration Complete Shiny app code for a 2x2 game solver, Cournot duopoly simulator, and evolutionary dynamics visualiser, with static ggplot2 recreations for the tutorial.
Interactive dashboards for game theory with flexdashboard Build interactive dashboards to explore game-theoretic models using flexdashboard, combining reactive inputs for payoff parameters with real-time equilibrium computation and multiple coordinated visualizations.
Interactive game theory dashboards with plotly Build advanced interactive visualisations for game theory using plotly in R: animated replicator dynamics, hover-enabled payoff matrices, linked strategy-payoff views, and 3D expected-payoff surfaces over the mixed-strategy simplex.
Network visualization for games with igraph Visualize game-theoretic interaction structures using igraph in R, including best-response networks, Nash equilibrium connectivity, and centrality analysis of strategic players.
Publication-ready ggplot2 figures with theme_publication() Build a complete publication-ready ggplot2 theme from scratch, demonstrating the Okabe-Ito colorblind-safe palette, dual PDF/PNG export, and consistent styling across all figure types used in this site.
No matching items

Topic 7 · Reproducibility & Open Science

Quarto, renv, targets, Docker, pre-registration, data sharing. Topic page →

Title Description
Docker and renv for Reproducible Game Theory Environments Create fully reproducible computational environments for game theory research using Docker containers and renv package management, with reproducibility audit functions and environment comparison workflows.
Docker containers for reproducible game theory analysis Use Docker to create reproducible computational environments for game theory research, covering Dockerfile construction, R package management with renv, reproducibility workflows, and sharing analysis containers.
Literate programming for game theory research Best practices for reproducible game theory analysis using Quarto and R Markdown, covering document structure, parameterized reports, code-figure integration, and version control workflows for research projects.
Preregistration and Pre-Analysis Plans for Game Theory Experiments How to create structured pre-analysis plans for game theory experiments, demonstrating that researcher degrees of freedom can flip conclusions about cooperation rates.
Quarto parameterized reports for game theory Use Quarto’s params feature to create reusable game theory analyses that render multiple game variants — Prisoner’s Dilemma, Battle of the Sexes, Chicken — from a single parameterized template.
Reproducible game theory research — a Quarto + renv workflow Set up a fully reproducible game theory research project using renv for dependency management, Quarto for literate programming, and version control best practices for simulation-heavy analyses.
No matching items

Topic 8 · R Package Development

Package structure, roxygen2, testthat, pkgdown, CRAN submission. Topic page →

Title Description
Accelerating Game Solvers with Rcpp and Optimised R Profiling game-theoretic computations in R, implementing support enumeration and fictitious play, presenting Rcpp C++ code for acceleration, and benchmarking pure-R optimisation strategies for performance-critical solvers.
Building a game theory R package from scratch Walk through every step of creating a minimal R package that includes a nash_2x2() solver for 2x2 normal-form games, complete with roxygen2 documentation, testthat unit tests, and a devtools-powered workflow.
Designing S4 Classes for Game Theory Objects in R Build a formal S4 class hierarchy for game theory in R with NormalFormGame, Strategy, and Equilibrium classes, including validity checks, show/summary methods, and Nash equilibrium solving via support enumeration.
Testing game theory code with testthat Best practices for testing game-theoretic computations using testthat, including property-based testing of Nash equilibria, dominance checking, payoff validation, and test-driven development for game solvers.
Unit testing game theory solvers in R Build robust unit tests for game-theoretic computations using testthat, covering Nash equilibrium verification, numerical tolerance, degenerate games, and property-based testing.
Writing vignettes for game theory R packages Best practices for creating package vignettes that demonstrate game-theoretic computations, from structure and examples to testing and CRAN submission.
No matching items
Back to top