Skip to content
A tool that applies genetic algorithms to building Magic: The Gathering decks.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Massive reorganization of everything into something much neater Feb 23, 2019

Using this repo

  1. Install build tools (if necessary!)

    xcode-select --install
    sudo easy_install pip
    brew install conan
    conan remote add vthiery

pip install virtualenv virtualenv --python=python3 venv source venv/bin/activate ```

  1. Download MtG card data

  2. Put your collection of cards as a JSON file in data/collection.json as an object with card names as keys, and the quantity you own as the values. For example, if you own four Walking Balistas:

      "Walking Ballista": 4

    Be sure to use canonical card names, as reported on Gatherer or Scryfall. Split cards and two-sided cards will be formatted like "Driven // Despair" (Notice the spaces around the double-slashes).

    If you use MTG Manager on iOS, there is a script in data_builders/collection/ that will convert collections exported from MTG Manager to the required format

  3. Build genetic algorithm

    cd ../deck_builder
    conan install .
    cmake .
    cmake --build .
  4. Run the genetic algorithm

     ./bin/magique ../data collection.json
  5. Deactivate virtual environment



You can’t perform that action at this time.