Temperature 0.2 is very low. Try 0.8 or even the default (1) to see if anything different happens, since temperature controls how 'adventurous' the sampler is feeling.
edit: was generating some enchantments from hardcast's "colour correct" .t7 file, and this was a bit novel:
Sangstrale Consumption 3GW
Enchantment
Creatures without flying can't block creatures without flying. ## Certainly fits the colours. Given how creatures without flying usually can't block creatures with flying anyway, the only things this wouldn't affect is creatures with reach.
Thunderbomb 5WB
Enchantment
Whenever a creature enters the battlefield, creatures you control gain indestructible until end of turn. ## Definitely white, not sure about the black. 7CMC seems good too, for such a powerful effect.
More experimentation with body text seeding reveals that the network still needs more training... -bodytext "kicker" gave only ONE card in 4000 characters with a kicked condition, and that was at temperature 0.75. At least it successfully added a mana cost after every kicker. However, the card it produced was a beauty;
Phyrexian Cloudcopter 6RR
Creature ~ Beast
Kicker 2
When @ enters the battlefield, gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. B: @ gets +1/+1 until end of turn. S: @ gets +1/+1 until end of turn. if @ was kicked, that creature gets +1/+0 until end of turn.
5/5 ## This is a thing of beauty. It got a good name. It associated red with stealing creatures. It even got the creature-stealing clauses correct. And best of all, it has a (fairly insignificant) "if @ was kicked" clause, with a snow mana of all things.
I do wonder why 'kicker' and 'if @ was kicked' are so rarely found together... I'm pretty sure that 100% of real cards that have 'kicker' have a 'if @ was kicked', so wouldn't that be a fairly easy thing for the network to pick up on?
edit again: generated 10000 characters and got another two:
Bloodlent of Arashin 5B
Creature ~ Insect
Kicker 3B
If @ was kicked, it enters the battlefield with a +1/+1 counter on it and with "2, discard a card: draw a card."
2/2 ## Weird. Initial CMC is way high, but the kicker cost is almost worth it. At least it's rules-correct.
Sneep of the Light 7WW
Creature ~ Angel
Kicker W
If @ was kicked, it enters the battlefield with eight +1/+1 counters on it. 2, remove a +1/+1 counter from @: destroy target artifact or enchantment.
5/5 ## Holy RNN angel! Again, initial CMC is a bit pricey but for a mere 10cmc you get a 13/13 and the power to eliminate practically any non-land non-creature permanent. Also, its name makes it sound like it belongs in a Dr. Seuss book.
I had to share this one for the fascinating mechanic: Ray of Watchers 4U
Creature ~ Elf Shaman
kicker 2 ##sadly irrelevant.
@ enters the battlefield with three +1/+1 counters on it. 1, remove a +1/+1 counter from @: target creature gains fear until end of turn.
1/4 ## Weakens itself but gains fear? The closest real card I found was Hired Muscle, and that's a ki counter. Pity the casting cost is blue, rather than black.
Temperature 0.2 is very low. Try 0.8 or even the default (1) to see if anything different happens, since temperature controls how 'adventurous' the sampler is feeling.
edit: was generating some enchantments from hardcast's "colour correct" .t7 file, and this was a bit novel:
Sangstrale Consumption 3GW
Enchantment
Creatures without flying can't block creatures without flying.
## Certainly fits the colours. Given how creatures without flying usually can't block creatures with flying anyway, the only things this wouldn't affect is creatures with reach.
Thunderbomb 5WB
Enchantment
Whenever a creature enters the battlefield, creatures you control gain indestructible until end of turn.
## Definitely white, not sure about the black. 7CMC seems good too, for such a powerful effect.
Thanks for the info, i started retraining on your input.txt thats on your google drive and am using the script that talcos posted in the previous page of the thread (sample_hs.lua). I also increased the RNN to 256 before starting my new training, it will take longer but i think it's worth it.
What is this "color correct".t7 file? How did you get it to be more correct with colors? And can i download the .t7? I tried to download some of your .t7 files but it gave me an error when i used the sample script on them, something about my GPU.
Hardcast mentioned in this comment that he had a checkpoint with better cost learning. Also, I think you mean Hardcast's .t7 files, since I certainly haven't uploaded any to a google drive. GPU error is common yes, since checkpoints (t7 files) which were generated with GPU can't be used to sample with CPU, and vice versa.
More research on tough-to-accomplish mechanics: apparently creatures as X in their casting cost (or XX) are a real pain for the RNN. Out of 10000 characters, no correct card came out, except for maybe this:
Soot Sabotan X
Creature ~ Faerie Rogue
Flying
Channel ~ 5G, discard @: @ deals X damage to target player. UGG, T: exile target creature card from a graveyard. Return it to the battlefield under its owner's control.
3/3
Fun fact; it got Channel correct though. Fascinating. Again, you'd think the RNN would learn a relatively simple association as "if there's X in the mana cost there is AT LEAST one more X in the body text". Weird.
So, using the resources posted by Talcos and hardcast, I set up a network that I can prime with anything I want. Everything seems to be coming along nicely at 22 epochs, except one thing: Planeswalkers. All of the Planeswalkers I've generated have had only one proper ability each. The ability is always one that adds loyalty, generally +1. No matter what I do, it won't generate one with more than one ability. Is this a common problem, or is the issue with my network in particular?
I'm having trouble specifying more parameters, i can do it fine with parameters such as -gpu, -seed, and -temperature, but when i try to constrain it with types or mana cost it breaks, see here:
th sample.lua cv/lm_lstm_epoch0.23_0.7888.t7 -gpuid -1 -length 2000 -temperature 1 -seed 423 -types "Enchantment"
creating an LSTM...
missing seed text, using uniform probability over first character
--------------------------
Q^^/uther {GG} less, you may draw a card, put a +&/+&^ coonters onto target player, untap the top of tho top that cards warlior to your upkeep until end of turn.\{UUUU^}, T: put a +&^/+&^ counters on @.|
th sample.lua cv/lm_lstm_epoch0.23_0.7888.t7 -gpuid -1 -length 2000 -temperature 1 -seed 423 -types "Enchantment"
creating an LSTM...
missing seed text, using uniform probability over first character
--------------------------
Q^^/uther {GG} less, you may draw a card, put a +&/+&^ coonters onto target player, untap the top of tho top that cards warlior to your upkeep until end of turn.\{UUUU^}, T: put a +&^/+&^ counters on @.|
/Users/Frankerson/torch/install/bin/luajit: bad argument #1 to '?' (empty tensor at /Users/Frankerson/torch/pkg/torch/generic/Tensor.c:851)
stack traceback:
[C]: at 0x0ebae6e0
[C]: in function '__index'
sample.lua:179: in main chunk
[C]: in function 'dofile'
...rson/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
[C]: at 0x010eabc2e0
As far as I know, planeswalkers are a really tough one to do. I've not tried it myself, but reading through the thread there's at least one post by Talcos with some resources dedicated to generating them.
Have you tried X casting cost cards? They're one thing I haven't had any success with. Funnily enough, I've had success with */* power/toughness, such as:
Hollow Spirit 4WW
Creature ~ Angel
@'s power and toughness are each equal to the number of zombies you control.
*/* ## I can't decide if this is incredibly colour-inappropriate, or, given the name and subtype, incredibly flavourful and on-colour. Thoughts?
Errants' Achor 1(G/U)(R/U)
Creature - Fish
@'s power and toughness are each equal to the number of lands you control.
*/*
## OK, messed up mana. But it has blue (and could easily be {U/R} rather than {R/U}) so makes sense as a fish. Interesting creature that would tend to grow over the course of a game.
A bit disappointing that it couldn't think of anything more unique than p/t being equal to number of cards in hand or creatures in play (of whatever type). Still good that in about 40% of generated cards it managed to tie together */* and having to define the p/t.
Well, I just gave X casting cost cards a go with my epoch 26 checkpoint. No luck at temperature = .7. Out of roughly 40 cards (5000 characters) generated at a temperature of .4, I only managed to find 2 that had a second X:
planeswalker's phantasm X
creature ~ elemental
@ enters the battlefield with X +1/+1 counters on it. 3, T, remove a % counter from @: put a 1/1 green saproling creature token onto the battlefield.
10/10
fallen research X
sorcery
@ deals X damage to target creature or player.
planeswalker's phantasm X
creature ~ elemental
@ enters the battlefield with X +1/+1 counters on it. 3, T, remove a % counter from @: put a 1/1 green saproling creature token onto the battlefield.
10/10
Seems fair... "Hmm, maybe I should wait until turn 2 to play him so I can make more saprolings... Oh wait he needs some other unspecified counter to do that.. eh I'll just cast him now."
@um0123, be careful when seeding my checkpoints that you don't use illegal characters. My networks use all lowercase letters, so if you give it 'Enchantment' it will blow up as soon as it tries to use the capital 'E.'
edit: was generating some enchantments from hardcast's "colour correct" .t7 file, and this was a bit novel:
Sangstrale Consumption 3GW
Enchantment
Creatures without flying can't block creatures without flying. ## Certainly fits the colours. Given how creatures without flying usually can't block creatures with flying anyway, the only things this wouldn't affect is creatures with reach.
Might want to reread that. It's actually rather impactful, and could be a big finisher if you're stalled on the ground.
I'm currently at the start of a very long car ride, so I'll be brief:
um0123, you appear to be using the old inpuy format. That's my fault. If you haven't fixed the issue since then, I believe there is a link to hardcast_sixdrop's github at the top of the original post. The file you want should be called output.txt. you can rename it to input.txt and feed it in.
Maplesmall, X costs are an ongoing issue. Part of the problem is that some Xs are defined by the mana cost (prior to use) while others are explained in the body text (after the use). I'm still working on that one.
ParadoxRegained, I trained a network to generate planeswalkers. But more testing will be needed to see whether we can train a general-purpose network to generate planeswalkers, because the length of a pw card greatly exceeds the average and the network's regulating cells hate making cards too much longer than average. That and even if we are successful, we will alter the distribution. More planeswalkers in training will lead the network to believe that planeswalkers are more common in Magic than they really are.
Lastly, I made some progress with upfating the sampling script to do both body text prepending and appending. I need to roll back the state of the network when it generates the last "|" symbol, otherwise it thinks the appended text is unconnected with the rest of the body, which limits its ability to generate cards like "target creature gets +1/+1 [append: if condition], that creature gets +4/+4 instead."
And I'll have that GPU-CPU conversion script working before too long. Probably won't happen today, what with all the travel, and I'll be busy in DC for a large part of the remaining week, but I'll get it done, lol.
Quick question: are all features (including name) of a card created by AI?
Anyway good job on this. I'll acknowledge I laughed pretty hard at the first cards, but became more and more uncomfortable with the weirdness of AI "thinking"...
Oh I hadn't seen that series or articles.
"And so when humanity is finally drowned out in darkness of the final night that is the robot uprising, we can all rest easy knowing that two T-800's somewhere will be complaining because the VirtuaRosewater program recently generated a brand new Magic expansion focused on banding.
Nobody likes banding"
That was the correct way to end the article
Quick question: are all features (including name) of a card created by AI?
Anyway good job on this. I'll acknowledge I laughed pretty hard at the first cards, but became more and more uncomfortable with the weirdness of AI "thinking"...
To your question, yes, by default it generates all the content by itself. However, cards can also be created with cooperation fron humans. We can "prime" the network by whispering words into its ear so as to infleunce its output. For example, we say "make it an elf", and then it makes an elf druid that is green and makes mana, because those are qualities associated with elves. Of course, it's perfectly capable of producing high quality output with or without our intervention.
And don't worry, it's not thinking. It's just moving numbers around in a way that's epistemologically indistinguishable from thinking. Nothing to worry about. :-D
can someone link me to a .t7 file of "the most learned" neural net that someone has created so far? (CPU only please, unless we can convert GPU to CPU now?)
can someone link me to a .t7 file of "the most learned" neural net that someone has created so far? (CPU only please, unless we can convert GPU to CPU now?)
Hardcast_sixdrop has some of the most up-to-date checkpoints available. You can check out his most recent files here:
As for the GPU to CPU problem, not yet. I haven't had much time. The good news is that a solution should be coming soon. I have it on good authority that I'll have CUDA support for my machines by the time I return from my vacation, and that would make it much easier for me to test out the conversion solution that I have (mostly) completed.
----
By the way, I've been sketching out a plan / doing preliminary coding for a more robust sampling script with more flexible rules generation. Effectively, you feed the script a set of restrictions and it makes cards within those restrictions.
The input format looks like this:
manacost,"{UU",L,None,None
type,"tribal instant",L,None,None
type,"tribal sorcery",L,None,None
type,"tribal enchantment",L,None,None
type,"creature",L,None,None
subtype,"homarid",L,None,None
bodytext,"rising tide ~ whenever you cast a blue spell,", LR, type,"creature"
bodytext,"rising tide ~ whenever you cast a blue spell,", L, type,"enchantment"
bodytext,"homarids you control have", R, type,"enchantment"
bodytext,"rising tide ~ if you cast another blue spell this turn,",R,type,"sorcery"
bodytext,"rising tide ~ if you cast another blue spell this turn,",R,type,"instant"
And then the only cards I get out of the network that look like this:
Whispered Prism 1UU
Creature - Homarid Rising tide - Whenever you cast a blue spell, you may pay 1. If you do, target player puts the top two cards of his or her library into his or her graveyard.
1/3
Primal Dominater 1U
Creature - Homarid Rising tide - Whenever you cast a blue spell, you may tap or untap target creature
1/1
Warrior's Sphinx 2UU
Creature - Homarid
When Warrior's Sphinx enters the battlefield, draw a card. Rising tide - Whenever you cast a blue spell, you may put a +1/+1 counter on Warrior's Sphinx.
3/3
Myr Chance 1UU
Tribal Sorcery - Homarid
Return target permanent to it's owners hand. Rising tide - If you cast another blue spell this turn, you may pay 1U. If you do, return Myr Chance from your graveyard to the battlefield.
#"return to your hand" would have sufficed. I think there's an issue with creature subtypes in tribal cards leading the network to believe that the body text should be appropriate for a permanent. I'll look into that.
Rally the Spirit Beast 3UU
Tribal Instant - Homarid
Counter target spell. Rising tide - If you cast another blue spell this turn, add X to your mana pool, where X is the number of cards in your hand.
Perallance Tage 5U
Tribal Enchantment - Homarid
Homarids you control have "T, tap two untapped creatures you control: draw a card." Rising tide - Whenever you cast a blue spell, you may put a 1/1 blue Thopter artifact creature token with flying onto the battlefield.
I'll probably release a better version of the script that I already have available before I turn my attention to that one, but I've got everything mostly figured out for the fancier version. I'll just need to find some time after I return from my vacation to hammer out the remainder of that code. With the improved sampling script, you'll be able to build scripts that look something like this:
* Generate 1000 cards for theme A using restrictionsA.config
* Generate 1000 cards for theme B using restrictionsB.config
* Generate 1000 cards for theme C using restrictionsC.config
* Feed the results of the generation into another script to make a selection of cards at various CMCs et cetera to assemble everything into a (somewhat reasonable) set.
We'll see where that takes us. I'll keep you posted.
Does your own computers performance effect the sampling script? I am using Harcasts and most of the time the cards are very bland and it doenst seem to understand which colors go with which abilities. In your article it seemed to have it pretty much figured out by the end, but when i sample from hardcast's files i cant get anything like what you got at the end of the article.
The computer's performance only affects how fast it can generate cards, not which ones it generates.
Make sure you haven't set the temperature too low (I almost always use 0.8.). Other than that, the only thing I can say is that usually when we post cards, they've been hand selected from a large batch of mostly uninteresting things. Not every card is exciting. In fact, the cards from the more recent networks might be less exciting in general because the network is better at creating realistic cards, which tend not to be the exciting ones.
Yes, the networks have a very hard time with rare, long distance patterns like kicker, and X. We're working on that. Hopefully I'll be able to kick off some training with a new format tonight so I can provide results from it tomorrow night.
I set my temp to 1 because i want something wacky, but i still get a bunch of boring cards. they aren't the same each time, but they aren't very interesting.
harcast, which t7 do you recommend for my purposes? i want the patterns to be mostly correct, but the cards to be interesting, mostly i just want the body text to be good, because i can modify the mana cost, name, type, etc pretty easily afterward
Kicker is OK, actually. I've had decent results with it. Sure, 2/3 cards out of 10,000 characters isn't a great success rate, but it's still capable of generating capable kicker/kicked cards... sometimes.
What new format are you using, and will it be even more awesome?
Random question... your recommended checkpoint file has a variation number (I think that's what it's called) of about 0.33. The lower the number is, the 'better' the checkpoint is. So... what if you ever reach 0? Or 0.1? Is it a really superb checkpoint?
Thinking about the X problem, it seems to me that we have two very different formats of X abilities:
The first is where we have an X in the cost. This might be long distance (X in the cost of a spell) or short distance (X in the cost of an ability). An example would be Fireball. However, this doesn't have to appear in the same line as the ability - Abandon Hope is an example of this.
The second is where we have an X value explained after the ability. An example would be Accelerated Mutation.
The problem here is that the RNN sometimes will put an X in, thinking of the second type, and then forget and use the first type instead, failing to define it. Additionally, there are cards with more than 2 X effects with the same X: Æther Tide. I'm thinking that the solution (if possible) would be to reword all of the second type of X abilities to read like the first type. For example, Accelerated Mutation would read:
Where X is the highest converted man cost among creatures you control, target creature gets +X/+X until end of turn.
A little weird for us, but the RNN would always be confident of ending the card after it puts in a use for the X, but never before. We'd just want to flip those two phrases; Akroan Hoplite should still start with "Whenever Akroan Hoplite attacks, [...]".
This wouldn't solve Aspect of Wolf (At least not its errata'd text), but it should help for most cases, at least enough for it to use X abilities mostly correctly.
So, my current network hit 50 epochs. It's 3-layer, with rnn_size = 300 and dropout = .25. It still generates an annoyingly high amount of cards that just don't work, but it makes some interesting stuff too. Here's some examples of what I'm getting at temperature = .7:
fury sledge 4
artifact creature ~ spirit
whenever @ attacks, defending player sacrifices a creature.
2/2
#Hmm... interesting, but probably belongs in black. Also, as you'll see, my network is really bad at mana costs.
firebrand 6GG
creature ~ beast G: regenerate @.
7/7
#A big green beast with regenerate? Nice and on-color.
cylian caves
land T: add 1 to your mana pool. 1, T, sacrifice @: search your library for a basic land card, reveal it, and put it into your hand. if you do, shuffle your library.
when @ is put into a graveyard from the battlefield, if it was kicked, it enters the battlefield with four -1/-1 counters on it. 1BB, remove a +1/+1 counter from @: target creature gets +2/+2 until end of turn.
#This looked like it was going to work... then... I don't even know what happened.
swipe in uberant 1U
enchantment ~ aura
enchant creature
whenever enchanted creature deals combat damage to a player, put a +1/+1 counter on each other creature that shares a creature type with that creature instead.
#The wording seems off, and it probably doesn't belong in blue, but I like this concept.
surging trought 4
artifact 6, T: target creature gains flying until end of turn.
#In the glorious tradition of Jump...
croqual dromoka 4W
creature ~ kithkin soldier
vigilance
at the beginning of each end step, if you control a blue or blue permanent you control, @ gets +2/+2 until end of turn.
2/4
#Blue or blue, nothing else will do.
archangel of the turns 1R
creature ~ human soldier
first strike, haste
whenever a player casts a blue spell, you may pay B. if you do, put X 3/3 green wolf creature tokens onto the battlefield, where X is the number of % counters on it.
#Alright, the card as a whole doesn't really work, but I'm happy that the network made a card that used X properly.
What new format are you using, and will it be even more awesome?
I have two ideas. The easy one is to use field labels instead of a fixed ordering, then scramble up the fields to get more different cards. Currently I'm making python do the right thing, but once all of the little issues are hammered out it should be as simple as passing a few arguments to my new encoding script and bam, NN input.
The hard idea is to label every line of card text with what it is. Most lines of text on spells are effects like '@ deals 3 damange to target creature or player,' while permanents tend to have passive, active, or triggered abilities. Of course there are also a lot of edge cases like creature keywords: 'flying, trample, deathtouch' is a perfectly valid line, and there's stupid things like convoke and kicker and 'if @ was kicked' and levelers and so on. And even if you know what you want, you still have to write a python script that can figure it out for every card. So, that's a more long-term goal.
Would that make the NN less likely to invent new cards/mechanics though? One of the best things was seeing the RNN come up with 'Tromple' out of the blue. The more we condense the actual text of the cards, is it more likely to just rearrange the concepts it's learned from the cards rather than coming up with new and exciting things? Or is the opposite true (or neither)?
Private Mod Note
():
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
edit: was generating some enchantments from hardcast's "colour correct" .t7 file, and this was a bit novel:
Sangstrale Consumption
3GW
Enchantment
Creatures without flying can't block creatures without flying.
## Certainly fits the colours. Given how creatures without flying usually can't block creatures with flying anyway, the only things this wouldn't affect is creatures with reach.
Thunderbomb
5WB
Enchantment
Whenever a creature enters the battlefield, creatures you control gain indestructible until end of turn.
## Definitely white, not sure about the black. 7CMC seems good too, for such a powerful effect.
More experimentation with body text seeding reveals that the network still needs more training... -bodytext "kicker" gave only ONE card in 4000 characters with a kicked condition, and that was at temperature 0.75. At least it successfully added a mana cost after every kicker. However, the card it produced was a beauty;
Phyrexian Cloudcopter
6RR
Creature ~ Beast
Kicker 2
When @ enters the battlefield, gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
B: @ gets +1/+1 until end of turn.
S: @ gets +1/+1 until end of turn. if @ was kicked, that creature gets +1/+0 until end of turn.
5/5
## This is a thing of beauty. It got a good name. It associated red with stealing creatures. It even got the creature-stealing clauses correct. And best of all, it has a (fairly insignificant) "if @ was kicked" clause, with a snow mana of all things.
I do wonder why 'kicker' and 'if @ was kicked' are so rarely found together... I'm pretty sure that 100% of real cards that have 'kicker' have a 'if @ was kicked', so wouldn't that be a fairly easy thing for the network to pick up on?
edit again: generated 10000 characters and got another two:
Bloodlent of Arashin
5B
Creature ~ Insect
Kicker 3B
If @ was kicked, it enters the battlefield with a +1/+1 counter on it and with "2, discard a card: draw a card."
2/2
## Weird. Initial CMC is way high, but the kicker cost is almost worth it. At least it's rules-correct.
Sneep of the Light
7WW
Creature ~ Angel
Kicker W
If @ was kicked, it enters the battlefield with eight +1/+1 counters on it.
2, remove a +1/+1 counter from @: destroy target artifact or enchantment.
5/5
## Holy RNN angel! Again, initial CMC is a bit pricey but for a mere 10cmc you get a 13/13 and the power to eliminate practically any non-land non-creature permanent. Also, its name makes it sound like it belongs in a Dr. Seuss book.
I had to share this one for the fascinating mechanic:
Ray of Watchers
4U
Creature ~ Elf Shaman
kicker 2 ##sadly irrelevant.
@ enters the battlefield with three +1/+1 counters on it.
1, remove a +1/+1 counter from @: target creature gains fear until end of turn.
1/4
## Weakens itself but gains fear? The closest real card I found was Hired Muscle, and that's a ki counter. Pity the casting cost is blue, rather than black.
Thanks for the info, i started retraining on your input.txt thats on your google drive and am using the script that talcos posted in the previous page of the thread (sample_hs.lua). I also increased the RNN to 256 before starting my new training, it will take longer but i think it's worth it.
What is this "color correct".t7 file? How did you get it to be more correct with colors? And can i download the .t7? I tried to download some of your .t7 files but it gave me an error when i used the sample script on them, something about my GPU.
More research on tough-to-accomplish mechanics: apparently creatures as X in their casting cost (or XX) are a real pain for the RNN. Out of 10000 characters, no correct card came out, except for maybe this:
Soot Sabotan
X
Creature ~ Faerie Rogue
Flying
Channel ~ 5G, discard @: @ deals X damage to target player.
UGG, T: exile target creature card from a graveyard. Return it to the battlefield under its owner's control.
3/3
Fun fact; it got Channel correct though. Fascinating. Again, you'd think the RNN would learn a relatively simple association as "if there's X in the mana cost there is AT LEAST one more X in the body text". Weird.
th sample.lua cv/lm_lstm_epoch0.23_0.7888.t7 -gpuid -1 -length 2000 -temperature 1 -seed 423 -types "Enchantment"
creating an LSTM...
missing seed text, using uniform probability over first character
--------------------------
Q^^/uther {GG} less, you may draw a card, put a +&/+&^ coonters onto target player, untap the top of tho top that cards warlior to your upkeep until end of turn.\{UUUU^}, T: put a +&^/+&^ counters on @.|
Have you tried X casting cost cards? They're one thing I haven't had any success with. Funnily enough, I've had success with */* power/toughness, such as:
Hollow Spirit
4WW
Creature ~ Angel
@'s power and toughness are each equal to the number of zombies you control.
*/*
## I can't decide if this is incredibly colour-inappropriate, or, given the name and subtype, incredibly flavourful and on-colour. Thoughts?
Errants' Achor
1(G/U)(R/U)
Creature - Fish
@'s power and toughness are each equal to the number of lands you control.
*/*
## OK, messed up mana. But it has blue (and could easily be {U/R} rather than {R/U}) so makes sense as a fish. Interesting creature that would tend to grow over the course of a game.
A bit disappointing that it couldn't think of anything more unique than p/t being equal to number of cards in hand or creatures in play (of whatever type). Still good that in about 40% of generated cards it managed to tie together */* and having to define the p/t.
planeswalker's phantasm
X
creature ~ elemental
@ enters the battlefield with X +1/+1 counters on it.
3, T, remove a % counter from @: put a 1/1 green saproling creature token onto the battlefield.
10/10
fallen research
X
sorcery
@ deals X damage to target creature or player.
Seems fair... "Hmm, maybe I should wait until turn 2 to play him so I can make more saprolings... Oh wait he needs some other unspecified counter to do that.. eh I'll just cast him now."
@um0123, be careful when seeding my checkpoints that you don't use illegal characters. My networks use all lowercase letters, so if you give it 'Enchantment' it will blow up as soon as it tries to use the capital 'E.'
um0123, you appear to be using the old inpuy format. That's my fault. If you haven't fixed the issue since then, I believe there is a link to hardcast_sixdrop's github at the top of the original post. The file you want should be called output.txt. you can rename it to input.txt and feed it in.
Maplesmall, X costs are an ongoing issue. Part of the problem is that some Xs are defined by the mana cost (prior to use) while others are explained in the body text (after the use). I'm still working on that one.
ParadoxRegained, I trained a network to generate planeswalkers. But more testing will be needed to see whether we can train a general-purpose network to generate planeswalkers, because the length of a pw card greatly exceeds the average and the network's regulating cells hate making cards too much longer than average. That and even if we are successful, we will alter the distribution. More planeswalkers in training will lead the network to believe that planeswalkers are more common in Magic than they really are.
Lastly, I made some progress with upfating the sampling script to do both body text prepending and appending. I need to roll back the state of the network when it generates the last "|" symbol, otherwise it thinks the appended text is unconnected with the rest of the body, which limits its ability to generate cards like "target creature gets +1/+1 [append: if condition], that creature gets +4/+4 instead."
And I'll have that GPU-CPU conversion script working before too long. Probably won't happen today, what with all the travel, and I'll be busy in DC for a large part of the remaining week, but I'll get it done, lol.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
"And so when humanity is finally drowned out in darkness of the final night that is the robot uprising, we can all rest easy knowing that two T-800's somewhere will be complaining because the VirtuaRosewater program recently generated a brand new Magic expansion focused on banding.
Nobody likes banding"
That was the correct way to end the article
To your question, yes, by default it generates all the content by itself. However, cards can also be created with cooperation fron humans. We can "prime" the network by whispering words into its ear so as to infleunce its output. For example, we say "make it an elf", and then it makes an elf druid that is green and makes mana, because those are qualities associated with elves. Of course, it's perfectly capable of producing high quality output with or without our intervention.
And don't worry, it's not thinking. It's just moving numbers around in a way that's epistemologically indistinguishable from thinking. Nothing to worry about. :-D
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Hardcast_sixdrop has some of the most up-to-date checkpoints available. You can check out his most recent files here:
https://drive.google.com/folderview?id=0B0sVbHh87RPmflpTSGEtVnZjS2NfODA2d3RrNm9zYUZOeTU5bUlybnFwMXB0a252cTZWNEU&usp=sharing
As for the GPU to CPU problem, not yet. I haven't had much time. The good news is that a solution should be coming soon. I have it on good authority that I'll have CUDA support for my machines by the time I return from my vacation, and that would make it much easier for me to test out the conversion solution that I have (mostly) completed.
----
By the way, I've been sketching out a plan / doing preliminary coding for a more robust sampling script with more flexible rules generation. Effectively, you feed the script a set of restrictions and it makes cards within those restrictions.
The input format looks like this:
And then the only cards I get out of the network that look like this:
Whispered Prism
1UU
Creature - Homarid
Rising tide - Whenever you cast a blue spell, you may pay 1. If you do, target player puts the top two cards of his or her library into his or her graveyard.
1/3
Primal Dominater
1U
Creature - Homarid
Rising tide - Whenever you cast a blue spell, you may tap or untap target creature
1/1
Warrior's Sphinx
2UU
Creature - Homarid
When Warrior's Sphinx enters the battlefield, draw a card.
Rising tide - Whenever you cast a blue spell, you may put a +1/+1 counter on Warrior's Sphinx.
3/3
Myr Chance
1UU
Tribal Sorcery - Homarid
Return target permanent to it's owners hand.
Rising tide - If you cast another blue spell this turn, you may pay 1U. If you do, return Myr Chance from your graveyard to the battlefield.
#"return to your hand" would have sufficed. I think there's an issue with creature subtypes in tribal cards leading the network to believe that the body text should be appropriate for a permanent. I'll look into that.
Rally the Spirit Beast
3UU
Tribal Instant - Homarid
Counter target spell.
Rising tide - If you cast another blue spell this turn, add X to your mana pool, where X is the number of cards in your hand.
Perallance Tage
5U
Tribal Enchantment - Homarid
Homarids you control have "T, tap two untapped creatures you control: draw a card."
Rising tide - Whenever you cast a blue spell, you may put a 1/1 blue Thopter artifact creature token with flying onto the battlefield.
I'll probably release a better version of the script that I already have available before I turn my attention to that one, but I've got everything mostly figured out for the fancier version. I'll just need to find some time after I return from my vacation to hammer out the remainder of that code. With the improved sampling script, you'll be able to build scripts that look something like this:
* Generate 1000 cards for theme A using restrictionsA.config
* Generate 1000 cards for theme B using restrictionsB.config
* Generate 1000 cards for theme C using restrictionsC.config
* Feed the results of the generation into another script to make a selection of cards at various CMCs et cetera to assemble everything into a (somewhat reasonable) set.
We'll see where that takes us. I'll keep you posted.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Make sure you haven't set the temperature too low (I almost always use 0.8.). Other than that, the only thing I can say is that usually when we post cards, they've been hand selected from a large batch of mostly uninteresting things. Not every card is exciting. In fact, the cards from the more recent networks might be less exciting in general because the network is better at creating realistic cards, which tend not to be the exciting ones.
Yes, the networks have a very hard time with rare, long distance patterns like kicker, and X. We're working on that. Hopefully I'll be able to kick off some training with a new format tonight so I can provide results from it tomorrow night.
harcast, which t7 do you recommend for my purposes? i want the patterns to be mostly correct, but the cards to be interesting, mostly i just want the body text to be good, because i can modify the mana cost, name, type, etc pretty easily afterward
very untrained mostly trained fully trained
What new format are you using, and will it be even more awesome?
Random question... your recommended checkpoint file has a variation number (I think that's what it's called) of about 0.33. The lower the number is, the 'better' the checkpoint is. So... what if you ever reach 0? Or 0.1? Is it a really superb checkpoint?
The first is where we have an X in the cost. This might be long distance (X in the cost of a spell) or short distance (X in the cost of an ability). An example would be Fireball. However, this doesn't have to appear in the same line as the ability - Abandon Hope is an example of this.
The second is where we have an X value explained after the ability. An example would be Accelerated Mutation.
The problem here is that the RNN sometimes will put an X in, thinking of the second type, and then forget and use the first type instead, failing to define it. Additionally, there are cards with more than 2 X effects with the same X: Æther Tide. I'm thinking that the solution (if possible) would be to reword all of the second type of X abilities to read like the first type. For example, Accelerated Mutation would read:
Where X is the highest converted man cost among creatures you control, target creature gets +X/+X until end of turn.
A little weird for us, but the RNN would always be confident of ending the card after it puts in a use for the X, but never before. We'd just want to flip those two phrases; Akroan Hoplite should still start with "Whenever Akroan Hoplite attacks, [...]".
This wouldn't solve Aspect of Wolf (At least not its errata'd text), but it should help for most cases, at least enough for it to use X abilities mostly correctly.
4
artifact creature ~ spirit
whenever @ attacks, defending player sacrifices a creature.
2/2
#Hmm... interesting, but probably belongs in black. Also, as you'll see, my network is really bad at mana costs.
firebrand
6GG
creature ~ beast
G: regenerate @.
7/7
#A big green beast with regenerate? Nice and on-color.
cylian caves
land
T: add 1 to your mana pool.
1, T, sacrifice @: search your library for a basic land card, reveal it, and put it into your hand. if you do, shuffle your library.
when @ is put into a graveyard from the battlefield, if it was kicked, it enters the battlefield with four -1/-1 counters on it.
1BB, remove a +1/+1 counter from @: target creature gets +2/+2 until end of turn.
#This looked like it was going to work... then... I don't even know what happened.
swipe in uberant
1U
enchantment ~ aura
enchant creature
whenever enchanted creature deals combat damage to a player, put a +1/+1 counter on each other creature that shares a creature type with that creature instead.
#The wording seems off, and it probably doesn't belong in blue, but I like this concept.
surging trought
4
artifact
6, T: target creature gains flying until end of turn.
#In the glorious tradition of Jump...
croqual dromoka
4W
creature ~ kithkin soldier
vigilance
at the beginning of each end step, if you control a blue or blue permanent you control, @ gets +2/+2 until end of turn.
2/4
#Blue or blue, nothing else will do.
archangel of the turns
1R
creature ~ human soldier
first strike, haste
whenever a player casts a blue spell, you may pay B. if you do, put X 3/3 green wolf creature tokens onto the battlefield, where X is the number of % counters on it.
#Alright, the card as a whole doesn't really work, but I'm happy that the network made a card that used X properly.
I have two ideas. The easy one is to use field labels instead of a fixed ordering, then scramble up the fields to get more different cards. Currently I'm making python do the right thing, but once all of the little issues are hammered out it should be as simple as passing a few arguments to my new encoding script and bam, NN input.
The hard idea is to label every line of card text with what it is. Most lines of text on spells are effects like '@ deals 3 damange to target creature or player,' while permanents tend to have passive, active, or triggered abilities. Of course there are also a lot of edge cases like creature keywords: 'flying, trample, deathtouch' is a perfectly valid line, and there's stupid things like convoke and kicker and 'if @ was kicked' and levelers and so on. And even if you know what you want, you still have to write a python script that can figure it out for every card. So, that's a more long-term goal.