Giter VIP home page Giter VIP logo

mtg_draft_maindeck's Introduction

MTG Arena Draft Maindeck Assistant

Machine learning model to determine what cards to maindeck from a draft. Built using a neural network and uses maindeck data from decks that were able to win at least 3 games. Hits roughly 80% accuracy based on testing validation data. This repository is currently setup to train and infer using the STX draft data from 17Lands.com and might be updated for future sets.

Dependency Versions

These are not requirements just the versions I used.

tensorflow==2.5.0
keras==2.5.0
numpy==1.19.5

Pretrained model

The repository includes a pretrained model labeled PretrainedModel.h5. Just run the inference python file and input the path to use.

Building the model

The training and validation dataset is "STX Premier Draft Game Data" located at https://www.17lands.com/public_datasets and is needed if you wish to build the model yourself.

  1. Unzip the dataset set from the tar.gz file linked above, place it in the same directory as the data_extraction.ipynb file.
  2. Launch a Jupyter Notebook instance and run all the cells in data_extraction.ipynb.
  3. It will preprocess and extract the relevant data from the dataset and generate a bunch of .npy files in the /data directory.
  4. Run all the cells in modelling.ipynb in Jupyter. It will use all the data extracted and processed earlier to generate a model called MainDeckModel.h5. The training will automatically stop after 5 epochs without any improvement to the MAE of the validation data.

Running the model

  1. Obtain a draft from MTG Arena by completing an STX draft and exporting the drafted cards into a text file.
  2. Run the inference.py file and input the draft export path and the trained model path.
  3. You will then get an output of the ~22-25 cards to maindeck which does not include basic lands.

mtg_draft_maindeck's People

Contributors

rokahakor avatar

Watchers

 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.