Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: [1] 2 3 ... 10  All

Author Topic: Letting a computer program make cards  (Read 75603 times)

0 Members and 1 Guest are viewing this topic.

werothegreat

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8172
  • Shuffle iT Username: werothegreat
  • Let me tell you a secret...
  • Respect: +9630
    • View Profile
Letting a computer program make cards
« on: June 11, 2015, 12:06:46 am »
+5

So apparently this happened:

http://www.mtgsalvation.com/forums/creativity/custom-card-creation/612057-generating-magic-cards-using-deep-recurrent-neural

I'd be interested to see what kind of Dominion cards something like this might come up with.
Logged
Contrary to popular belief, I do not run the wiki all on my own.  There are plenty of other people who are actively editing.  Go bother them!

Check out this fantasy epic adventure novel I wrote, the Broken Globe!  http://www.amazon.com/Broken-Globe-Tyr-Chronicles-Book-ebook/dp/B00LR1SZAS/

Phil

  • Swindler
  • ***
  • Offline Offline
  • Posts: 18
  • Shuffle iT Username: Sunfall
  • Respect: +76
    • View Profile
Re: Letting a computer program make cards
« Reply #1 on: June 11, 2015, 01:24:21 am »
+8

I'd be interested to see what kind of Dominion cards something like this might come up with.

