Implementation of a game strategy simulator for the card game Magic: The Gathering

Thesis title: Implementácia simulátora herných stratégií v kartovej hre Magic: The Gathering
Author: Lelkes, Viktor
Thesis type: Bachelor thesis
Supervisor: Chrobok, Viktor
Opponents: Čížková, Šárka
Thesis language: Slovensky
Abstract:
Bakalárska práca sa venuje návrhu a implementácii simulátora kartovej hry Magic: The Gathering vo formáte Modern. Simulátor umožňuje kvantitatívne porovnanie herných stratégií v podmienkach, ktoré sa v reálnom turnajovom prostredí dosahujú len ťažko. Predmetom skúmania sú štyri reprezentatívne archetypy formátu Modern: Burn ako agresívna stratégia s priamym poškodením, Stompy s rýchlymi veľkými tvormi, Humans postavený na synergii ľudských tvorov a Control založený na odstraňovaní hrozieb. Simulátor je napísaný v programovacom jazyku Python a modeluje kompletný priebeh hry. Implementuje fázu mulliganu podľa londýnskych pravidiel, bojovú fázu, schopnosti kariet a interakcie medzi hráčmi. Hromadná simulácia má formu round-robin turnaja, v ktorom sa každý pár archetypov stretne v tisícoch zápasov za rovnakých podmienok. Výsledky sú vyhodnocované štatistickými metódami. Práca využíva binomické rozdelenie, Centrálnu limitnú vetu a Wilsonove intervaly spoľahlivosti pre overenie presnosti odhadovaných úspešností. Štatistická signifikancia každého matchupu je overená z-testom. Okrem celkového porovnania úspešnosti práca skúma vplyv prvého ťahu na výsledok zápasu, závislosť výsledku od dĺžky hry a dopad mulliganu na šance hráča. Sensitivity analýza odhaduje prínos jednotlivých kariet v každom archetype tým, že meria pokles win rate po ich odobratí z balíčka. Výsledky sú prezentované formou grafov a štatistických tabuliek.
Keywords: herné stratégie; Python; sensitivity analýza; Magic: The Gathering; simulátor; formát Modern; win rate; binomické rozdelenie; Wilsonov interval spoľahlivosti; archetyp
Thesis title: Implementácia simulátora herných stratégií v kartovej hre Magic: The Gathering
Author: Lelkes, Viktor
Thesis type: Bakalářská práce
Supervisor: Chrobok, Viktor
Opponents: Čížková, Šárka
Thesis language: Slovensky
Abstract:
Bakalářská práce se věnuje návrhu a implementaci simulátoru karetní hry Magic: The Gathering ve formátu Modern. Simulátor umožňuje kvantitativní porovnání herních strategií v podmínkách, kterých lze v reálném turnajovém prostředí dosáhnout jen stěží. Předmětem zkoumání jsou čtyři reprezentativní archetypy formátu Modern: Burn jako agresivní strategie s přímým poškozením, Stompy s rychlými velkými bytostmi, Humans postavený na synergii lidských bytostí a Control založený na odstraňování hrozeb. Simulátor je napsán v programovacím jazyce Python a modeluje kompletní průběh hry. Implementuje fázi mulliganu podle londýnských pravidel, bojovou fázi, schopnosti karet a interakce mezi hráči. Hromadná simulace má formu round-robin turnaje, v němž se každý pár archetypů střetne v tisících zápasů za stejných podmínek. Výsledky jsou vyhodnocovány statistickými metodami. Práce využívá binomické rozdělení, Centrální limitní větu a Wilsonovy intervaly spolehlivosti pro ověření přesnosti odhadovaných úspěšností. Statistická signifikance každého matchup-u je ověřena z-testem. Kromě celkového porovnání úspěšnosti práce zkoumá vliv prvního tahu na výsledek zápasu, závislost výsledku na délce hry a dopad mulliganu na šance hráče. Sensitivity analýza odhaduje přínos jednotlivých karet v každém archetypu tím, že měří pokles win rate po jejich odebrání z balíčku. Výsledky jsou prezentovány formou grafů a statistických tabulek.
Keywords: Magic: The Gathering; simulátor; herní strategie; formát Modern; Python; win rate; binomické rozdělení; Wilsonův interval spolehlivosti; sensitivity analýza; archetyp
Thesis title: Implementation of a game strategy simulator for the card game Magic: The Gathering
Author: Lelkes, Viktor
Thesis type: Bachelor thesis
Supervisor: Chrobok, Viktor
Opponents: Čížková, Šárka
Thesis language: Slovensky
Abstract:
This bachelor's thesis focuses on the design and implementation of a simulator for the card game Magic: The Gathering in the Modern format. The simulator enables a quantitative comparison of game strategies under conditions that are difficult to achieve in a real tournament environment. The subject of the research consists of four representative archetypes of the Modern format: Burn as an aggressive strategy featuring direct damage, Stompy with fast, large creatures, Humans built on the synergy of human creatures, and Control based on threat removal. The simulator is written in the Python programming language and models the complete course of the game. It implements the mulligan phase according to the London rules, the combat phase, card abilities, and interactions between players. The large-scale simulation takes the form of a round-robin tournament, in which every pair of archetypes faces each other in thousands of matches under identical conditions. The results are evaluated using statistical methods. The thesis utilizes binomial distribution, the Central Limit Theorem, and Wilson confidence intervals to verify the accuracy of the estimated win rates. The statistical significance of each matchup is verified by a z-test. In addition to the overall performance comparison, the thesis examines the influence of the first turn on the match result, the dependence of the result on game length, and the impact of the mulligan on the player's chances. Sensitivity analysis estimates the contribution of individual cards within each archetype by measuring the decrease in win rate after their removal from the deck. The results are presented in the form of graphs and statistical tables.
Keywords: simulator; game strategies; Modern format; Python; win rate; Magic: The Gathering; binomial distribution; Wilson confidence interval; sensitivity analysis; archetype

Information about study

Study programme: Aplikovaná informatika
Type of study programme: Bakalářský studijní program
Assigned degree: Bc.
Institutions assigning academic degree: Vysoká škola ekonomická v Praze
Faculty: Faculty of Informatics and Statistics
Department: Department of Econometrics

Information on submission and defense

Date of assignment: 7. 1. 2026
Date of submission: 11. 5. 2026
Date of defense: 22. 6. 2026
Identifier in the InSIS system: https://insis.vse.cz/zp/95074/podrobnosti

Files for download

    Last update: