Skip to main content

Blog

Learn About Our Meetup

5000+ Members

MEETUPS

LEARN, CONNECT, SHARE

Join our meetup, learn, connect, share, and get to know your Toronto AI community. 

JOB POSTINGS

INDEED POSTINGS

Browse through the latest deep learning, ai, machine learning postings from Indeed for the GTA.

CONTACT

CONNECT WITH US

Are you looking to sponsor space, be a speaker, or volunteer, feel free to give us a shout.

[P] Make your own AI-generated Magic: The Gathering cards with GPT-2

https://minimaxir.com/apps/gpt2-mtg/

Give a card name, card type, and/or card mana cost to a finetuned GPT-2, and get a custom card image + card text!

I’ve also created a text dump of *thousands* of said cards: https://github.com/minimaxir/mtg-gpt-2-cloud-run/tree/master/generated_card_dumps

Even with only a little training and data augmentation, GPT-2 117M overfits on Magic cards, which leads to some interesting remixes of existing cards, and some cards with interesting value. Some examples:

Krovikan Vampire

Krovikan Scuttle

Vona

Zephyr Return

And a few cards where the card name is chosen:

United States of America

Facebook

Twitter

Mark Rosewater

The code for the text generation API is open-sourced here, and the code for the image generation API (which uses an ugly wine hack) is open sourced here.

Other helpful notes:

  • To share the generated card image, you can Save As the generated card locally, and to use it elsewhere, rename it and add a .jpg file extension.
  • The network can recite existing card names and rules text of existing cards, but rarely to the same card. The network often makes interesting color shift decisions with changes to CMC/Rarity.
  • In terms of color accuracy, color pie is mostly correct. Creature types and mechanics often follow the appropriate color identity. P/T, mana cost, and rarity are balanced.
  • The card formatting issues are due to the underlying mtgencode/MSE implementations and are not easy to fix (most notable with Planeswalker cards).

Let me know what you think! 🙂

submitted by /u/minimaxir
[link] [comments]