The fundamental problem is that the set of all Dominion cards printed (256, and that's if you include Events and the like) is dramatically smaller than the number of Magic: the Gathering cards.  The recursive neural network (henceforth RNN) is simply not going to have a large-enough set of training data to make much in the way of interesting new things.

Which is not to say that you might not generate some inspired nonsense.

If someone wants to actually take this up, I strongly recommend taking the time to do some normalization of the data.  In particular, you'll want to tokenize just about everything in a manner that makes it easy for the RNN to make connections; while they're a significant step up from plain Markov chain generators, RNNs still suck at "memory," and so get lost easily in large amounts of text.  Turning common phrases/styles/etc. into simple, short tokens will make it easier to train the RNN, and will result in higher-quality nonsense.  For example, some simple cards:

Quote from: Normalized
Smithy|$4|#T=A|#C+3
Province|$8|#T=V|#V+6
Market|$5|#T=A|#C+1 #A+1 #B+1 #$+1

and any internal references to itself would be something like #SELF.  This actually looks a lot like the effort that someone... here? was doing in making every card have a parseable representation.

Obviously you could just throw the card text at the RNN and see what happens, but a little effort in cleaning it up would go a long way to improving the output.
Logged

rspeer

  • Witch
  • *****
  • Offline Offline
  • Posts: 469
  • Respect: +877
    • View Profile
Re: Letting a computer program make cards
« Reply #2 on: June 11, 2015, 01:26:10 am »
+1

You know, I was excited by this same idea... but can anyone get all the crazy dependencies of that code working?

I tried following the exact directions to install luarocks. The directions simultaneously require bleeding-edge versions of software and are horrendously out of date (they give errors because they assume IPython 3 is older than IPython 2, the repositories are for Ubuntu 12 (as in 2012) and some of them aren't there anymore, etc.) And I think it expects me to have some Nvidia CUDA thing also.

Now my Ubuntu machine has all kinds of shit libraries installed and it still doesn't know how to neural net.
« Last Edit: June 11, 2015, 01:27:39 am by rspeer »
Logged

pubby

  • Minion
  • *****
  • Offline Offline
  • Posts: 548
  • Respect: +1046
    • View Profile
Re: Letting a computer program make cards
« Reply #3 on: June 11, 2015, 02:04:46 am »
+64

I'm super bored, so let's try randomizing card text using markov chains. The names will be random nouns and the costs will be random numbers.

Eggnog - Action - $3
+2 Coins; or trash two Treasure Maps, gain an Estate card from your hand and gain a copy of it next turn, +1 Buy.

Giraffe - Action - $7
+1 Card, +1 Action, Name a card.

Ship - Action - $4
Look at the top card of you deck. +4 Coins. Trash a card costing exactly 1 Coin.

Property - Action - $4
+1 Card, +2 Actions. You may gain a card costing up to 3 Coins. If you do, gain an Estate card.

Apparatus - Action - $2
Draw until you have no Action cards in your hand.

Basket - Action -$5
Copper produces an extra turn after this one. This can't cause you to take more than two consecutive turns.
« Last Edit: June 11, 2015, 02:06:42 am by pubby »
Logged

tailred

  • Golem
  • ****
  • Offline Offline
  • Posts: 195
  • Shuffle iT Username: ceviri
  • Respect: +368
    • View Profile
Re: Letting a computer program make cards
« Reply #4 on: June 11, 2015, 02:12:28 am »
+16

Giraffe - Action - $7
+1 Card, +1 Action, Name a card.
This is way too strong at $7.
Logged

Seprix

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5607
  • Respect: +3680
    • View Profile
Re: Letting a computer program make cards
« Reply #5 on: June 11, 2015, 02:13:05 am »
+10

Property - Action - $4
+1 Card, +2 Actions. You may gain a card costing up to 3 Coins. If you do, gain an Estate card.

This is actually kind of a cool one.
Logged
DM me for ideas on a new article, either here or on Discord (I check Discord way more often)

Donald X.

  • Dominion Designer
  • *****
  • Offline Offline
  • Posts: 6364
  • Respect: +25699
    • View Profile
Re: Letting a computer program make cards
« Reply #6 on: June 11, 2015, 04:24:56 am »
+10

So apparently this happened:

http://www.mtgsalvation.com/forums/creativity/custom-card-creation/612057-generating-magic-cards-using-deep-recurrent-neural

I'd be interested to see what kind of Dominion cards something like this might come up with.
There are much older Magic card generators you can find out there. Here's one: http://www.toothycat.net/wiki/bnf.pl?page=AlexChurchill/MagicCardGenerator.

I personally worked on one in the 90s, though I abandoned it when I worked out that it wasn't going to be all that cool.

My approach was to work out everything you could ever do, to a given level of complexity and without adding rules/data, and then just pick choices at each uh junction. Like, you pick "COST: EFFECT" from a list of things rules on permanents can look like. then you fill in the pieces. Maybe "COST" becomes "Sacrifice a PERMANENT" and then you replace "PERMANENT" with "a CREATURE" and so there you are needing to replace "a CREATURE" with something - "a creature" or "this creature" or maybe "a red creature with a power of 3." There are all of the characteristics of creatures you can refer to, you can just list them and pick a couple, limit how many you're willing to pick at once. You can increase the odds of simple vs. complex, so that it isn't constantly saying "sacrifice a blue artifact" (that was the joke in the 90s, since then they have made blue artifacts). There are quirks to the characteristics that you have to deal with, to avoid making stuff like "until end of turn, creatures you control are untapped."

When it's all firing you can generate any card, to a particular level of complexity and again without adding new rules to the game (if you're willing to add rules and data then what you have is a game generator, not a Magic card generator, but then generating single cards isn't enough, they need context). The big way Wizards can trump you, other than by adding rules and data which of course they do, is to come up with some simple program flow you hadn't thought of. They do "choose one or both" and well damn, better add that to the list.

The problem with the program is that, well it's like the library in the Borges story. You replace "try to think of something cool" with "wade through chaos looking for cool things." Coming up with the categories of things may inspire you, and that's about all I could hope to get out of it myself, which was why I never finished it. I had it partway and it was spitting out its strings and it was clear that if I replaced "a CREATURE" with "a red creature with a power of 3" it was not going to be any more interesting. The randomly generated cards have no poetry to them.
Logged

shmeur

  • Young Witch
  • ****
  • Offline Offline
  • Posts: 141
  • I'm a Dominion card lol.
  • Respect: +115
    • View Profile
Re: Letting a computer program make cards
« Reply #7 on: June 11, 2015, 04:47:04 am »
0

Giraffe had me dying omg.  Do more of those.  Property also is a pretty nifty idea.  A Village-Workshop with a drawback of gaining a junk card (potentially).
Logged
"I can move mountains; I can work a miracle."

Accatitippi

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1153
  • Shuffle iT Username: Accatitippi
  • Silver is underraided
  • Respect: +1797
    • View Profile
Re: Letting a computer program make cards
« Reply #8 on: June 11, 2015, 05:55:20 am »
+1

Giraffe had me dying omg.  Do more of those.  Property also is a pretty nifty idea.  A Village-Workshop with a drawback of gaining a junk card (potentially).
As written, it would have to cost 3, though, which is strictly better than Village. Maybe it would work if the gain was mandatory. Village Rats! :D
Or you have to make it a full-workshop (gain up to 4$).
These are as fun as the really bad cards ideas! Want moar!

I love how it has produced essentially one of the most commonly proposed fan cards, Giraffe. It sort of synergizes with Menagerie, which is cute.
Logged

pubby

  • Minion
  • *****
  • Offline Offline
  • Posts: 548
  • Respect: +1046
    • View Profile
Re: Letting a computer program make cards
« Reply #9 on: June 11, 2015, 06:18:23 am »
+42

Do more of those.
Here's a few more for fun.

Volcano - Action/Victory - $5
2 VP. Gain a card with the cost of the game.

Broker - Action - $7
Each other player plays an Attack. It doesn't affect you.

Pond - Action - $2
Trash a card from your discard pile and put one card from it on top of your deck.

Ghost - Action - $5
When you play this, count your deck and discard down to 3 cards in hand.

Scarecrow - Action - $5
Turn your Journey token over (it starts face up). If it's face up, +5 Coins, and each other player trashes one of your Treasures from your hand. +<VP> equal to half its cost in Coins of the trashed card.

Bomb - Action - $3
Take 2 Coin tokens. If you do, gain a silver card; put it on top of your deck. Each other player reveals the top 2 cards of his deck, trashes one of them costing from 3 Coins to 6 Coins. You may gain one of them. Otherwise, each other player reveals the top 2 cards on the bottom of the Black Market deck in any order.
Logged

A Drowned Kernel

  • 2015 World Champion
  • *
  • Offline Offline
  • Posts: 1067
  • They/Them
  • Respect: +1980
    • View Profile
Re: Letting a computer program make cards
« Reply #10 on: June 11, 2015, 06:48:26 am »
+13

Pond - Action - $2
Trash a card from your discard pile and put one card from it on top of your deck.

I'd buy it.
Logged
The perfect engine
But it will never go off
Three piles are empty

shmeur

  • Young Witch
  • ****
  • Offline Offline
  • Posts: 141
  • I'm a Dominion card lol.
  • Respect: +115
    • View Profile
Re: Letting a computer program make cards
« Reply #11 on: June 11, 2015, 07:09:00 am »
+2

It would be fun if there were a program that randomly generated cards and a kingdom to play.  Sure, some stuff would be either way too OP or way too useless, but it'd still be interesting to play.
Logged
"I can move mountains; I can work a miracle."

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 11815
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
  • Respect: +12868
    • View Profile
    • Birds of Necama
Re: Letting a computer program make cards
« Reply #12 on: June 11, 2015, 07:17:12 am »
+20

Bomb - Action - $3
Take 2 Coin tokens. If you do, gain a silver card; put it on top of your deck. Each other player reveals the top 2 cards of his deck, trashes one of them costing from 3 Coins to 6 Coins. You may gain one of them. Otherwise, each other player reveals the top 2 cards on the bottom of the Black Market deck in any order.

One of the more balanced Bomb cards out there.
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The YouTube channel where I make musicDownload my band's Creative Commons albums for free

Grujah

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2237
  • Respect: +1177
    • View Profile
Re: Letting a computer program make cards
« Reply #13 on: June 11, 2015, 07:24:41 am »
0

So apparently this happened:

http://www.mtgsalvation.com/forums/creativity/custom-card-creation/612057-generating-magic-cards-using-deep-recurrent-neural

I'd be interested to see what kind of Dominion cards something like this might come up with.
There are much older Magic card generators you can find out there. Here's one: http://www.toothycat.net/wiki/bnf.pl?page=AlexChurchill/MagicCardGenerator.

I personally worked on one in the 90s, though I abandoned it when I worked out that it wasn't going to be all that cool.

My approach was to work out everything you could ever do, to a given level of complexity and without adding rules/data, and then just pick choices at each uh junction. Like, you pick "COST: EFFECT" from a list of things rules on permanents can look like. then you fill in the pieces. Maybe "COST" becomes "Sacrifice a PERMANENT" and then you replace "PERMANENT" with "a CREATURE" and so there you are needing to replace "a CREATURE" with something - "a creature" or "this creature" or maybe "a red creature with a power of 3." There are all of the characteristics of creatures you can refer to, you can just list them and pick a couple, limit how many you're willing to pick at once. You can increase the odds of simple vs. complex, so that it isn't constantly saying "sacrifice a blue artifact" (that was the joke in the 90s, since then they have made blue artifacts). There are quirks to the characteristics that you have to deal with, to avoid making stuff like "until end of turn, creatures you control are untapped."

When it's all firing you can generate any card, to a particular level of complexity and again without adding new rules to the game (if you're willing to add rules and data then what you have is a game generator, not a Magic card generator, but then generating single cards isn't enough, they need context). The big way Wizards can trump you, other than by adding rules and data which of course they do, is to come up with some simple program flow you hadn't thought of. They do "choose one or both" and well damn, better add that to the list.

The problem with the program is that, well it's like the library in the Borges story. You replace "try to think of something cool" with "wade through chaos looking for cool things." Coming up with the categories of things may inspire you, and that's about all I could hope to get out of it myself, which was why I never finished it. I had it partway and it was spitting out its strings and it was clear that if I replaced "a CREATURE" with "a red creature with a power of 3" it was not going to be any more interesting. The randomly generated cards have no poetry to them.

But that is a different thing completely. Here you are writing the rules, providing data and context, and computer is only RNGing to get some results with no awareness of the end results. I am not that much impressed by that.
es as it goes. You can see that after few hours it produces non-nonsensical text that has some pieces of card text arranged in a way that makes no sense. As it progresses it makes more sensical stuff, and later cards that are even new and original and with some tweaks I wouldn't be surprised to see them in a set! (Also some OP as shit stuff).
 
Logged

werothegreat

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8172
  • Shuffle iT Username: werothegreat
  • Let me tell you a secret...
  • Respect: +9630
    • View Profile
Re: Letting a computer program make cards
« Reply #14 on: June 11, 2015, 09:14:47 am »
+8

I love how Property not only makes sense, and is reasonably balanced, but is flavorful, too.
Logged
Contrary to popular belief, I do not run the wiki all on my own.  There are plenty of other people who are actively editing.  Go bother them!

Check out this fantasy epic adventure novel I wrote, the Broken Globe!  http://www.amazon.com/Broken-Globe-Tyr-Chronicles-Book-ebook/dp/B00LR1SZAS/

shmeur

  • Young Witch
  • ****
  • Offline Offline
  • Posts: 141
  • I'm a Dominion card lol.
  • Respect: +115
    • View Profile
Re: Letting a computer program make cards
« Reply #15 on: June 11, 2015, 09:34:31 am »
+1

How did you do the Markov Chain though?  I wanna do it.
Logged
"I can move mountains; I can work a miracle."

AJD

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3296
  • Shuffle iT Username: AJD
  • Respect: +4443
    • View Profile
Re: Letting a computer program make cards
« Reply #16 on: June 11, 2015, 10:02:43 am »
+3

I kind of like Broker too in multi-player games.
Logged

Jack Rudd

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1325
  • Shuffle iT Username: Jack Rudd
  • Respect: +1384
    • View Profile
Re: Letting a computer program make cards
« Reply #17 on: June 11, 2015, 10:09:10 am »
+6

I love how Property not only makes sense, and is reasonably balanced, but is flavorful, too.
Particularly flavourful is the fact that it becomes wonderfully strong if you assign it as an Inheritance.
Logged
Centuries later, archaeologists discover the remains of your ancient civilization.

Evidence of thriving towns, Pottery, roads, and a centralized government amaze the startled scientists.

Finally, they come upon a stone tablet, which contains but one mysterious phrase!

'ISOTROPIC WILL RETURN!'

Cuzz

  • Minion
  • *****
  • Offline Offline
  • Posts: 624
  • Shuffle iT Username: Cuzz
  • Respect: +1021
    • View Profile
Re: Letting a computer program make cards
« Reply #18 on: June 11, 2015, 10:09:48 am »
0

Property - Action - $4
+1 Card, +2 Actions. You may gain a card costing up to 3 Coins. If you do, gain an Estate card.

This is actually kind of a cool one.

It's the only one on the first list that actually makes sense. But it's insane with Inheritance (and something good to inherit).  The first card can be an Estate too.
Logged

shmeur

  • Young Witch
  • ****
  • Offline Offline
  • Posts: 141
  • I'm a Dominion card lol.
  • Respect: +115
    • View Profile
Re: Letting a computer program make cards
« Reply #19 on: June 11, 2015, 10:24:29 am »
0

Property - Action - $4
+1 Card, +2 Actions. You may gain a card costing up to 3 Coins. If you do, gain an Estate card.

This is actually kind of a cool one.

It's the only one on the first list that actually makes sense. But it's insane with Inheritance (and something good to inherit).  The first card can be an Estate too.

Nah.  Ship makes sense too.
Logged
"I can move mountains; I can work a miracle."

Cuzz

  • Minion
  • *****
  • Offline Offline
  • Posts: 624
  • Shuffle iT Username: Cuzz
  • Respect: +1021
    • View Profile
Re: Letting a computer program make cards
« Reply #20 on: June 11, 2015, 10:34:58 am »
0

Property - Action - $4
+1 Card, +2 Actions. You may gain a card costing up to 3 Coins. If you do, gain an Estate card.

This is actually kind of a cool one.

It's the only one on the first list that actually makes sense. But it's insane with Inheritance (and something good to inherit).  The first card can be an Estate too.

Nah.  Ship makes sense too.

True but pretty OP at $4 (compare to baron, Horse Traders, Death Cart) unless you've got a ton of Poor Houses or something, which, like, you wouldn't. 

The "look at the top card of your deck" without doing anything else with that card is interesting. Big Mystic enabler and not a whole lot else.
Logged

shmeur

  • Young Witch
  • ****
  • Offline Offline
  • Posts: 141
  • I'm a Dominion card lol.
  • Respect: +115
    • View Profile
Re: Letting a computer program make cards
« Reply #21 on: June 11, 2015, 10:39:00 am »
0

The trashing side effect is niche, yes, but I think it'd be good to get rid of hovels/etc plus works with cost reducers + estates.
Logged
"I can move mountains; I can work a miracle."

Cuzz

  • Minion
  • *****
  • Offline Offline
  • Posts: 624
  • Shuffle iT Username: Cuzz
  • Respect: +1021
    • View Profile
Re: Letting a computer program make cards
« Reply #22 on: June 11, 2015, 10:42:56 am »
0

The trashing side effect is niche, yes, but I think it'd be good to get rid of hovels/etc plus works with cost reducers + estates.

Oh for sure, I meant that it's almost always a bonus on top of the +$, making it more powerful. It's mandatory but would rarely hurt you.
Logged

Seprix

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5607
  • Respect: +3680
    • View Profile
Re: Letting a computer program make cards
« Reply #23 on: June 11, 2015, 10:47:17 am »
+12

Volcano - Action/Victory - $5
2 VP. Gain a card with the cost of the game.

If you bought this game at a bargain bin for $8 or $11 dollars, this is an OP card.
Logged
DM me for ideas on a new article, either here or on Discord (I check Discord way more often)

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3500
  • Multiediting poster
  • Respect: +3838
    • View Profile
Re: Letting a computer program make cards
« Reply #24 on: June 11, 2015, 10:54:41 am »
+2

Finally, a new card that synergizes with Philosopher's Stone! When is Ghost becoming canon?
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.
Pages: [1] 2 3 ... 10  All
 

Page created in 0.089 seconds with 21 queries.