Couldn't help myself. I came across this art last night while working on cards, and you could not have timed this better.
Haha, wow. That is too perfect! Thank you for sharing that.
EDIT: And I have CUDA installed! Finally, I should be able to make use of my GPU. That'll make everything go much faster.
EDIT(2): FINALLY, I can sample from the newest networks (and at lightning fast speeds). This is exactly what I needed. Here's a special treat for y'all. Randomizing the fields as hardcast_sixdrop has done has caused the network to relax its restrictions on card length, which means we can get planeswalkers with 3 abilities (with no special training)! Admittedly, they don't always have three abilities, and sometimes they get blended with legendary creatures, but at least it's now possible. I can prime the newest network to get results. Take a look!
Geral of Ochos 3BB
Planeswalker - Sorin
+1: Put a 1/1 black Demon creature token with flying onto the battlefield.
-2: Add BBB to your mana pool. Geral of Ochos deals 2 damage to you.
-6: You get an emblem with "2, sacrifice a land: add BBB to your mana pool. Exile it instead of putting it into your hand."
4
Campeopan, the Firebrand 3RR
Planeswalker - Elemental
+1: Campeopan deals 5 damage to target white creature.
-2: Each creature you control gets +3/+3 until end of turn.
-6: Put a 4/4 red dragon creature token with flying onto the battlefield.
Sacrifice a creature: Return Campeopan, the Firebrand from your graveyard to the battlefield. Activate this ability only during your upkeeps.
4
Pember Boon 2WW
Planeswalker - Garruk
+1: Untap two target lands.
-1: Put three 1/1 red and green Giant creature tokens onto the battlefield.
-3: Destroy all creatures with power 4 or greater.
-7: You get an emblem with "At the beginning of your draw step, draw two additional cards" and "At the beginning of your end step, your life total becomes 5".
As long as the top card of your library is a creature card, Pember Boon has all activated abilities of that card.
5
#Now that one was extremely very verbose.
Phantom Boar 3G
Planswalker - Carrier
+2: Put a 2/2 green Wolf creature token onto the battlefield.
-2: Draw cards equal to the number of creatures you control.
-5: You get an emblem with "At the beginning of each opponent's upkeep, that player loses half or his or her life, rounded up."
3
Sorin, Lord of Innistrad 2WW
Planewalker - Gideon
+1: Exile the top three cards of your library. For each player, put a card into your hand, and then shuffle the rest into your library.
-2: When you cast your next instant or sorcery spell this turn, Sorin deals 5 damage to target player.
-7: Exile the top four cards of your libarry, then put them into your graveyard.
4
#His first ability cares about multiplayer formats, evidently. Shame about the underwhelming ultimate.
The latest developments have become a bit spread out over the last few pages; where can we find the latest randomized input file from hardcast, as well as your latest sampling script and checkpoint you just used?
From my side of things: cardsmith turned down my api request. They are super busy and worried about their server performance. Didn't hurt to ask though. I'm going to have to write the card image generation myself, but magic set editor is hosted on sourceforge which is having a TITSUP issue so I am unable to get the art assets. Python-requests is also taking 18 seconds per image request from google on my vps but not my home system and I have no idea why.
I'm going to pout by playing Kerbal Space Program instead!
Private Mod Note
():
Rollback Post to RevisionRollBack
Proud to be saving the world since 1984 -- I also have an open source website to make AI generated magic cards. Source code
As long as the top card of your library is a creature card, Pember Boon has all activated abilities of that card.
... however, we won't instruct you to play with the top card of your library revealed! So you need to psychically determine whether the top card is a creature or not, Zener-test-style, and your opponent needs to have faith in your powers.
I finally figured out how to get my computer to play nice with Torch. I'll probably be running this program for 72-ish hours straight. Wish me luck!
I particularly love how the planeswalkers generated above have regular planeswalker subtypes, so Geral is actually like an alternate-timeline version of Sorin (wait, wasn't this basically the plot of Tarkir block?)
EDIT: Also, Sorin, Lord of Innistrad is actually Gideon.
The latest developments have become a bit spread out over the last few pages; where can we find the latest randomized input file from hardcast, as well as your latest sampling script and checkpoint you just used?
Hardcast_sixdrop's files (both the input file generator and the checkpoints) can be found by following the links in his signatures. My latest sampling script is available via Google Drive. A link should be available on the first post.
From my side of things: cardsmith turned down my api request. They are super busy and worried about their server performance. Didn't hurt to ask though. I'm going to have to write the card image generation myself, but magic set editor is hosted on sourceforge which is having a TITSUP issue so I am unable to get the art assets. Python-requests is also taking 18 seconds per image request from google on my vps but not my home system and I have no idea why.
I'm going to pout by playing Kerbal Space Program instead!
Well, thank you for trying anyway. And yes, Sourceforge has been down recently, I saw that as well. By the way, in case you missed it, you can get low quality art assets from mwsdata.com. Useful for generative models, but not so much if you just wanted to use them as-is.
As for the request, I'm not sure why it's so slow. I doubt it's a client-side issue though.
I finally figured out how to get my computer to play nice with Torch. I'll probably be running this program for 72-ish hours straight. Wish me luck!
I particularly love how the planeswalkers generated above have regular planeswalker subtypes, so Geral is actually like an alternate-timeline version of Sorin (wait, wasn't this basically the plot of Tarkir block?)
EDIT: Also, Sorin, Lord of Innistrad is actually Gideon.
Awesome! I'm happy you were able to get that issue resolved, and I wish you the best of luck! I look forward to hearing about what you come up with.
As for the names, yes, I noticed that as well. Older versions of the network tend to generate more novel names for planeswalkers, and this one seems to be overfitting more. Same with the names of cards. It might be an unintended side effect of the field randomization, not sure.
----
A few extras that were generated randomly:
Whispers of the Muse UU
Instant
Each player reveals the top card of his or her library. For each nonland card revealed this way, you draw a card.
Tradewarden 2W
Creature - Human Mercenary
Hexproof
Tradewarden has indestructible as long as it has a +1/+1 counter on it.
1/3
#I just liked the name Tradewarden.
I'd share more with you, but I'm currently dedicating GPU/CPU time to doing some vital experiments for my dissertation. I'm reproducing an experiment from a paper that came out earlier this year where the researchers were able to train an LSTM network (just like ours) to understand and execute Python code by feeding it the code one character at a time (just like we do). That means teaching it to understand how to evaluate mathematical expressions, iterate through loops, retain knowledge of variables for long periods of time, etc. I've got it rigged up to a Python code generator, so I have no shortage of inputs. I'm very excited to see how well it'll do.
As I've noted, I'm looking into how to set up the architecture for image generation. I'll keep you posted as to how that goes.
I'd share more with you, but I'm currently dedicating GPU/CPU time to doing some vital experiments for my dissertation. I'm reproducing an experiment from a paper that came out earlier this year where the researchers were able to train an LSTM network (just like ours) to understand and execute Python code by feeding it the code one character at a time (just like we do). That means teaching it to understand how to evaluate mathematical expressions, iterate through loops, retain knowledge of variables for long periods of time, etc. I've got it rigged up to a Python code generator, so I have no shortage of inputs. I'm very excited to see how well it'll do.
"Mommy, when did the AI revolution begin?"
"Well, it all began when the machines learned how to code...."
The TL;DR is that single card flavor is definitely do-able. But if we interpret flavor as world-building (as opposed to flavor for a single card in isolation), then that is the most daunting challenge of all, because you need extremely long-term coherence and consistency. There are many ways to fake your way to flavor (e.g. procedural generation or borrowing verbatim from massive corpuses), but they tend to fall short upon close inspection - they can only take us so far. In short, you'd be asking a machine to speak to the human experience, something that's really hard for a non-human to do.
Will we reach a point where that's possible? Perhaps. But there are a lot of necessary technological precursors that will have to emerge for that to happen, and a whole host of philosophical and ethical questions that will need to be answered.
I'd share more with you, but I'm currently dedicating GPU/CPU time to doing some vital experiments for my dissertation. I'm reproducing an experiment from a paper that came out earlier this year where the researchers were able to train an LSTM network (just like ours) to understand and execute Python code by feeding it the code one character at a time (just like we do). That means teaching it to understand how to evaluate mathematical expressions, iterate through loops, retain knowledge of variables for long periods of time, etc. I've got it rigged up to a Python code generator, so I have no shortage of inputs. I'm very excited to see how well it'll do.
"Mommy, when did the AI revolution begin?"
"Well, it all began when the machines learned how to code...."
@LastElk If you want it in the form of haikus, sure. I've started teaching an RNN about those (from a sample of about 10000 haikus, 0.5mb, which is a bit small, but apparently large centralized haiku databases are not common), and while it's yet to even remember that all haikus are only 3 lines, we get some lovely chance accidents;
Hersing a feesint
For the become to soke
The crills for homer
I'm sure it'll soon learn English words too. Not sure how we'd seed those; given that MtG is fantasy, mostly, we ought to feed it the entire Lord of the Rings/Hobbit texts to establish that dragons = fiery, deadly, etc. To use that knowledge in a flavour text is asking a lot of the RNN, since it can be so free-form (a quote from an in-universe character, a description, anything), so if we tell it 'create a haiku using words you know relate to "dragon" and also please use grammar', that might have a better success rate since it's providing it with some structure (3 sentences, 5/7/5 syllables).
Since I know next-to-nothing about RNNs, could be that this is entirely impossible. But hey, speculating is fun.
edit: this is nothing to do with MtG, and it's not a proper haiku, but I think my RNN hates people who eat foie gras:
In my belly
Crying with return and mood...
Geeses
I had to share that.
edit again: added some card images I made with MSE2 of some of the more recent cards that I could find good images for.
By the way, I was doing some testing this morning, and I'm fairly confident that the randomized field network overfits on creature names, because we reduplicated them so many times that it learns just to repeat them verbatim. It does have a habit of altering up adjectives and place names, however, so they're not always perfect clones. Also, some cards have certain fields missing now and then, as if the network thought it had already explained itself before, and other times it reduplicates fields, as if it had forgotten that it had already told us (that's new due to the field randomization).
Also, I primed the network using my script meant for the fixed field version by using the -name option to prepend text to the first field, enabling me to start off cards with things like "5creature|6elf warrior", that sort of thing. I primed it with "9kinship ~", and I got a lot output that looks like this:
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, return another target nonland permanent to its owner's hand.|5creature|6hound|3{UU^}|1silvergill doomerengra|7|8&^^/&^^|4
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, each opponent loses &^ life.|4|8&^^/&^^|1wei ambush force|6human assassin|3{^BB^}|5creature|7
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, you gain &^^^^^^^ life.|5creature|8&^/&^^^^^^|3{GG^^GG}|1arrogant bloodlord|4|7|6elemental assassin
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, each opponent sacrifices a permanent unless he or she pays {^}.|1caravan hurda|6human warrior|4|5creature|7|8&^^^/&^^^^|3{^^^GG}
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, each opponent reveals a card at random from his or her hand. exchange ownership of the greated than two piles. activate this ability only any time you could cast a sorcery.|4|7|6human rogue|8&^^^^^/&^^^^^|5creature|1sleaping angel|3{^^^WWWW^}
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, you may put that card on the bottom of its owner's library.|8&^/&^^|6atog|3{^^^^WW}|1mask of lasher beetle|7|4|5creature
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, exile @. if you do, @ deals &^^^ damage to that creature or player that shares a creature type with it.|7|1darksteel crusader|4legendary|6spirit|8&/&^^^|3{WWWW^WW}|5creature
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, each opponent loses &^ life.\you have hexproof.|3{^BBGGWW}|6beast|1berserkers of blood ridge|7|8&^^/&^^^^|4|5creature
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, draw a card.|5creature|3{^^^WW}|7|6cat rebel|1amessing of cloudskate|8&^^/&^^|4
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, each player returns all cards with the same name as that spell from his or her graveyard to his or her hand.|5creature|1grave sage|3{UU}|6human wizard|8&^^/&^|4|7
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, each opponent puts the top two cards of his or her library into his or her graveyard.|5creature|4|8&^^/&^^^|7|3{^^UU}|1scoria cat|6illusion warrior
And among these outputs, I found a few interesting or noteworthy cards:
Kalonian Hydra 1BBB
Legendary Creature - Demon Kinship - At the beginning of each of your upkeep, you may look at the top card of your library. if it shares a creature type with Kalonian Hydra, you may reveal it. If you do, each opponent reveals cards from the top of his or her library until he or she reveals a land card. Kalonian Hydra gets +X/+X until end of turn, where X is the number of cards revealed this way.
4/4
#Oh wow, that's.. hold on. It says "each opponent". In a multiplayer game, how big can this thing get?
Sylvan Caryatid G
Creature - Plant Fungus Kinship - At the beginning of each of your upkeep, you may look at the top card of your library. If it shares a creature type with Sylvan Caryatid, you may reveal it. If you do, target creature gains shroud until end of turn.
1/1
#Very odd card in terms of the obscure combination of creature types, but I think of it as showcasing the success of the network. The name matches the creature types, the creature types match the color, and the power and toughness are appropriate for the CMC.
Scarwood Goblins 3(G/U)(G/U)
Creature - Elf Warrior Kinship - At the beginning of each of your upkeep, you may look at the top card of your library. If it shares a creature type with Scarwood Goblins, you may reveal it. If you do, put two 1/1 green and blue Shape creature tokens onto the battlefield.
2/1
#There's something new here. Notice that it's a green and blue creature and it makes green and blue tokens. That level of coordination almost never happened with the older versions of the network. Usually the color of the token would be something completely unrelated to the card.
Voidmage Husher 4(U/R)B
Creature - Elemental Cat Kinship - At the beginning of each of your upkeep, you may look at the top card of your library. if it shares a creature type with Voidmage Husher, you may reveal it. If you do, each opponent reveals his or her hand. you choose an instant or sorcery card from it and exile that card.
5/6
#I'm also noting that the network is more comfortable creating cards with multiple colors, especially hybrid cards. Much more so than before. We'll have to do some statistical analysis of a dump to see just how often it's willing to do this.
Ashenmoor Cohort 4B
Creature - Zombie Kinship - At the beginning of each of your upkeep, you may look at the top card of your library. if it shares a creature type with Ashenmoor Cohort, you may reveal it. If you do, each opponent loses 2 life. B, T: Destroy target nonblack creature.
When Ashenmoor Cohort dies, exile it and each player discards his or her hand.
2/4
#This card is very verbose, and that's actually something I'm not used to seeing. As I've noted in previous posts, the network tends to regulate itself against producing cards that go on for too long (otherwise it would just keep adding abilities forever). But when we trained it on cards where the different fields have been randomized, the network seems more comfortable making longer cards. This is also why we're now seeing planeswalkers with three abilities instead of just one.
What commands am I supposed to run? Right now, I'm doing this:
Run command "th"
Torch startup stuff comes up (ASCII Logo, etc.)
Prompt changes to th>
Run command "th train.lua -data_dir data/Formatted -gpuid -1 -eval_val_every_3600
Prompt changes to ..>
which seems right. However, I don't know what to do to get cards from the RNN from here. Help please?
Sorry for not knowing anything about this, I've never tried to do anything this complex with a computer before, so I'm way out of my depth.
What I've done is:
1) Navigate to the folder char-rnn is in
2) "th train.lua <parameters>". You should start seeing lines telling you progress in training
3) Periodically check on your output folder, you should start to see checkpoint files every so often.
4) "th sample.lua cv/some_checkpoint.t7 -gpuid -1" will then spit out 2000 characters worth of generated cards. You might also try appending some various parameters. -temperature <number between 0 and 1> tells it how risky to be with its guesses. -length <number> tells it to generate that many characters instead of 200.
Private Mod Note
():
Rollback Post to RevisionRollBack
My Moderator Helpdesk
Currently Playing:
Legacy: Something U/W Controlish EDH Cube
Hypercube! A New EDH Deck Every Week(ish)!
@Talcos are you using hardcast's 2-epoch checkpoint? I tried using it but it complained about missing CUDA tensors so I think I can't run samples on it with my cpu, I'll need my gpu.
Its version of Kalonian Hydra is insane. I'll have to make a card of that with a good image. I'd play that all day long even though it's in black (I feel 1ggg would be more appropriate for it somehow...)
@Talcos are you using hardcast's 2-epoch checkpoint? I tried using it but it complained about missing CUDA tensors so I think I can't run samples on it with my cpu, I'll need my gpu.
Its version of Kalonian Hydra is insane. I'll have to make a card of that with a good image. I'd play that all day long even though it's in black (I feel 1ggg would be more appropriate for it somehow...)
Yes, I was using that checkpoint. The checkpoint was trained on the GPU, so the training script stores all the information about the network in a CUDA-friendly format, and when you try to reconstruct the network without having CUDA support (with functioning cunn and cutorch packages), the interpreter gets confused and doesn't know how to read the file.
However, I almost finished a script for converting the GPU-trained networks into a CPU-friendly format. I can load all the information in as CUDA tensors, convert them into regular, non-CUDA tensors, and then store the resulting file. I was just waiting to get CUDA support so I could test out the script and get everything to work appropriately. When I have the opportunity, I'll finish that script and then share it with everyone so you can use the GPU-trained networks on the CPU. Of course, you'll probably have to have CUDA to run the script in the first place. However, anyone training networks with a GPU can use the script and can release both GPU and CPU compatible versions of their checkpoints.
And yes, the name of Kalonian Hydra aside, I think that green would have been more appropriate for that card. I'll note that because I prepended the kinship ability word to the card, it probably prevented the network from giving the demon flying or other abilities that would have been relevant for a black legendary creature. At the same time, it's clearly borrowing from black cards like Balustrade Spy. That card involves only a single opponent, but because kinship abilities tend to affect multiple opponents, the network rephrased that snippet of text accordingly. From there it had fairly wide latitude with what came next, and it chose to grant the creature +X/+X, and it defined the X in terms of the preceding text.
What I've done is:
1) Navigate to the folder char-rnn is in
2) "th train.lua <parameters>". You should start seeing lines telling you progress in training
3) Periodically check on your output folder, you should start to see checkpoint files every so often.
4) "th sample.lua cv/some_checkpoint.t7 -gpuid -1" will then spit out 2000 characters worth of generated cards. You might also try appending some various parameters. -temperature <number between 0 and 1> tells it how risky to be with its guesses. -length <number> tells it to generate that many characters instead of 200.
Hmm. Whenever I run it like that I get
th train.lua -data_dir data/Formatted -gpuid -1 -eval_val_every_3600
/home/josh/torch/install/bin/luajit: cannot open train.lua: No such file or directory
stack traceback:
[C]: in function 'dofile'
...josh/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
[C]: at 0x0804d6d0
I'm not sure exactly what this error means; the train.lua file is on the computer, and I'm not sure what else could be the problem, considering the "no such file or directory" bit. Do you have any ideas?
Well, it looks like you're in /torch/install/bin/luajit. Where did you download char-rnn to?
Personally, I had it somewhere like /home/<me>/RNN/char-rnn.
Private Mod Note
():
Rollback Post to RevisionRollBack
My Moderator Helpdesk
Currently Playing:
Legacy: Something U/W Controlish EDH Cube
Hypercube! A New EDH Deck Every Week(ish)!
Well no, but train.lua and sample.lua are files within the char-rnn master folder. You need to be in that folder (or have it on your PATH) for those file to be visible when you just say "th <file>".
Private Mod Note
():
Rollback Post to RevisionRollBack
My Moderator Helpdesk
Currently Playing:
Legacy: Something U/W Controlish EDH Cube
Hypercube! A New EDH Deck Every Week(ish)!
Ah yes, I think you guys are doing amazing work here but having an AI that can write coherent lore does seem a bit out there. I meant something basically along the lines of what you've already been doing with the mechanics; just a mashup of existing sample material. Not something to be given as much effort as your main work, but I would really enjoy seeing the occasional flavour text that matched up with the card in a hilarious/meaningful way.
Ah yes, I think you guys are doing amazing work here but having an AI that can write coherent lore does seem a bit out there. I meant something basically along the lines of what you've already been doing with the mechanics; just a mashup of existing sample material. Not something to be given as much effort as your main work, but I would really enjoy seeing the occasional flavour text that matched up with the card in a hilarious/meaningful way.
Well, I suppose have some GPU/CPU cycles to spare. I'll see about granting your wish.
EDIT: And it's running! Thanks to the wondrous power of GPUs, I should have results to share in about 4 hours. We'll see how it turns out and go from there.
EDIT(2): Wow, that was fast. I've already got some decent results. Samples from epoch 11:
---
The only sound was the gentle clicking of the world.
---
"You are not here. . . ."
---
"My arrows are an avalanche of the wild."
- Kamahl, pit fighter
---
"Serve me, and die to stop me and reason."
---
"Nothing is much like a fine sun brings a dragon of such at the waves. If you will be safe as the weak at the idea."
- Storm, Azarehaster
---
The network still needs a little more time to train, then I'll make a proper post about the results.
I've tried putting it in my PATH, but I must be doing something wrong, because I get the same error message. I'm not sure how I can be in the folder and run the command at the same time. Could you explain that?
Assuming you're in a command line terminal, use 'cd' to go into the folder that contains the script (train.lua) in this case. Then run the command from the command line terminal (th train.lua etc. etc.)
@Talcos; those are tremendously good flavour texts. Are you extracting those from the general card input file, or have you created an entirely separate input for flavour text?
Also, is your sample_hs_v2.lua script meant to work with hardcast's random field input (the one with field number tags)? I've attempted using it and it doesn't always produce correct results; telling it -manacost "{UURR}" gives a lot of results, only some of which are manacost UR.
Haha, wow. That is too perfect! Thank you for sharing that.
EDIT: And I have CUDA installed! Finally, I should be able to make use of my GPU. That'll make everything go much faster.
EDIT(2): FINALLY, I can sample from the newest networks (and at lightning fast speeds). This is exactly what I needed. Here's a special treat for y'all. Randomizing the fields as hardcast_sixdrop has done has caused the network to relax its restrictions on card length, which means we can get planeswalkers with 3 abilities (with no special training)! Admittedly, they don't always have three abilities, and sometimes they get blended with legendary creatures, but at least it's now possible. I can prime the newest network to get results. Take a look!
Geral of Ochos
3BB
Planeswalker - Sorin
+1: Put a 1/1 black Demon creature token with flying onto the battlefield.
-2: Add BBB to your mana pool. Geral of Ochos deals 2 damage to you.
-6: You get an emblem with "2, sacrifice a land: add BBB to your mana pool. Exile it instead of putting it into your hand."
4
Campeopan, the Firebrand
3RR
Planeswalker - Elemental
+1: Campeopan deals 5 damage to target white creature.
-2: Each creature you control gets +3/+3 until end of turn.
-6: Put a 4/4 red dragon creature token with flying onto the battlefield.
Sacrifice a creature: Return Campeopan, the Firebrand from your graveyard to the battlefield. Activate this ability only during your upkeeps.
4
Pember Boon
2WW
Planeswalker - Garruk
+1: Untap two target lands.
-1: Put three 1/1 red and green Giant creature tokens onto the battlefield.
-3: Destroy all creatures with power 4 or greater.
-7: You get an emblem with "At the beginning of your draw step, draw two additional cards" and "At the beginning of your end step, your life total becomes 5".
As long as the top card of your library is a creature card, Pember Boon has all activated abilities of that card.
5
#Now that one was extremely very verbose.
Phantom Boar
3G
Planswalker - Carrier
+2: Put a 2/2 green Wolf creature token onto the battlefield.
-2: Draw cards equal to the number of creatures you control.
-5: You get an emblem with "At the beginning of each opponent's upkeep, that player loses half or his or her life, rounded up."
3
Sorin, Lord of Innistrad
2WW
Planewalker - Gideon
+1: Exile the top three cards of your library. For each player, put a card into your hand, and then shuffle the rest into your library.
-2: When you cast your next instant or sorcery spell this turn, Sorin deals 5 damage to target player.
-7: Exile the top four cards of your libarry, then put them into your graveyard.
4
#His first ability cares about multiplayer formats, evidently. Shame about the underwhelming ultimate.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
The latest developments have become a bit spread out over the last few pages; where can we find the latest randomized input file from hardcast, as well as your latest sampling script and checkpoint you just used?
I'm going to pout by playing Kerbal Space Program instead!
... however, we won't instruct you to play with the top card of your library revealed! So you need to psychically determine whether the top card is a creature or not, Zener-test-style, and your opponent needs to have faith in your powers.
I particularly love how the planeswalkers generated above have regular planeswalker subtypes, so Geral is actually like an alternate-timeline version of Sorin (wait, wasn't this basically the plot of Tarkir block?)
EDIT: Also, Sorin, Lord of Innistrad is actually Gideon.
Hardcast_sixdrop's files (both the input file generator and the checkpoints) can be found by following the links in his signatures. My latest sampling script is available via Google Drive. A link should be available on the first post.
Well, thank you for trying anyway. And yes, Sourceforge has been down recently, I saw that as well. By the way, in case you missed it, you can get low quality art assets from mwsdata.com. Useful for generative models, but not so much if you just wanted to use them as-is.
As for the request, I'm not sure why it's so slow. I doubt it's a client-side issue though.
Awesome! I'm happy you were able to get that issue resolved, and I wish you the best of luck! I look forward to hearing about what you come up with.
As for the names, yes, I noticed that as well. Older versions of the network tend to generate more novel names for planeswalkers, and this one seems to be overfitting more. Same with the names of cards. It might be an unintended side effect of the field randomization, not sure.
----
A few extras that were generated randomly:
Whispers of the Muse
UU
Instant
Each player reveals the top card of his or her library. For each nonland card revealed this way, you draw a card.
Tradewarden
2W
Creature - Human Mercenary
Hexproof
Tradewarden has indestructible as long as it has a +1/+1 counter on it.
1/3
#I just liked the name Tradewarden.
I'd share more with you, but I'm currently dedicating GPU/CPU time to doing some vital experiments for my dissertation. I'm reproducing an experiment from a paper that came out earlier this year where the researchers were able to train an LSTM network (just like ours) to understand and execute Python code by feeding it the code one character at a time (just like we do). That means teaching it to understand how to evaluate mathematical expressions, iterate through loops, retain knowledge of variables for long periods of time, etc. I've got it rigged up to a Python code generator, so I have no shortage of inputs. I'm very excited to see how well it'll do.
As I've noted, I'm looking into how to set up the architecture for image generation. I'll keep you posted as to how that goes.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
"Mommy, when did the AI revolution begin?"
"Well, it all began when the machines learned how to code...."
Actually, this came up just the other day, and my reply can be found here.
The TL;DR is that single card flavor is definitely do-able. But if we interpret flavor as world-building (as opposed to flavor for a single card in isolation), then that is the most daunting challenge of all, because you need extremely long-term coherence and consistency. There are many ways to fake your way to flavor (e.g. procedural generation or borrowing verbatim from massive corpuses), but they tend to fall short upon close inspection - they can only take us so far. In short, you'd be asking a machine to speak to the human experience, something that's really hard for a non-human to do.
Will we reach a point where that's possible? Perhaps. But there are a lot of necessary technological precursors that will have to emerge for that to happen, and a whole host of philosophical and ethical questions that will need to be answered.
I admit that I am extremely ambitious.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Hersing a feesint
For the become to soke
The crills for homer
I'm sure it'll soon learn English words too. Not sure how we'd seed those; given that MtG is fantasy, mostly, we ought to feed it the entire Lord of the Rings/Hobbit texts to establish that dragons = fiery, deadly, etc. To use that knowledge in a flavour text is asking a lot of the RNN, since it can be so free-form (a quote from an in-universe character, a description, anything), so if we tell it 'create a haiku using words you know relate to "dragon" and also please use grammar', that might have a better success rate since it's providing it with some structure (3 sentences, 5/7/5 syllables).
Since I know next-to-nothing about RNNs, could be that this is entirely impossible. But hey, speculating is fun.
edit: this is nothing to do with MtG, and it's not a proper haiku, but I think my RNN hates people who eat foie gras:
In my belly
Crying with return and mood...
Geeses
I had to share that.
edit again: added some card images I made with MSE2 of some of the more recent cards that I could find good images for.
Also, I primed the network using my script meant for the fixed field version by using the -name option to prepend text to the first field, enabling me to start off cards with things like "5creature|6elf warrior", that sort of thing. I primed it with "9kinship ~", and I got a lot output that looks like this:
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, return another target nonland permanent to its owner's hand.|5creature|6hound|3{UU^}|1silvergill doomerengra|7|8&^^/&^^|4
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, each opponent loses &^ life.|4|8&^^/&^^|1wei ambush force|6human assassin|3{^BB^}|5creature|7
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, you gain &^^^^^^^ life.|5creature|8&^/&^^^^^^|3{GG^^GG}|1arrogant bloodlord|4|7|6elemental assassin
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, each opponent sacrifices a permanent unless he or she pays {^}.|1caravan hurda|6human warrior|4|5creature|7|8&^^^/&^^^^|3{^^^GG}
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, each opponent reveals a card at random from his or her hand. exchange ownership of the greated than two piles. activate this ability only any time you could cast a sorcery.|4|7|6human rogue|8&^^^^^/&^^^^^|5creature|1sleaping angel|3{^^^WWWW^}
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, you may put that card on the bottom of its owner's library.|8&^/&^^|6atog|3{^^^^WW}|1mask of lasher beetle|7|4|5creature
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, exile @. if you do, @ deals &^^^ damage to that creature or player that shares a creature type with it.|7|1darksteel crusader|4legendary|6spirit|8&/&^^^|3{WWWW^WW}|5creature
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, each opponent loses &^ life.\you have hexproof.|3{^BBGGWW}|6beast|1berserkers of blood ridge|7|8&^^/&^^^^|4|5creature
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, draw a card.|5creature|3{^^^WW}|7|6cat rebel|1amessing of cloudskate|8&^^/&^^|4
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, each player returns all cards with the same name as that spell from his or her graveyard to his or her hand.|5creature|1grave sage|3{UU}|6human wizard|8&^^/&^|4|7
|9kinship ~ at the beginning of your upkeep, you may look at the top card of your library. if it shares a creature type with @, you may reveal it. if you do, each opponent puts the top two cards of his or her library into his or her graveyard.|5creature|4|8&^^/&^^^|7|3{^^UU}|1scoria cat|6illusion warrior
And among these outputs, I found a few interesting or noteworthy cards:
Kalonian Hydra
1BBB
Legendary Creature - Demon
Kinship - At the beginning of each of your upkeep, you may look at the top card of your library. if it shares a creature type with Kalonian Hydra, you may reveal it. If you do, each opponent reveals cards from the top of his or her library until he or she reveals a land card. Kalonian Hydra gets +X/+X until end of turn, where X is the number of cards revealed this way.
4/4
#Oh wow, that's.. hold on. It says "each opponent". In a multiplayer game, how big can this thing get?
Sylvan Caryatid
G
Creature - Plant Fungus
Kinship - At the beginning of each of your upkeep, you may look at the top card of your library. If it shares a creature type with Sylvan Caryatid, you may reveal it. If you do, target creature gains shroud until end of turn.
1/1
#Very odd card in terms of the obscure combination of creature types, but I think of it as showcasing the success of the network. The name matches the creature types, the creature types match the color, and the power and toughness are appropriate for the CMC.
Scarwood Goblins
3(G/U)(G/U)
Creature - Elf Warrior
Kinship - At the beginning of each of your upkeep, you may look at the top card of your library. If it shares a creature type with Scarwood Goblins, you may reveal it. If you do, put two 1/1 green and blue Shape creature tokens onto the battlefield.
2/1
#There's something new here. Notice that it's a green and blue creature and it makes green and blue tokens. That level of coordination almost never happened with the older versions of the network. Usually the color of the token would be something completely unrelated to the card.
Voidmage Husher
4(U/R)B
Creature - Elemental Cat
Kinship - At the beginning of each of your upkeep, you may look at the top card of your library. if it shares a creature type with Voidmage Husher, you may reveal it. If you do, each opponent reveals his or her hand. you choose an instant or sorcery card from it and exile that card.
5/6
#I'm also noting that the network is more comfortable creating cards with multiple colors, especially hybrid cards. Much more so than before. We'll have to do some statistical analysis of a dump to see just how often it's willing to do this.
Ashenmoor Cohort
4B
Creature - Zombie
Kinship - At the beginning of each of your upkeep, you may look at the top card of your library. if it shares a creature type with Ashenmoor Cohort, you may reveal it. If you do, each opponent loses 2 life.
B, T: Destroy target nonblack creature.
When Ashenmoor Cohort dies, exile it and each player discards his or her hand.
2/4
#This card is very verbose, and that's actually something I'm not used to seeing. As I've noted in previous posts, the network tends to regulate itself against producing cards that go on for too long (otherwise it would just keep adding abilities forever). But when we trained it on cards where the different fields have been randomized, the network seems more comfortable making longer cards. This is also why we're now seeing planeswalkers with three abilities instead of just one.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
What commands am I supposed to run? Right now, I'm doing this:
Run command "th"
Torch startup stuff comes up (ASCII Logo, etc.)
Prompt changes to th>
Run command "th train.lua -data_dir data/Formatted -gpuid -1 -eval_val_every_3600
Prompt changes to ..>
which seems right. However, I don't know what to do to get cards from the RNN from here. Help please?
Sorry for not knowing anything about this, I've never tried to do anything this complex with a computer before, so I'm way out of my depth.
What I've done is:
1) Navigate to the folder char-rnn is in
2) "th train.lua <parameters>". You should start seeing lines telling you progress in training
3) Periodically check on your output folder, you should start to see checkpoint files every so often.
4) "th sample.lua cv/some_checkpoint.t7 -gpuid -1" will then spit out 2000 characters worth of generated cards. You might also try appending some various parameters. -temperature <number between 0 and 1> tells it how risky to be with its guesses. -length <number> tells it to generate that many characters instead of 200.
Currently Playing:
Legacy: Something U/W Controlish
EDH Cube
Hypercube! A New EDH Deck Every Week(ish)!
Its version of Kalonian Hydra is insane. I'll have to make a card of that with a good image. I'd play that all day long even though it's in black (I feel 1ggg would be more appropriate for it somehow...)
Yes, I was using that checkpoint. The checkpoint was trained on the GPU, so the training script stores all the information about the network in a CUDA-friendly format, and when you try to reconstruct the network without having CUDA support (with functioning cunn and cutorch packages), the interpreter gets confused and doesn't know how to read the file.
However, I almost finished a script for converting the GPU-trained networks into a CPU-friendly format. I can load all the information in as CUDA tensors, convert them into regular, non-CUDA tensors, and then store the resulting file. I was just waiting to get CUDA support so I could test out the script and get everything to work appropriately. When I have the opportunity, I'll finish that script and then share it with everyone so you can use the GPU-trained networks on the CPU. Of course, you'll probably have to have CUDA to run the script in the first place. However, anyone training networks with a GPU can use the script and can release both GPU and CPU compatible versions of their checkpoints.
And yes, the name of Kalonian Hydra aside, I think that green would have been more appropriate for that card. I'll note that because I prepended the kinship ability word to the card, it probably prevented the network from giving the demon flying or other abilities that would have been relevant for a black legendary creature. At the same time, it's clearly borrowing from black cards like Balustrade Spy. That card involves only a single opponent, but because kinship abilities tend to affect multiple opponents, the network rephrased that snippet of text accordingly. From there it had fairly wide latitude with what came next, and it chose to grant the creature +X/+X, and it defined the X in terms of the preceding text.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Hmm. Whenever I run it like that I get
th train.lua -data_dir data/Formatted -gpuid -1 -eval_val_every_3600
/home/josh/torch/install/bin/luajit: cannot open train.lua: No such file or directory
stack traceback:
[C]: in function 'dofile'
...josh/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
[C]: at 0x0804d6d0
Personally, I had it somewhere like /home/<me>/RNN/char-rnn.
Currently Playing:
Legacy: Something U/W Controlish
EDH Cube
Hypercube! A New EDH Deck Every Week(ish)!
Currently Playing:
Legacy: Something U/W Controlish
EDH Cube
Hypercube! A New EDH Deck Every Week(ish)!
Well, I suppose have some GPU/CPU cycles to spare. I'll see about granting your wish.
EDIT: And it's running! Thanks to the wondrous power of GPUs, I should have results to share in about 4 hours. We'll see how it turns out and go from there.
EDIT(2): Wow, that was fast. I've already got some decent results. Samples from epoch 11:
---
The only sound was the gentle clicking of the world.
---
"You are not here. . . ."
---
"My arrows are an avalanche of the wild."
- Kamahl, pit fighter
---
"Serve me, and die to stop me and reason."
---
"Nothing is much like a fine sun brings a dragon of such at the waves. If you will be safe as the weak at the idea."
- Storm, Azarehaster
---
The network still needs a little more time to train, then I'll make a proper post about the results.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Thanks!
@Talcos; those are tremendously good flavour texts. Are you extracting those from the general card input file, or have you created an entirely separate input for flavour text?
Also, is your sample_hs_v2.lua script meant to work with hardcast's random field input (the one with field number tags)? I've attempted using it and it doesn't always produce correct results; telling it -manacost "{UURR}" gives a lot of results, only some of which are manacost UR.
Thanks, guys. I'm sorry that it took me forever to figure out how to use this awesome tool, but it finally paid off.