[HN Gopher] Show HN: AI generated Magic The Gathering cards
___________________________________________________________________
Show HN: AI generated Magic The Gathering cards
Author : mostelato
Score : 138 points
Date : 2022-05-17 16:00 UTC (7 hours ago)
(HTM) web link (www.urzas.ai)
(TXT) w3m dump (www.urzas.ai)
| JRKrause wrote:
| There is a popular discord (PlayEDH) where people play MTG over
| webcam against one another. Due to the nature of MTG it's
| important that the deck each player is wielding be properly
| balanced in power level against each opponent. (For those
| unfamiliar, it's possible to construct highly efficient, and
| expensive, MTG decks that trigger game-winning infinite combos
| within 1-4 turns. There's a continuous scale of deck
| effectiveness from this point). These power levels are pre-
| checked by volunteers of this discord.
|
| I had the idea of aggregating all decks + their graded power
| levels and training a prediction network capable of this task.
| The side effect being it could also tell you which cards in your
| deck could be changed to increase it's predicted power.
|
| I ended up abandoning the project, largely due to the painful
| nature of parsing the discord logs. This reminds me of that
| project, primarily due to needing to generate a
| meaningful/compressed embedding of the cards prior to training
| the deck-level network. Anyways, nice work!
| wyldfire wrote:
| I created a (hopelessly incomplete) model of a MtG game and
| tried to use it to measure deck mana balance dynamically
| instead of statically. It was such a fun project but a ton of
| work and eventually I lost interest. I may resurrect it
| someday.
|
| I had really grand visions of using it and machine learning
| (reinforcement learning) to have it pick its own decks.
|
| https://news.ycombinator.com/item?id=31078151#31079186
| moron4hire wrote:
| Pretty sure doing that would require solving the Halting
| Problem.
| gabereiser wrote:
| >"For those unfamiliar, it's possible to construct highly
| efficient, and expensive, MTG decks that trigger game-winning
| infinite combos within 1-4 turns. There's a continuous scale of
| deck effectiveness from this point"
|
| You been to FNM too? /s
|
| The cool thing about this project is that, from what I could
| generate, these could be legitimate cards. 2/2 blue flying. 3/4
| zombie. 2/6 red giant. This is actually really cool. I'd love
| to see an AI generated green red aggro deck from this just to
| see how it would play.
| rhn_mk1 wrote:
| 4G "Put +1/+1 counter on creature" sorcery. Each part is
| plausible, but the combination unappealing :)
| binarymax wrote:
| This is the reason I gave up on MTG in the 90s. I was a broke
| teen and it was clear that tournaments were won by the biggest
| investors in the cards. So I went back to chess.
| wyldfire wrote:
| IMO the game has been designed to fix those balance problems.
| There's various subsets of cards that are legal in tournament
| play and I think only "Legacy" includes all of the original
| cards. I used to occasionally attend new set release weekends
| and play some sealed duels or some 2HG with a buddy. It's a
| good time - you get a box with a few boosters and some time
| to craft your deck.
| virtue3 wrote:
| IMHO draft tournaments for "friday night magic" if that's
| still a thing were significantly better and more fun cuz of
| this.
| aerovistae wrote:
| Just wondering - why play over webcam instead of using
| cockatrice or untap.in with supplementary voice chat?
| armchairhacker wrote:
| I wonder if you could adopt AlphaZero to this. Something like:
|
| - Train a model using MCTS to play MtG games. The model takes
| an MtG game state and estimates the "value" (how likely current
| player will win) and "policy" (ideal move for current player)
|
| - Each "game" has 2 phases: drafting cards to create a deck,
| and then playing the actual deck. So the model learns to both a
| create deck and play its deck well
|
| - After training, you input a state where both players have
| "drafted" their decks, right before the actual gameplay. The
| output "value" is the power of Player 1's deck relative to
| Player 2: ideally you want this to be as close to 0 as
| possible.
|
| As a bonus you also get a model capable of actually playing
| MtG.
|
| One nuance is that the "value" are not a complete ordering:
| comparing the values, you could get a situation where deck A >
| deck B > deck C > deck A. Honestly this is probably a benefit
| because it forces the players to use "skill" vs choosing the
| right deck for the right opponent.
| feoren wrote:
| I don't feel like this is a good application of predictive
| networks, but maybe I'm wrong. Tiny changes in wording of a
| card can make or break an exploitable synergy. You can say
| "tigers basically look like this, ish" to an image recognizer,
| but you can't just say "decks that look kinda like this are
| super strong; decks that look kinda like that are super weak".
| I'd think the best approach here would be to have an agent just
| play the deck against other decks a million times with an
| evolving strategy. I know if you say the term "genetic
| algorithm" nowadays you get laughed at and branded as an old-
| fashioned ignoramus who doesn't understand _real_ AI, but
| sometimes the answer is to get off the bandwagon.
| thebean11 wrote:
| Magic the Gathering cards have pretty standard and
| predictable wording and keywords. Not sure it could
| understand everything, but there would be easy patterns that
| apply to hundreds or thousands of cards.
| karpierz wrote:
| I don't think GP is saying we'd have difficulty encoding
| the cards. I think they're saying that deck performance is
| very sensitive to minor changes, and dependent on a lot of
| interactions between sets of cards.
|
| To add to that point, decks can be good or bad based on the
| ecosystem (meta) they're playing in. A deck that aims to
| rush you down might be great in a meta where players expect
| slow decks, but terrible in a meta where many decks have
| means of healing themselves.
| thebean11 wrote:
| EDH less so though due to the bigger deck size and 1 copy
| per card limitation. This means you end up with bigger
| groups of cards with common synergies vs specific sets of
| cards you need to draw in regular 60-card.
| vgel wrote:
| Fun fact, the cards are standard enough that for MTG Arena,
| they actually parse them with feature grammars instead of
| neural networks.
| thebean11 wrote:
| Oh wow really? I figured they had a domain specific
| language to program the card interactions. Pretty cool
| they can parse the text directly.
| _sh4dow_ wrote:
| moralestapia wrote:
| Nice! It would be interesting to play a game with a deck full of
| cards from this.
| mostelato wrote:
| We are experimenting with a deck printing API! We printed a
| couple of decks and played with them - it was really delightful
| and fun!
| HelloNurse wrote:
| Illustrations are impressive, but text seems very fragile. I
| generated in sequence from names: Ice Lake
| Land - Islanders T: add U or R Tiger Lake
| Land Tiger Lake enters the battlefield tapped T: add
| U or R Alder Lake Land Alder Lake enters
| the battlefield tapped T: add U or R Cannon
| Lake Land Cannon Lake enters the battlefield tapped
| T: U or R
|
| "Rocket Lake" is completely wrong: 1R Two-
| Headed Dead Instant Rocket Lake deals 1 damage to
| target creature Comet Lake Land T: add 1
| 1,T, sacrifice Comet Lake: search your library for a basic land
| card, put it onto the battlefield tapped, then shuffle
| Coffee Lake Land T: add 1 T: add U or R
|
| Whiskey Lake is drunk: Whiskey Lake Land
| T: add 1 1,T: add U, U, U or U, U, or U, U, or U,or U,or
| U,or U,or U,or U,or U, [truncated]
| ALittleLight wrote:
| Pretty good! All of the cards I saw were reasonably balanced -
| not unlike looking through random cards in a new set. Makes me
| think there could be a game type online where all cards are
| automatically generated. Or, perhaps a player could fine-tune
| their generator and play with totally novel cards that fit their
| preference or play style.
| nemacol wrote:
| I would play AI generated MTG Draft in a heart beat. Maybe a
| 50/50 mix with real cards so you don't have to learn every single
| card every game.
| mostelato wrote:
| Image loading is down right now, Wombo is throwing more GPUs at
| it!
| WhyOhWhyQ wrote:
| How "far" from the training art is the resulting generated art?
| Do the generated cards have features which are recognizably
| lifted from the training data?
| KaoruAoiShiho wrote:
| How do we use the wombo api? Can't find documentation.
| rmeertens wrote:
| Would love to know this as well! Are you using an official API
| or did you reverse engineer it yourself?
| kleiba wrote:
| "Click the card to generate" does not do anything for me - any
| ideas why?
| tecleandor wrote:
| The backend seems a bit stack. I think we (or others) are
| overflowing it with requests :P :D
| minimaxir wrote:
| I have a GitHub repo to create more optimized encoding of MtG
| cards from the JSON card dumps: https://github.com/minimaxir/ai-
| generated-magic-cards
|
| I also have a Colab Notebook which lets you generate cards from a
| trained AI on it, allowing you to specify components of cards to
| constrain the generation:
| https://colab.research.google.com/drive/1VOt090UzvltoBgMdUZm...
|
| I had another tool to generate images of the AI-generated cards
| but unfortunately using Wine + Magic Set Editor on Linux is very
| fussy. I might revisit it someday.
| wilhil wrote:
| I don't think it's ready for prime time... My first card is
| giving me a headache trying to understand what it is doing!
|
| https://snipboard.io/AXjDS7.jpg
| MrMember wrote:
| The card is mostly nonsense but "it gets +1/+1/+1 until end of
| turn" really threw me for a loop.
| YeGoblynQueenne wrote:
| To be honest, it's a bit like an Un-set card.
| impalallama wrote:
| i just generated a card with the text mirror reversed.
| interesting
| iamcurious wrote:
| "Those who cannot get along with humans often make them wizards."
| Love this text.
|
| 2/2 red flying angel with a 4R cost, a bit expensive BUT its
| ability is pay R and get +1/+0. Damn.
|
| https://www.urzas.ai/cards/?card_id=82e1f185-2cfa-4b07-96b5-...
| kuang_eleven wrote:
| Seems like a slight variant of the OG Shivan Dragon!
| iamcurious wrote:
| I loved that one, but it also gives broken cards like this
| though:
|
| text right to cost.
|
| effect is all mangeld up "+1+1/+0" ? "creatures you control
| gain control of artifcats you control"?
|
| flavor text talks about shuffling hands.
|
| https://www.urzas.ai/cards/?card_id=4ca04b29-f84c-4d48-95d8-...
| HelloNurse wrote:
| Artifcats are obviously artifact cat creatures; there are
| currently _12_ among real cards.
| eutropia wrote:
| Anyone know the correct mana syntax for advanced options? I tried
| 4RRR and got the text "4RRR" in the mana cost, instead of red
| mana symbols and 4 colorless.
| dleavitt wrote:
| {4}{R}{R}{R}
| nick_ok wrote:
| https://www.urzas.ai/cards/?card_id=56bbb053-68c8-4e52-a1e8-...
| This one is cool!
| ianferrel wrote:
| All the ones I'm generating are mirror imaged left-right
| reversed. Text, image, everything.
| captn3m0 wrote:
| Is the card rendered mirrored for anyone else? Chrome/MacOS
| TheDauthi wrote:
| Came here just to mention that, but I'm Chrome/Windows.
| aleksiy123 wrote:
| Me too with same tools.
| haolez wrote:
| Wow! Imagine a new tournament category where you receive an AI
| generated deck on every match! Sounds fun :)
| frob wrote:
| I absolutely love the domain name. I'm immediately pulled back 23
| years to sitting in my uncle's living room.
| Piribedil wrote:
| Believable art, text and flavor text :
| https://www.urzas.ai/cards/?card_id=9d76fd94-95b2-4d20-bbb3-...
| chc4 wrote:
| There was a very popular Twitter account that was tweeting out a
| similar concept (starting way back in 2015, even!)
| https://twitter.com/RoboRosewater
|
| LoadingReadyRun, a very popular MTG YouTube channel, even did a
| cube draft using only cards that were generated by RoboRosewater
| that I thought was funny to watch https://youtu.be/UuG5YLbwsQk
| kimixa wrote:
| Just last week they did another with a new set
|
| https://www.youtube.com/watch?v=bbqS7PXKFhc
|
| This was created by people on the MTG Neural Net Discord - if
| you're interested it might be worth checking out
| https://discord.gg/EH4BTDk
| cptcobalt wrote:
| My husband and I play MTG (and do some speculative card
| investments on the side) and have been cracking up while
| slowly making our way through the LRR vod for this new AI
| Masters cube. So much great stuff.
| lukifer wrote:
| There's one for Netrunner as well:
| https://twitter.com/roborunnercards
| kuang_eleven wrote:
| Oof, now there's a name I have not heard in a long while! Has
| it really turned into a MTG channel? It used to be first and
| foremost a sketch comedy group that would occasionally do
| gaming videos.
| SN76477 wrote:
| I love this.. idea!
|
| I have for a long time wanted to skin MTG with the names and
| images from /r/bossfights
| chillpenguin wrote:
| This is great! The couple cards I generated were spot-on in terms
| of what felt like a realistic mtg card.
| krapp wrote:
| Slurp Juice -
| https://www.urzas.ai/cards/?card_id=a0dff4c6-2e59-482b-9f24-...
| maxverse wrote:
| > Foreboding Blast deals 2 damage to target creature and 2 damage
| to each creature your opponent controls. {1}{R}.
|
| That's crazy powerful for 2 mana!
| TimPC wrote:
| It's like a one-sided pyroclasm on steroids. And pyroclasm was
| a playable card.
| TimPC wrote:
| Also you found an error. "Your opponent" is not valid in the
| language of M:TG it needs to be "target opponent" because "your
| opponent" is not well defined outside of two-player games.
| hutzlibu wrote:
| But in this context it seems that this applies to all the
| other creatures of the player(owner) of the target crearure.
| latexr wrote:
| There are examples of MTG cards referring to a single
| opponent in old editions[1], digital editions[2], and Un-
| sets[3].
|
| [1]: https://scryfall.com/card/leg/6/clergy-of-the-holy-
| nimbus
|
| [2]: https://scryfall.com/card/ymid/14/clone-crafter
|
| [3]: https://scryfall.com/card/ugl/62/gus
| Izkata wrote:
| I swear I also remember some burn spells that target a
| creature and then also deal damage to that creature's
| controller. I'd guess the wording came from trying to
| combine that with something else.
| TheDauthi wrote:
| Yep, Chandra's Outrage, for example.
|
| "Chandra's Outrage deals 4 damage to target creature and
| 2 damage to that creature's controller."
| wyldfire wrote:
| Sure: that's why we have the oracle text.
| vbhakta wrote:
| More GPUs incoming :)
| AftHurrahWinch wrote:
| https://www.urzas.ai/cards/?card_id=56bbb053-68c8-4e52-a1e8-...
|
| Hacker - Creature (Human Wizard) 3U Flash, Flying, Haste 2 / 2
| "When it cries out, look around for prey."
| jakelazaroff wrote:
| Gotta love "Haste (This creature can't be blocked except by
| creatures with flying or reach)"
| JadoJodo wrote:
| https://www.urzas.ai/cards/?card_id=1c9e446b-608b-4b21-a87b-...
|
| > Cabal Transfixion - Instant Add {B} for each opponent. "Reveal
| the top card of your library. You choose a card." -- Ignore. 1
| {B}
|
| It's been a while since I played, but flavor text is not
| actionable, correct? Pretty funny
| snarf21 wrote:
| Correct. While funny, this would be nothing but a rules
| nightmare and source of arguments for players. Would _never_
| happen.
| ai_ja_nai wrote:
| super funny! :D
| angarg12 wrote:
| Hey, a few months back I trained a NN to generate MTG cards. I
| submitted a post to the MTG subreddit but it got blocked as spam
| and I never managed to get the mods to approve it.
|
| My question was whether natural language generating networks
| could be used as a tool to assist game design. I must say I'm
| quite impressed with the results. Many cards could be legit with
| minor tweaks and some balance.
|
| The point isn't to produce fully procedural content, but to
| assist designers to produce better content faster. Honestly I
| think people should start taking these tools seriously in the
| procedural content generation world.
|
| This is the (pretty rough) repo with my code.
|
| https://github.com/angarg12/this_trading_card_does_not_exist
|
| These are some examples of cards
|
| Guardian of Chains Counter target spell. It deals 4 damage to any
| target
|
| Orchid's Fury Target Vampire creature gets +1/+0 until end of
| turn
|
| Surveyor's Arch Untap target player. It deals 3 damage to that
| player. You lose 1 life
|
| Partisans of the Undying Search your library for a basic land
| card, reveal that card, put it into your hand, then shuffle
|
| Caravan Ritual Enchant creature When caravan Ritual enters the
| battlefield, return target creature to its owner's hand. Activate
| only during your upkeep. Equip {2}
|
| Brahms of the Grave When Ithabadi Troghr enters the battlefield,
| return target creature card from your graveyard to your hand. It
| gains haste until end of turn'
|
| Sleeping Dread Knight Flying (This creature can't be blocked
| except by two or more creatures card types.) Whenever Sleeping
| Dread Knight deals combat damage to a player, creatures you
| control get +X/+X until end of turn
|
| Genswurm, the Flesh Orchard When Gnojscos, God of Vampires enters
| the battlefield, sacrifice a land. {5}{G}{G}, Sacrifice Genswurm:
| Draw a card
|
| Storm Call Choose up to two target lands. You gain 1 life. An
| opponent has "{T}, Sacrifice Storm Call: Regenerate this
| permanent, then create a token with "{T}, Sacrifice Storm Call:
| Add up to X +1/+1 counters."
|
| Wandering Hollow {T}: Create a red and white Zombie artifact
| creature token with base power and toughness 5/5. Illus. Angel
| Albatross on the battlefield (This creature enters the
| battlefield with X +1/+1 counters on it. When it dies, return it
| to the battlefield under your control.)
| msarchet wrote:
| I was looking at the advanced options, and specifying Name,
| Mana Cost and Type don't seem to do what I expect.
|
| Example:
|
| Fire Bomb 2R Instant
|
| the mana is loaded as 2R instead of 2(Mountain Symbol) and the
| name/type don't seem to line up with what is generated.
|
| Is there something I am missing here or do those inputs just
| override what is on the card?
| nick_ok wrote:
| you need to put mana cost as {2}{R} !
| tintor wrote:
| Your website is just a blank page.
| mostelato wrote:
| Minimalism is all the rage these days!
| Acceptance wrote:
| My card came out mirrored lol
|
| https://www.urzas.ai/cards/?card_id=511b085d-da3a-4ab0-af20-...
| pmontra wrote:
| Bastard Operator From Hell [1]
| https://www.urzas.ai/cards/?card_id=84f979cf-c377-4028-8d9e-...
|
| [1] https://en.wikipedia.org/wiki/Bastard_Operator_From_Hell
| lcnPylGDnU4H9OF wrote:
| This is really cool! I noticed a few things you might be
| interested in:
|
| It looks like there might be issues rendering mana costs that
| have, e.g., 1GG where it does not render the second G. That is to
| say, it's rendered but only the barest left edge can be seen.
| This appears to only be the case if the card's name is
| sufficiently long (I noticed this with "Bethen, Cenn's Heavenly
| Sleep").
|
| That being said, I have no idea how powerful Bethen, Cenn's
| Heavenly Sleep really is as a 4/4 flyer because it's CMC is "at
| least 3" because I can't see the full mana cost. The mana costs
| that I can see seem to suggest that the card's strength matches
| the mana cost pretty well, though, so I'd guess Bethen's cost was
| 4 or 5.
|
| The text can sometimes say some weird things (from a 2/2 Zombie
| creature that costs 1 B(lack) called Null Slayer; also Zombie
| Human Clue is my new favorite creature type):
|
| > (1 B(lack), Exile this card from your graveyard: Create a token
| that's a copy of it, except it's a black Zombie Human Clue [it's
| amusing to me that the reincarnated token gains the _Human_ type]
| with no mana cost. Exile it at the beginning of the next end step
| or if it would leave the battlefield [the latter half is
| redundant with it being a token]. You gain life equal to the life
| lost this way [good to know?].)
|
| It's still really impressive the effects it comes up with!
| Zircom wrote:
| >Exile it at the beginning of the next end step or if it would
| leave the battlefield [the latter half is redundant with it
| being a token].
|
| It's not necessarily redundant or useless, there are some cards
| that will trigger off exiling permanents, or count the number
| of permanents that have been exiled during the turn to change
| how powerful an ability is, so if it was destroyed in battle or
| kill-spelled and instead exiled, it would be more useful than
| it simply being destroyed unexiled since it would trigger the
| ability or increase the count of permanents exiled that turn.
| lcnPylGDnU4H9OF wrote:
| Oh, that makes sense. It doesn't technically exile when it's
| removed from the battlefield; there's just nothing to come
| back.
|
| Thanks for the clarification!
|
| To explain my position a bit more, I was considering, e.g.,
| Restoration Angel but that's still moot with your point.
| lcnPylGDnU4H9OF wrote:
| I'm having too much fun with this. I just generated
| Pyromancer's Purge[0] (it doesn't do anything and I can't stop
| giggling to myself; I want more of these that seemingly do
| something but then actually just nothing):
|
| 1R
|
| Instant
|
| This spell costs 1 less to cast if you control a creature with
| power 4 or greater.
|
| Scavenge 1R (1R, Exile this card from your graveyard: Put a
| number of +1 / +1 counters equal to this card's power on target
| creature. Scavenge only as a Sorcery.)
|
| [0]
| https://www.urzas.ai/cards/?card_id=b85a4661-f723-4419-ae64-...
| DLTADragonHawk wrote:
| The flavor text really makes the card. "It scavenges with a
| tide of deceit" makes it feel as if the AI knew the card did
| nothing when scavenging.
| karweiss wrote:
| This is seriously cool--I had way too much fun playing with it.
| Wish there was a way to specify a creature subtype!
___________________________________________________________________
(page generated 2022-05-17 23:00 UTC)