RyanSaxe / mtg

State of the Art Magic: the Gathering Draft and DeckBuilder AI.
Apache License 2.0
143 stars 39 forks source link
data-science deep-learning machine-learning python

mtg

State of the art Magic: the Gathering Draft and DeckBuilder AI.

achievements

mythicbot

This repository contains an algorithm for automated drafting and building for Magic: the Gathering. I used this algorithm to achieve the highest rank (Mythic) on Magic Arena. I did so in 23 drafts, with a 66% win-rate, which is comparable to how I perform on my normal account in which I do not use any algorithms. The highest rank within Mythic I have hit so far is #27. As far as I know, this is the first time anybody has acheived results of this caliber using an AI in Magic: the Gathering.

architecture

Below is a general description of the transformer architecture for the Draft AI in order to make it easier to grok than reading through code.

transformer

installation

NOTE: I am not currently providing a pretrained instance of the Draft AI or DeckBulder AI in this repository. That means you cannot simply install this codebase, launch Magic Arena, and use the bot like I do. If you would like to do that, you need to use this code to train it yourself following these instructions. A non-cleaned version of the UI I use that interacts with Magic Arena can be found here, and it will eventually be cleaned and added to this repository under mtg/app/.

documentation

Find any documentation on usage of the different sections in the README of their corresponding folders.

TODO