Code Monkey home page Code Monkey logo

magique's Introduction

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

magique's People

Contributors

degoodmanwilson avatar luinlulu avatar

Stargazers

 avatar Lautaro Tejerina avatar Jason Dukleth avatar Hans-Dieter Buddenberg Blamey avatar Jason Blevins avatar Artur avatar Chris avatar M. Garcia - Queer1 | Shwoognation HQ a division of Q1 Industries avatar  avatar Derek Willingham avatar Alexander Schneider avatar  avatar Raj avatar Jon Wire avatar Matthew Rutkowski avatar William Becher avatar Ben Volk avatar Luke Shannon-Hill avatar Dustin Dahl avatar Masanori Ogino avatar Hudson Afonso avatar  avatar  avatar Saamahn Mahjouri avatar  avatar Aliakbar Rashidi avatar Alan Casanova avatar Pierre DUFOUR avatar Mark Saroufim avatar ᦔꪖ꠸ꪀ ᥇ꪶꪮᦔꪮ᥅ꪀ ᛕ꠸ꪑ avatar Roy avatar Denis Denisov avatar TD Mackey avatar Jt Whissel avatar Andres Lopez avatar Eric Ladouceur avatar David Schovanec avatar Francois avatar

Watchers

James Cloos avatar William Becher avatar M. Garcia - Queer1 | Shwoognation HQ a division of Q1 Industries avatar Ben Volk avatar  avatar  avatar  avatar

magique's Issues

conanfile install failing

ERROR: Version range '~=0.1' from requirement 'ga3/[~=0.1]@DEGoodmanWilson/testing' required by 'conanfile.txt' could not be resolved in local cache

There may be a step missing in the README, but conan is failing to find ga3/[~=0.1]@DEGoodmanWilson/testing. Any help getting this working would be much appreciated!

Inline documentation

The fitness function in particular is a bit of a mess, and not well documented.

Deck legality checks

The legality of decks is not being fully checked. Currently, the only check is that there should not be more than 4 of any card.

  • Card bannings
  • Card legality (e.g. no rares in Pauper, nothing from Beta in Modern, &c.)
  • Card mulitplicity (e.g. only 1 of for Commander and Brawl)

Better CLI options

  • Options for mana curve
  • Options for card type distribution
  • Options for weighting various factors' importance (e.g., should we pay closer attention to creature power? Or ignore creatures entirely? Does the color distribution matter really?)
  • Options for deck format (Standard, Commander, etc.)

not actually an issue just new

sorry to leave this here i wasnt sure how else to contact you, i read your paper on hackernoon and had to find a way. I've been working on a similar project and was hoping you could take a look at some point, my model takes mtg arenas output files and will hopefully start playing them against eachother to find optimization then run the lists against my available cards to find the best option, however if we can take that a step further and have it build the lists itself it could be a constantly mining method to finding the most fun games of magic possible. As a 3 times mcq player adding more fun to a game i play so often is a huge deal so i began this as a training project for string slicing as part of my new job and my boss is letting me run with it. please feel free to email me at [email protected]. hope this reaches you and youre well!

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.