Giter Club home page Giter Club logo

temur_rhinos_simulation's Introduction

Temur Rhinos Monte Carlo Simulation

Overview

This project aims to simulate a game of the "Temur Rhinos" Magic: The Gathering (MTG) deck archetype and analyze the probability of having a certain number of lands in play by turn 3. The simulation takes into account the number of lands and cyclers in the starting deck and runs multiple game simulations to gather statistical data. The probability analysis is performed through heatmaps, which visually represent the results.

Dependencies

  • Just
  • Python 3 (version 3.11.4 recommended)

Setup

To install all dependencies, run the following command:

just setup

Commands

  • just rhinos: Run the temur_rhinos.py script and save the output to a CSV file.
  • just graph: Generate a heatmap for the CSV file generated by just rhinos.
  • just graph-rhinos: Combines just rhinos and just graph into one command.

Simulation Parameters

In the temur_rhinos.py script, you can customize the following parameters for the simulation:

# Number of cyclers and lands to try in the simulation
N_CYCLERS_TO_TRY = [0, 1, 2, 3, 4]
N_LANDS_TO_TRY = [26, 25, 24, 23, 22, 21, 20, 19, 18]

# Number of games to simulate
N_GAMES = 10000

# Number of turns to simulate (e.g., turn 3)
N_TURNS = 3

You can adjust these parameters according to your needs to explore different scenarios.

Limitations/Disclaimers

  • I have not factored in the impact of including Ketria Triome (a tapland) in the number of lands. Plan to do this later.

  • I have not factored in the impact of using Fire//Ice to draw an extra card on turn two to help hit land drops. Plan to do this later.

  • I have not considered the impact of Gemstone caverns Luck shenanigans in any of these scenarios.

  • Currently designed to only provide accurate stats until turn 3. (see notes for can_play_cascade in src/temur_rhinos.py)

How it Works

  1. The temur_rhinos.py script simulates a game by creating a deck based on the specified number of cyclers and lands.
  2. The simulation runs for the specified number of games (e.g., 10,000) and records the game state after each turn (up to turn 3).
  3. The simulation logs are saved to a CSV file named game_log.csv.

Example Heatmaps

Below are example heatmaps generated by the just graph-rhinos command.

Heatmap On the Draw

Heatmap On the Draw

Heatmap On the Play

Heatmap On the Play

These heatmaps visually represent the probabilities of having a certain number of lands in play by turn 3, considering various combinations of starting deck composition.

Feel free to explore different deck compositions and simulation parameters to analyze the impact on the game outcomes.

License

This project is licensed under the MIT License - see the LICENSE file for details.


temur_rhinos_simulation's People

Contributors

timothestes avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.