Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 1.45 KB

README.md

File metadata and controls

58 lines (42 loc) · 1.45 KB

Using this repo

  1. Install build tools (if necessary!)

    xcode-select --install
    sudo easy_install pip
    brew install conan
    conan remote add vthiery https://api.bintray.com/conan/vthiery/conan-packages

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

  1. Download MtG card data

    ./run.sh
  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/mtg_manager_csv_to_json.py 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

    deactivate

Thanks