open-mtg icon indicating copy to clipboard operation
open-mtg copied to clipboard

A python implementation of Magic: The Gathering with an AI that plays it using Monte Carlo move evaluation.

Results 8 open-mtg issues
Sort by recently updated
recently updated
newest added

Hey I found this project today after watching https://www.youtube.com/watch?v=Xq4T44EvPvo Hope you reignite the passion for it, would be very cool to have an open source simulator!

Ties are something worth looking at in some cases and do not seem to be accounted for.

https://github.com/hlynurd/open-mtg/blob/8ad261f255859e90a93c446551911278eeec3cae/mcts.py#L74 ``` # the mcts rollouts don't randomize cards that have been seen with Index indexed_cards_in_deck = [] # print("mcts print: %s" % (state.players)) if len(state.players[k].deck) > 0: while len(state.players[k].deck)...

Outside the project scope, but would probably save a lot of time and effort. connect to xmage api's (http://xmage.de/) then do computation off the interface.

There's currently only a naive Monte-Carlo Search implemented and benchmarked. A whole zoo of search methods are still to be explored, for example: http://static.ijcai.org/proceedings-2017/0772.pdf https://ieeexplore.ieee.org/abstract/document/6218176/ We would benefit from more...

The code is hardly documented, decide upon and implement documentation for the functions and classes: https://www.python.org/dev/peps/pep-0257/ http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html https://stackoverflow.com/questions/24555327/how-can-i-produce-a-numpy-like-documentation

Currently, the few implemented spells are enumerated in "make_move" and "get_legal_moves". Returning legal moves associated with the spell and handling the spell effect should be handled by the card objects...