I had to go into the code and set up a little subroutine where I wait for the network to output "S||", the start of a creature, and then I wait for the right "|" which marks the start of the body text, and I do a forward pass on the network with inputs " G r a n d e u r ", seeding it with the idea that that is what it needs to output next. Then I just let it do it's own thing. If it said Grandeur, and it knows what Grandeur is, it also knows that there needs to be an associated ability meeting certain criteria. All I did was nudge it in the right direction.
EDIT: It's really hackish at this point. I'm sure I could make it so you could put in your own restrictions from the command line, when I can find the time to do that. But it's good to know that that will work.
Sorry for double posting, but I did a bit of tinkering, and oh god, it works! If I whisper "Grandeur" into its ear when it starts to generate the body text, that's what it'll do. I get nothing but creatures like this:
Radiant's Drake 1W
Creature Human Soldier
Grandeur - Discard another card named Radiant's Drake: Add {G} to your mana pool.
1/1
Rathi Firecat 4G
Creature - Beast
Grandeur - Discard another card named Rathi Firecat : Search your library for a land card, put it onto the battlefield. Then shuffle your library.
3/3
Suntail Shaman 3R
Creature - Human Shaman
Grandeur - Discard another card named Suntail Shaman : Target player reveals the top card of his or her library for each other creature you control.
Flying
1/1
That's all I had to do, a small modification to the sampling program! Now, my input has an issue where if the creature doesn't have body text, it's missing a "|" that I use to track where I need to start whispering to the network. That pushes the inspiration down to the next field, the name, giving me otherwise ordinary creatures with names like "Grandured Gargoyle" and so on. But we can fix that.
So yes, we can, with some modifications, make the network generate cards according to our specifications. How exciting!
EDIT: With some extensions, we can add control parameters for types, abilities, and so on. We can have the network generate only green cards, only Wizard creatures, only Artifacts (even if the network was trained to produce all kinds of cards), etc. This opens up a whole lot of possibilities.
EDIT(2): Let's try threshold. Why not. I do that and I get..
S|| Creature Elemental | {111}{R} | 2/2 | Threshold ? As long as seven or more cards are in your graveyard, $THIS gets +1/+1, is black, and has "{T}: Destroy target creature. It can't be regenerated. | Grinning Devil S|| Creature Human Cleric | {11}{W} | 1/3 | Threshold ? $THIS gets +2/+2 as long as seven or more cards are in your graveyard. | Ravenous Decoy ||E S|| Creature Human Wizard | {1}{R} | 1/1 | Threshold ? $THIS gets +2/+2 as long as you control a Beast, exile. | Rootwater Minotaur ||E S|| Creature Human Soldier | {11}{W} | 2/2 | Threshold ? As long as seven or more cards are in your graveyard, $THIS gets +2/+2 and has "When $THIS dies, you may have it deal 1 damage to target creature or player. | Fledgling Imp ||E
Perfect!
Why not start with "protection from"? I get...
S|| Creature Human Wizard | {11}{U} | 1/1 | protection from white and from black
{R}: $THIS gets +1/+0 until end of turn. | Wall of Winger ||E S|| Creature Human Cleric | {11}{W} | 1/4 | protection from red | Ghost Hound ||E S|| Creature Human Soldier | {W}{W} | 2/1 | protection from black
Spells that players put the top two cards of his or her library into his or her graveyard. | Conled Heavent ||E S|| Creature Human Cleric | {11}{B} | 1/2 | protection from red
Threshold ? As long as seven or more cards are in your graveyard, $THIS gets +1/+1 and has vigilance. (It can't be the target of spells or abilities.)
At the beginning of each opponent's upkeep, that player sacrifices a creature. | Hazerider Sliver ||E
In principle, I can prime it with anything, but keep in mind I'm priming it in the middle of the card. If I prime it with the full text of another card inside that card, it's going to get waaaay off track. But what we could do is prime it with Legendary at the type line, and let it go from there, that sort of thing. Or words like "command zone", etc.
EDIT: Heck, you could prime it with novel abilities of your own design.
"Retribution ? If $THIS dies this turn,"
Creature Spirit | {11}{B} | 2/2 | Retribution ? If $THIS dies this turn, put a 1/1 black Bat creature token with flying onto the battlefield. | Purrad Inquisitor ||E S|| Creature Ogre Warrior | {111}{R}{R} | 5/3 | Retribution ? If $THIS dies this turn, sacrifice it unless you discard a card. | Mardu Scout ||E S|| Creature Vedalken Wizard | {1}{U} | 1/1 | Retribution ? If $THIS dies this turn, put two 2/2 black Zombie creature tokens onto the battlefield.
When a Dragon enters the battlefield that's a Mononos counter on $THIS.
At the beginning of your upkeep, you may draw a card for each color among permanents you control. | Ronom Angel ||E S|| Creature Illusion | {11}{U} | 2/1 | Retribution ? If $THIS dies this turn, put three +1/+1 counters on $THIS. | Returned Cathar ||E
Oh. my. god. That is too good! I can introduce abilities it's never seen before and it just... understands them! Haha!!
EDIT(2):
Prime with "Ungodly ? Whenever $THIS attacks", and we get...
S|| Creature Cat Soldier | {11}{W} | 2/2 | Ungodly ? Whenever $THIS attacks, target creature you control gains flying until end of turn. | Gravecrawler ||E S|| Creature Human Warrior | {111}{R} | 3/2 | Ungodly ? Whenever $THIS attacks, it gets +2/+0 until end of turn. | Beacon Hawk ||E S|| Creature Illusion | {1}{U} | 1/1 | Ungodly ? Whenever $THIS attacks, it doesn't untap during its controller's next untap step. | Serra Avenger ||E
In principle, I can prime it with anything, but keep in mind I'm priming it in the middle of the card. If I prime it with the full text of another card inside that card, it's going to get waaaay off track. But what we could do is prime it with Legendary at the type line, and let it go from there, that sort of thing. Or words like "command zone", etc.
EDIT: Heck, you could prime it with novel abilities of your own design.
"Retribution ? If $THIS dies this turn,"
Creature Spirit | {11}{B} | 2/2 | Retribution ? If $THIS dies this turn, put a 1/1 black Bat creature token with flying onto the battlefield. | Purrad Inquisitor ||E S|| Creature Ogre Warrior | {111}{R}{R} | 5/3 | Retribution ? If $THIS dies this turn, sacrifice it unless you discard a card. | Mardu Scout ||E S|| Creature Vedalken Wizard | {1}{U} | 1/1 | Retribution ? If $THIS dies this turn, put two 2/2 black Zombie creature tokens onto the battlefield.
When a Dragon enters the battlefield that's a Mononos counter on $THIS.
At the beginning of your upkeep, you may draw a card for each color among permanents you control. | Ronom Angel ||E S|| Creature Illusion | {11}{U} | 2/1 | Retribution ? If $THIS dies this turn, put three +1/+1 counters on $THIS. | Returned Cathar ||E
Oh. my. god. That is too good! I can introduce abilities it's never seen before and it just... understands them! Haha!!
EDIT(2):
Prime with "Ungodly ? Whenever $THIS attacks", and we get...
S|| Creature Cat Soldier | {11}{W} | 2/2 | Ungodly ? Whenever $THIS attacks, target creature you control gains flying until end of turn. | Gravecrawler ||E S|| Creature Human Warrior | {111}{R} | 3/2 | Ungodly ? Whenever $THIS attacks, it gets +2/+0 until end of turn. | Beacon Hawk ||E S|| Creature Illusion | {1}{U} | 1/1 | Ungodly ? Whenever $THIS attacks, it doesn't untap during its controller's next untap step. | Serra Avenger ||E
Someone tell Rosewater he's officially out of a job.
Could you start it off by giving a card a name, mana cost, power/toughness, creature type, and let it go from there?
Oh yes, definitely. But it will have to wait till later. I'd have to reorganize the subroutine into something more flexible than what I have now. Right now it can only add to the start of the body text. But with some modifications, I could have it insert stuff anywhere, or multiple things, or one of several things (e.g. I just want Elf and Goblin cards).
EDIT: Okay, one more, tromple. But let's phrase it as "Tromple ?", where ? is a long dash.
S|| Legendary Creature Human Advisor | {1111}{W}{W} | 3/3 | Tromple ? Whenever $THIS deals combat damage to a player, put a +1/+1 counter on it.
Whenever a creature you control with a +1/+1 counter on it dies, you may draw a card. | Adarkar Vitionary ||E S|| Creature Goblin | {1}{R} | 1/2 | Tromple ? As long as you control your commander, $THIS gets +2/+2 and has "When $THIS dies, exile it, then return a creature card at random from your graveyard to your hand. | Deathfele Witch ||E S|| Creature Hound | {11}{G} | 2/2 | Tromple ? As long as you have no cards in hand, $THIS gets +1/+1, is black, and has "{T}: Add {1} to your mana pool. | Riddlesmith ||E
And now we get definitions for tromple, so we can pick our favorite and run with it! Finally, an explanation for tromple from the network itself.
Adarkar Vitionary 4WW
Legendary Creature Human Advisor
Tromple - Whenever Adarkar Vitionary deals combat damage to a player, put a +1/+1 counter on it.
Whenever a creature you control with a +1/+1 counter on it dies, you may draw a card.
3/3
It's funny that it's decided that Tromple is the official name for what is unofficially known as the "Slith" ability.
On the whole though, this card is just... perfectly designed. Would make a fun EDH deck with Arcbound creatures.
It's funny that it's decided that Tromple is the official name for what is unofficially known as the "Slith" ability.
On the whole though, this card is just... perfectly designed. Would make a fun EDH deck with Arcbound creatures.
I wouldn't say it's "perfectly" designed, as that last ability is almost certainly Blue, Black, or Green, but definitely not white. It's definitely interesting though.
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)!
Amazing. Every time I think we've come to the pinnacle of design-by-AI, you introduce something that propels it even further.
Haha, no problem. And trust me, we've only begun to scratch the surface. With more sophisticated techniques and more computational resources, we can achieve so much more than what we have. But what we have now is pretty impressive just as is.
Adarkar Vitionary 4WW
Legendary Creature Human Advisor
Tromple - Whenever Adarkar Vitionary deals combat damage to a player, put a +1/+1 counter on it.
Whenever a creature you control with a +1/+1 counter on it dies, you may draw a card.
3/3
It's funny that it's decided that Tromple is the official name for what is unofficially known as the "Slith" ability.
On the whole though, this card is just... perfectly designed. Would make a fun EDH deck with Arcbound creatures.
I know! I was surprised by that one as well. It not only has tromple, it also synergizes with other creatures that have tromple.
Okay, just one more, then I need to get back to work. "Legendary." That's right. We now have an infinite source of EDH commanders.
Akroan Mountail WWW
Legendary Creature - Human Monk
Landfall - Whenever a land enters the battlefield under your control, you may put a +1/+1 counter on Akroan Mountail.
3/3
Arcbound Konda 2RRR
Legendary Creature - Human Soldier
First strike
Creatures your opponents control lose first strike and deathtouch.
6/1
Valira's Disciple 1WW
Legendary Creature - Human Spellshaper RW, T, Discard a card: The next time a source of your choice would deal damage to you this turn, prevent that damage.
2/2
Auriok Survivors 1(U/B)(U/B)(U/B)
Legendary Creature - Human Wizard UU, T: Look at the top card of your library. If it's an instant or sorcery card, reveal it, then shuffle your library and put that card on top of it.
3/3
#It just can't resist the urge to fit a shuffle into the card somewhere.
Rage Cavalry 4GGG
Legendary Creature - Spirit
Bestow 5W (If you cast this card for its bestow cost, it's an Aura spell with enchant creature. It becomes a creature again if it's not attached to a creature.)
Enchanted creature gets +3/+3 and has flying.
7/7
Medicine Dragon 3UR
Legendary Creature - Dragon Spirit
Flying
Whenever Medicine Dragon deals combat damage to a creature, tap that creature and it doesn't untap during its controller's next untap step.
4/4
Kalitas, Ghost Marshal 2BR
Legendary Creature - Dwarf Soldier
Sacrifice a Goblin: Each other player loses 2 life.
1/1
Oh, and if I run my routine on the artifacts/enchantments only network...
Serra's Embrace 4
Legendary Artifact
At the beginning of your upkeep, if you have 20 or more life, you win the game.
Infinite Wings 2
Legendary Artifact - Equipment
Equipped creature gets +1/+0 and has first strike.
Whenever equipped creature dies, return that card to the battlefield under its owner's control.
Equip 1
Lifegift 1BB
Legendary Enchantment
At the beginning of your upkeep, you may put a $TYPE counter on Lifegift .
Remove a $TYPE counter from Lifegift : Search your library for an enchantment card and reveal that card. Put it into your hand. Then shuffle your library.
Seal of Protection: Artifacts 2B
Legendary Enchantment - Aura
Enchanted creature gets +3/+3.
When enchanted creature dies, choose a creature type. Creatures of the chosen type don't untap during their controllers' untap steps.
At the beginning of your upkeep, if you have seven or more cards in hand, Seal of Protection: Artifacts deals 2 damage to target creature or player.
#I assume the death effect lasts forever. Forever shall they mourn the loss of your creature!
Medicine Dragon 3UR
Legendary Creature - Dragon Spirit
Flying
Whenever Medicine Dragon deals combat damage to a creature, tap that creature and it doesn't untap during its controller's next untap step.
4/4
That's some medicine.
Seal of Protection: Artifacts 2B
Legendary Enchantment - Aura
Enchanted creature gets +3/+3.
When enchanted creature dies, choose a creature type. Creatures of the chosen type don't untap during their controllers' untap steps.
At the beginning of your upkeep, if you have seven or more cards in hand, Seal of Protection: Artifacts deals 2 damage to target creature or player.
#I assume the death effect lasts forever. Forever shall they mourn the loss of your creature!
I hope it does last forever. Maybe it would be best worded as a "while exiled" thing and make the enchantment exile when the enchanted creature dies or maybe it just turns into a regular enchantment.
Private Mod Note
():
Rollback Post to RevisionRollBack
Why did I ever think a signature in comic sans was a good idea?
Now that I think about it, there's only ever been one Legendary Aura, so the network doesn't have a lot to go on. But it understands that "Legendary" means make the card very inexpensive or very expensive and fill it with elaborate and clever text. That means we should be able to get Legendary Instants and Sorceries this way (for whatever that means). I'll have to try that later.
Oh, I have so many ideas that I have to try now that I know priming the network in mid-sequence works so well.
Amazing. Every time I think we've come to the pinnacle of design-by-AI, you introduce something that propels it even further.
Haha, no problem. And trust me, we've only begun to scratch the surface. With more sophisticated techniques and more computational resources, we can achieve so much more than what we have. But what we have now is pretty impressive just as is.
Adarkar Vitionary 4WW
Legendary Creature Human Advisor
Tromple - Whenever Adarkar Vitionary deals combat damage to a player, put a +1/+1 counter on it.
Whenever a creature you control with a +1/+1 counter on it dies, you may draw a card.
3/3
It's funny that it's decided that Tromple is the official name for what is unofficially known as the "Slith" ability.
On the whole though, this card is just... perfectly designed. Would make a fun EDH deck with Arcbound creatures.
I know! I was surprised by that one as well. It not only has tromple, it also synergizes with other creatures that have tromple.
So does that mean Slith Predator has trample and tromple?
Okay, just one more, then I need to get back to work. "Legendary." That's right. We now have an infinite source of EDH commanders.
Kalitas, Ghost Marshal 2BR
Legendary Creature - Dwarf Soldier
Sacrifice a Goblin: Each other player loses 2 life.
1/1
Hot damn, that's a fine-ass commander right there. Quite possibly ba-roken. Generate a horde of Goblin tokens, bring this guy out of your command zone, and the game's over unless someone can hit him with some kind of removal with like Split Second or what have you. Probably needs a fairly high mana cost added to it, like 2RB or so.
Infinite Wings 2
Legendary Artifact - Equipment
Equipped creature gets +1/+0 and has first strike.
Whenever equipped creature dies, return that card to the battlefield under its owner's control.
Equip 1
Should be flying rather than/as well as first strike, but yep, those wings are pretty infinite.
Lifegift 1BB
Legendary Enchantment
At the beginning of your upkeep, you may put a $TYPE counter on Lifegift .
Remove a $TYPE counter from Lifegift : Search your library for an enchantment card and reveal that card. Put it into your hand. Then shuffle your library.
Stronk. I like how you can save up the counters and search for several cards all at once, which I don't think is a particularly common mechanic, if it's been done at all. Synergizes really well with "discard your hand" effects/costs.
Seal of Protection: Artifacts 2B
Legendary Enchantment - Aura
Enchanted creature gets +3/+3.
When enchanted creature dies, choose a creature type. Creatures of the chosen type don't untap during their controllers' untap steps.
At the beginning of your upkeep, if you have seven or more cards in hand, Seal of Protection: Artifacts deals 2 damage to target creature or player.
#I assume the death effect lasts forever. Forever shall they mourn the loss of your creature!
Has nothing to do with protection or artifacts, but there's some interesting design space here. Having it fall off and turn into a global enchantment on creature death as another poster suggested sounds like the best way to work out the second ability.
Make a program that generates a bare bone set skeleton - and then use that set skeleton to prime cards. For example the set skeleton would call for an uncommon green creature with a CMC of 4 - prime the AI to make that card. In theory you are basically using one AI to prime the other AI to generate set. . .
Pretty much, yes. My ultimate goal is to have a system that churns out full-fledged sets with their own mechanics and so on. I would like to have a program for generating a set skeleton that can serve as a director for the network, steering it in the right direction as it generates the cards, so that it fills out the set as intended.
For example, say we make up a keyword name. The AI comes up with a definition for that keyword. Then we force the AI to use that keyword in many different situations at common, uncommon, and rare, in order to fill out the set. Same could be said for creature types or any other salient features. So with relatively little prompting and the right skeleton, we should be able to generate a coherent set.
Victory for me will be when I've had the opportunity to host a draft using a set of machine-generated cards, lol.
EDIT: So much to be done. I prime with "Level up", and I just get level up creatures. Or I put in "Contrive {1}{U}{U} (You may cast this spell for its Contrive cost. If you do, copy" and I get to see how it finishes that sentence:
* copy that spell unless its controller pays {3}.
* copy it for each age counter on it.
* copy that spell for each creature card in your graveyard.
Just as a test of concept, before you make a coherent set that has its own unique mechanics, make a script that would prime the AI to generate a set and see if the power between commons/rares is balanced or not.
Additionally, it might be interesting and tricky to see if you can make a script program that can script dual-colored draft strategies to properly prime your cards?
Either way - I am excited for the creation of the first RNN Set
I'm not aware if there's a link to whatever you're training the network with; are the quick excerpts from a few messages ago representative of the format you're using or is it already a post-processed step? I tought you had picked on the suggestion to compress the entries as much as possible by replacing every vocabulary word / nuclear expression with a very short code word, and I wanted to know how this would look like, but it looks like you didn't after all.
I haven't yet. Testing that out is on the agenda, however.
So it doesn't catch that ony equipments have equip costs? Just make a drastic change on the syntax of equipment cards. Only creatures have P/T? Try a creature(p/t)-style syntax. It's good to know that segregation of card types work, but it's a pity that cards mechanics are separated at the same time, when you said yourself that segregation should happen automatically.
It can and does happen automatically. The segregation just makes things go faster. This whole process could work without the deliberate fragmentation, however, it makes the learning process easier because it gives cues that the network can pick up on. This is important if you're operating with fewer computational resources than you'd like to have, as in my case.
Different card types _could_ have different general syntax, not necesserarily mimicking the human-readable card layout. It's also a pity that no card should handle several types of counters, I'm feeling it's too soon to give up on that, all the more since it's easy to fix that when broken.
Anyway, someone please shut this annoying intuition of mine up.
Your intuitions are on point, actually. It just that we have limitations in terms of time/space resources. I can give you a robust solution without any finessing if you're willing to wait a month, but I like turn around times of hours, not weeks, so sometimes I have to cut corners.
Also, for mana costs, why not try |11UB| syntax? Shouldn't this go at the end of the card right before the name?
The further things are set apart physically, the harder it is for the network to connect them. The mana cost and the function of a card are closely related things, and I wanted to make sure that the network knew that it was producing a blue card or a green card before it jumped into the text body.
EDIT: As for the simpler syntax, I agree. I was mostly just using the syntax taken from the JSON document. I can and probably should reformat that at some point
About reminder texts: if you remove the reminder text, you're not letting the network learn from the description of the effect.
EDIT: I'll get back with you later, have to run for now.
EDIT(2): And I'm back! To answer that point, the problem we're seeing with the reminder text is that it's too consistent from one card to the next and that just encourages the network to blindly memorize the contents. The reminder text becomes just a ritual incantation rather than a thought out decision.
I wonder if it's not cheating to define "tromple" like this. If it's come up with it once, it should come up with it another time, at least after learning is finished! Just wait for it you unbeliever!
Haha, believe me, I understand. You make a legitimate point. At the same time, I also detect some unspoken concerns, and it would be good for me to address them rather than leave them unvoiced. Namely, are we selling the network short if we try to constrain it to produce output? Would it not be better to give it complete, free reign to act?
The problem is that the network, as it is currently designed, is fundamentally incapable of long-term planning. That's still very much an open problem in the machine learning community.
It acts like a dreamer, existing purely in the moment of the dream and being carried along by the currents of impulse. There is a Nietzchean dynamic at play here between Apollo (order) and Dionysus (entropy); too much of one or the other and you get very dissatisfying results, and neither really aim to advance us towards some grand conclusion.
At the very least, we shouldn't expect the network to produce a full-fledged set of cards, even given infinite time, because its attention span is so short that the moment it comes up with a great idea for a mechanic, it quickly dispenses with it and moves on to a completely different idea.
So some amount of guidance is going to be needed if we want coherency that spans multiple cards. I mean, the alternative is to have an AI that doesn't just know how cards are structured, but that also knows how to play the game and can actively consider the cards that it creates in the context of the game. But that would be a massive undertaking that goes far beyond the scope of what we're doing here. No, the network is just very adept at identifying and mimicking patterns, which makes it well-suited for this application.
And don't apologize for the rant! It's good to get input from everyone. I appreciate it, I really do.
I finally got a chance to sample my network that's been running all weekend on the souped-up VM....
And it's producing garbage. Not like, "mountainspalk,tromple you may deal two damage to target spell with converted mana cost of blue or less and then shuffle the cards in your hand (they was kicked)" garbage, but like "oiwerasfds qwtawfodsij awaedfdsok | iojpadsfsfad |" kind of garbage.
The command I used to train was:
"th train.lua -data_dir data/mtg -gpuid -1 -rnn_size 1024 -num_layers 5 -dropout .5"
I have no idea what went wrong.
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, your examples about priming got me thinking about the possibility be of generating Planeswalkers? If we fed it only planeswalker cards to train, we would get a pretty incestuous recycling of abilities (it would just jumble around the same effects from the limited number of planeswalker cards). However, if we Train the system off of a modern collection of creatures/artifacts/enchantments/planeswalkers, and then prime it to reward planeswalkers words/phrases, could we get the system to generate a bunch of Generated Planeswalkers with 3-4 abilities?
Further thoughts on Planeswalkers: the system may have difficulty understanding how the Loyalty and +1 -2 and Ultimate abilities work. We might reformat the Planeswalkers data to look like they have Power/Toughness, and then treat the +1 -2 as removing a $TYPE counter. But then again it did start to figure out Leveling abilities so who knows.
Talcos, your examples about priming got me thinking about the possibility be of generating Planeswalkers? If we fed it only planeswalker cards to train, we would get a pretty incestuous recycling of abilities (it would just jumble around the same effects from the limited number of planeswalker cards). However, if we Train the system off of a modern collection of creatures/artifacts/enchantments/planeswalkers, and then prime it to reward planeswalkers words/phrases, could we get the system to generate a bunch of Generated Planeswalkers with 3-4 abilities?
Further thoughts on Planeswalkers: the system may have difficulty understanding how the Loyalty and +1 -2 and Ultimate abilities work. We might reformat the Planeswalkers data to look like they have Power/Toughness, and then treat the +1 -2 as removing a $TYPE counter. But then again it did start to figure out Leveling abilities so who knows.
I'm on the same page with you on this. This was one of the first things that came to mind for me this afternoon.
Last week I coded a routine that would produce generic planeswalkers who had abilities taken from other cards, with loyalty costs scaled to the mana cost of the spell or ability that I stole it from. So we can assemble a green planeswalker out of a hodgepodge of green spells and abilities. That sort of thing. I think that might be a good start. Just to show it that a planeswalker has a certain form, and that the abilities can be virtually anything that could be fit onto any other card. If I have time, I plan on investigating that matter further. For other card types, like creatures and such, we already have a great deal to go on, and the pre-training I did with generic creatures was just to push the network to learn about the curves for power, toughness, CMC, etc. The planeswalker training will need to teach structure as well as content.
I finally got a chance to sample my network that's been running all weekend on the souped-up VM....
And it's producing garbage. Not like, "mountainspalk,tromple you may deal two damage to target spell with converted mana cost of blue or less and then shuffle the cards in your hand (they was kicked)" garbage, but like "oiwerasfds qwtawfodsij awaedfdsok | iojpadsfsfad |" kind of garbage.
The command I used to train was:
"th train.lua -data_dir data/mtg -gpuid -1 -rnn_size 1024 -num_layers 5 -dropout .5"
I have no idea what went wrong.
Seriously? That's rather interesting. Do you have a log of the training? Like the scoring at each batch? Even if not, that's fine.
Also, did the training complete? Admittedly, it's a larger network, so if the input is too small, it's got a lot of neurons in there that could use some tweaking. What happens if you sample at obscenely low temperatures?
EDIT: Whoops, double posted again. My bad. I try to avoid that.
EDIT (2): Whatever happens, keep the network checkpoints. We may be able to feed it more data in the near future to stabilize it, lol. I might be able to conjure up some more scripts for you to accomplish that.
Seriously? That's rather interesting. Do you have a log of the training? Like the scoring at each batch? Even if not, that's fine.
Also, did the training complete? Admittedly, it's a larger network, so if the input is too small, it's got a lot of neurons in there that could use some tweaking. What happens if you sample at obscenely low temperatures?
EDIT: Whoops, double posted again. My bad. I try to avoid that.
The training was about half complete.
Here's my last half-dozen or so training logs:
Hey all! Back from my business trip and interested to catch up on what's going on.
In the meanwhile, I've taken Onzerzeeboot's input file, modified it, tweaked it, played around with it, and changed it into a .CSV
This should allow for slightly easier manipulation of the input text (since it's in CSV form). I've also done the $TYPE counter swap (Except for Poison counters and +-x/+-x counters) and fixed the rules text for some cards to use $THIS instead of their actual name. Hopefully that will allow the RNN to catch on to some concepts a little faster.
Something IS wrong. I'm not entirely sure what would cause that, except the possibility that the network was so large that... well, I'd have to think on that one. But save the checkpoints. We may be able to resuscitate your network. I would hate to let any of that hard work go to waste. I'll be thinking about your problem.
By the way (and this is addressing everyone), I'm having way too much fun right now. Especially when it takes an idea and goes in the opposite direction of what I had intended.
Familia Spirit 2R
Creature - Goblin Knight
Planetouched - When Familia Spirit enters the battlefield, if you control a Planeswalker, sacrifice it.
2/2
#... not exactly what I had in mind.
Currently Playing:
Legacy: Something U/W Controlish
EDH Cube
Hypercube! A New EDH Deck Every Week(ish)!
EDIT: It's really hackish at this point. I'm sure I could make it so you could put in your own restrictions from the command line, when I can find the time to do that. But it's good to know that that will work.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Amazing. Can you prime it with Commander legends?
EDIT: Heck, you could prime it with novel abilities of your own design.
"Retribution ? If $THIS dies this turn,"
Creature Spirit | {11}{B} | 2/2 | Retribution ? If $THIS dies this turn, put a 1/1 black Bat creature token with flying onto the battlefield. | Purrad Inquisitor ||E S|| Creature Ogre Warrior | {111}{R}{R} | 5/3 | Retribution ? If $THIS dies this turn, sacrifice it unless you discard a card. | Mardu Scout ||E S|| Creature Vedalken Wizard | {1}{U} | 1/1 | Retribution ? If $THIS dies this turn, put two 2/2 black Zombie creature tokens onto the battlefield.
When a Dragon enters the battlefield that's a Mononos counter on $THIS.
At the beginning of your upkeep, you may draw a card for each color among permanents you control. | Ronom Angel ||E S|| Creature Illusion | {11}{U} | 2/1 | Retribution ? If $THIS dies this turn, put three +1/+1 counters on $THIS. | Returned Cathar ||E
Oh. my. god. That is too good! I can introduce abilities it's never seen before and it just... understands them! Haha!!
EDIT(2):
Prime with "Ungodly ? Whenever $THIS attacks", and we get...
S|| Creature Cat Soldier | {11}{W} | 2/2 | Ungodly ? Whenever $THIS attacks, target creature you control gains flying until end of turn. | Gravecrawler ||E S|| Creature Human Warrior | {111}{R} | 3/2 | Ungodly ? Whenever $THIS attacks, it gets +2/+0 until end of turn. | Beacon Hawk ||E S|| Creature Illusion | {1}{U} | 1/1 | Ungodly ? Whenever $THIS attacks, it doesn't untap during its controller's next untap step. | Serra Avenger ||E
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Someone tell Rosewater he's officially out of a job.
Could you start it off by giving a card a name, mana cost, power/toughness, creature type, and let it go from there?
EDIT: Okay, one more, tromple. But let's phrase it as "Tromple ?", where ? is a long dash.
S|| Legendary Creature Human Advisor | {1111}{W}{W} | 3/3 | Tromple ? Whenever $THIS deals combat damage to a player, put a +1/+1 counter on it.
Whenever a creature you control with a +1/+1 counter on it dies, you may draw a card. | Adarkar Vitionary ||E S|| Creature Goblin | {1}{R} | 1/2 | Tromple ? As long as you control your commander, $THIS gets +2/+2 and has "When $THIS dies, exile it, then return a creature card at random from your graveyard to your hand. | Deathfele Witch ||E S|| Creature Hound | {11}{G} | 2/2 | Tromple ? As long as you have no cards in hand, $THIS gets +1/+1, is black, and has "{T}: Add {1} to your mana pool. | Riddlesmith ||E
And now we get definitions for tromple, so we can pick our favorite and run with it! Finally, an explanation for tromple from the network itself.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Currently Playing:
Legacy: Something U/W Controlish
EDH Cube
Hypercube! A New EDH Deck Every Week(ish)!
It's funny that it's decided that Tromple is the official name for what is unofficially known as the "Slith" ability.
On the whole though, this card is just... perfectly designed. Would make a fun EDH deck with Arcbound creatures.
I wouldn't say it's "perfectly" designed, as that last ability is almost certainly Blue, Black, or Green, but definitely not white. It's definitely interesting though.
Currently Playing:
Legacy: Something U/W Controlish
EDH Cube
Hypercube! A New EDH Deck Every Week(ish)!
Haha, no problem. And trust me, we've only begun to scratch the surface. With more sophisticated techniques and more computational resources, we can achieve so much more than what we have. But what we have now is pretty impressive just as is.
I know! I was surprised by that one as well. It not only has tromple, it also synergizes with other creatures that have tromple.
Okay, just one more, then I need to get back to work. "Legendary." That's right. We now have an infinite source of EDH commanders.
Akroan Mountail
WWW
Legendary Creature - Human Monk
Landfall - Whenever a land enters the battlefield under your control, you may put a +1/+1 counter on Akroan Mountail.
3/3
Arcbound Konda
2RRR
Legendary Creature - Human Soldier
First strike
Creatures your opponents control lose first strike and deathtouch.
6/1
Valira's Disciple
1WW
Legendary Creature - Human Spellshaper
RW, T, Discard a card: The next time a source of your choice would deal damage to you this turn, prevent that damage.
2/2
Auriok Survivors
1(U/B)(U/B)(U/B)
Legendary Creature - Human Wizard
UU, T: Look at the top card of your library. If it's an instant or sorcery card, reveal it, then shuffle your library and put that card on top of it.
3/3
#It just can't resist the urge to fit a shuffle into the card somewhere.
Rage Cavalry
4GGG
Legendary Creature - Spirit
Bestow 5W (If you cast this card for its bestow cost, it's an Aura spell with enchant creature. It becomes a creature again if it's not attached to a creature.)
Enchanted creature gets +3/+3 and has flying.
7/7
Medicine Dragon
3UR
Legendary Creature - Dragon Spirit
Flying
Whenever Medicine Dragon deals combat damage to a creature, tap that creature and it doesn't untap during its controller's next untap step.
4/4
Kalitas, Ghost Marshal
2BR
Legendary Creature - Dwarf Soldier
Sacrifice a Goblin: Each other player loses 2 life.
1/1
Oh, and if I run my routine on the artifacts/enchantments only network...
Serra's Embrace
4
Legendary Artifact
At the beginning of your upkeep, if you have 20 or more life, you win the game.
Infinite Wings
2
Legendary Artifact - Equipment
Equipped creature gets +1/+0 and has first strike.
Whenever equipped creature dies, return that card to the battlefield under its owner's control.
Equip 1
Lifegift
1BB
Legendary Enchantment
At the beginning of your upkeep, you may put a $TYPE counter on Lifegift .
Remove a $TYPE counter from Lifegift : Search your library for an enchantment card and reveal that card. Put it into your hand. Then shuffle your library.
Seal of Protection: Artifacts
2B
Legendary Enchantment - Aura
Enchanted creature gets +3/+3.
When enchanted creature dies, choose a creature type. Creatures of the chosen type don't untap during their controllers' untap steps.
At the beginning of your upkeep, if you have seven or more cards in hand, Seal of Protection: Artifacts deals 2 damage to target creature or player.
#I assume the death effect lasts forever. Forever shall they mourn the loss of your creature!
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
That's some medicine.
I hope it does last forever. Maybe it would be best worded as a "while exiled" thing and make the enchantment exile when the enchanted creature dies or maybe it just turns into a regular enchantment.
Oh, I have so many ideas that I have to try now that I know priming the network in mid-sequence works so well.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Hot damn, that's a fine-ass commander right there. Quite possibly ba-roken. Generate a horde of Goblin tokens, bring this guy out of your command zone, and the game's over unless someone can hit him with some kind of removal with like Split Second or what have you. Probably needs a fairly high mana cost added to it, like 2RB or so.
Nope, not broken at all...
Should be flying rather than/as well as first strike, but yep, those wings are pretty infinite.
Stronk. I like how you can save up the counters and search for several cards all at once, which I don't think is a particularly common mechanic, if it's been done at all. Synergizes really well with "discard your hand" effects/costs.
Has nothing to do with protection or artifacts, but there's some interesting design space here. Having it fall off and turn into a global enchantment on creature death as another poster suggested sounds like the best way to work out the second ability.
Make a program that generates a bare bone set skeleton - and then use that set skeleton to prime cards. For example the set skeleton would call for an uncommon green creature with a CMC of 4 - prime the AI to make that card. In theory you are basically using one AI to prime the other AI to generate set. . .
could that work?
Currently Playing:
Legacy: Something U/W Controlish
EDH Cube
Hypercube! A New EDH Deck Every Week(ish)!
For example, say we make up a keyword name. The AI comes up with a definition for that keyword. Then we force the AI to use that keyword in many different situations at common, uncommon, and rare, in order to fill out the set. Same could be said for creature types or any other salient features. So with relatively little prompting and the right skeleton, we should be able to generate a coherent set.
Victory for me will be when I've had the opportunity to host a draft using a set of machine-generated cards, lol.
EDIT: So much to be done. I prime with "Level up", and I just get level up creatures. Or I put in "Contrive {1}{U}{U} (You may cast this spell for its Contrive cost. If you do, copy" and I get to see how it finishes that sentence:
* copy that spell unless its controller pays {3}.
* copy it for each age counter on it.
* copy that spell for each creature card in your graveyard.
Wow, I could do this all day.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Additionally, it might be interesting and tricky to see if you can make a script program that can script dual-colored draft strategies to properly prime your cards?
Either way - I am excited for the creation of the first RNN Set
I haven't yet. Testing that out is on the agenda, however.
It can and does happen automatically. The segregation just makes things go faster. This whole process could work without the deliberate fragmentation, however, it makes the learning process easier because it gives cues that the network can pick up on. This is important if you're operating with fewer computational resources than you'd like to have, as in my case.
Your intuitions are on point, actually. It just that we have limitations in terms of time/space resources. I can give you a robust solution without any finessing if you're willing to wait a month, but I like turn around times of hours, not weeks, so sometimes I have to cut corners.
The further things are set apart physically, the harder it is for the network to connect them. The mana cost and the function of a card are closely related things, and I wanted to make sure that the network knew that it was producing a blue card or a green card before it jumped into the text body.
EDIT: As for the simpler syntax, I agree. I was mostly just using the syntax taken from the JSON document. I can and probably should reformat that at some point
EDIT: I'll get back with you later, have to run for now.
EDIT(2): And I'm back! To answer that point, the problem we're seeing with the reminder text is that it's too consistent from one card to the next and that just encourages the network to blindly memorize the contents. The reminder text becomes just a ritual incantation rather than a thought out decision.
Haha, believe me, I understand. You make a legitimate point. At the same time, I also detect some unspoken concerns, and it would be good for me to address them rather than leave them unvoiced. Namely, are we selling the network short if we try to constrain it to produce output? Would it not be better to give it complete, free reign to act?
The problem is that the network, as it is currently designed, is fundamentally incapable of long-term planning. That's still very much an open problem in the machine learning community.
It acts like a dreamer, existing purely in the moment of the dream and being carried along by the currents of impulse. There is a Nietzchean dynamic at play here between Apollo (order) and Dionysus (entropy); too much of one or the other and you get very dissatisfying results, and neither really aim to advance us towards some grand conclusion.
At the very least, we shouldn't expect the network to produce a full-fledged set of cards, even given infinite time, because its attention span is so short that the moment it comes up with a great idea for a mechanic, it quickly dispenses with it and moves on to a completely different idea.
So some amount of guidance is going to be needed if we want coherency that spans multiple cards. I mean, the alternative is to have an AI that doesn't just know how cards are structured, but that also knows how to play the game and can actively consider the cards that it creates in the context of the game. But that would be a massive undertaking that goes far beyond the scope of what we're doing here. No, the network is just very adept at identifying and mimicking patterns, which makes it well-suited for this application.
And don't apologize for the rant! It's good to get input from everyone. I appreciate it, I really do.
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 it's producing garbage. Not like, "mountainspalk,tromple you may deal two damage to target spell with converted mana cost of blue or less and then shuffle the cards in your hand (they was kicked)" garbage, but like "oiwerasfds qwtawfodsij awaedfdsok | iojpadsfsfad |" kind of garbage.
The command I used to train was:
"th train.lua -data_dir data/mtg -gpuid -1 -rnn_size 1024 -num_layers 5 -dropout .5"
I have no idea what went wrong.
Currently Playing:
Legacy: Something U/W Controlish
EDH Cube
Hypercube! A New EDH Deck Every Week(ish)!
Further thoughts on Planeswalkers: the system may have difficulty understanding how the Loyalty and +1 -2 and Ultimate abilities work. We might reformat the Planeswalkers data to look like they have Power/Toughness, and then treat the +1 -2 as removing a $TYPE counter. But then again it did start to figure out Leveling abilities so who knows.
I'm on the same page with you on this. This was one of the first things that came to mind for me this afternoon.
Last week I coded a routine that would produce generic planeswalkers who had abilities taken from other cards, with loyalty costs scaled to the mana cost of the spell or ability that I stole it from. So we can assemble a green planeswalker out of a hodgepodge of green spells and abilities. That sort of thing. I think that might be a good start. Just to show it that a planeswalker has a certain form, and that the abilities can be virtually anything that could be fit onto any other card. If I have time, I plan on investigating that matter further. For other card types, like creatures and such, we already have a great deal to go on, and the pre-training I did with generic creatures was just to push the network to learn about the curves for power, toughness, CMC, etc. The planeswalker training will need to teach structure as well as content.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.
Seriously? That's rather interesting. Do you have a log of the training? Like the scoring at each batch? Even if not, that's fine.
Also, did the training complete? Admittedly, it's a larger network, so if the input is too small, it's got a lot of neurons in there that could use some tweaking. What happens if you sample at obscenely low temperatures?
EDIT: Whoops, double posted again. My bad. I try to avoid that.
EDIT (2): Whatever happens, keep the network checkpoints. We may be able to feed it more data in the near future to stabilize it, lol. I might be able to conjure up some more scripts for you to accomplish that.
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 training was about half complete.
Here's my last half-dozen or so training logs:
I tried sampling at temp = 1 and temp = .8. I'm running a temp = .1 now, and it looks like it spit out a 'd' followed by 4999 spaces.
Something is clearly amiss.
Currently Playing:
Legacy: Something U/W Controlish
EDH Cube
Hypercube! A New EDH Deck Every Week(ish)!
In the meanwhile, I've taken Onzerzeeboot's input file, modified it, tweaked it, played around with it, and changed it into a .CSV
This should allow for slightly easier manipulation of the input text (since it's in CSV form). I've also done the $TYPE counter swap (Except for Poison counters and +-x/+-x counters) and fixed the rules text for some cards to use $THIS instead of their actual name. Hopefully that will allow the RNN to catch on to some concepts a little faster.
.CSV is available here.
If anyone has any suggestions or modifications to that, please feel free to hit me up.
By the way (and this is addressing everyone), I'm having way too much fun right now. Especially when it takes an idea and goes in the opposite direction of what I had intended.
Familia Spirit
2R
Creature - Goblin Knight
Planetouched - When Familia Spirit enters the battlefield, if you control a Planeswalker, sacrifice it.
2/2
#... not exactly what I had in mind.
My LinkedIn profile... thing (I have one of those now!).
My research team's webpage.
The mtg-rnn repo and the mtg-encode repo.