We have updated our Terms of Service and Privacy Policy.
Dismiss
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next
  • 0

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Elseleth »
    I saw your comment on the repo that the Energy symbol conflicts with the E rarity symbol. Is that a problem in mtgjson, then? I'm having trouble even finding what rarity "E" is, so I imagine there aren't too many of those...
    This is just a (very minor) internal thing. E is the marker that I use to indicate "special" rarity. I originally chose it because it wasn't being used for anything else, but that's no longer the case, so it might make sense to change it to avoid ambiguity, though I'd be very surprised if the effect would even be noticeable. More of a consistency thing.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    I've pulled most of Elseleth's updates into the main mtgencode repo and pushed an updated output.txt generated from the most recent mtgjson version 3.8.

    I'm going to hold off for now on the change to strip ability words, pending a full overhaul of my neural network libraries that would allow me to test it. An option to do something similar will probably be implemented at some point, along with some options to control stripping or forcing reminder text.

    It is not clear to me if "extra verbiage" has a mechanical benefit or not. Yes, it's more for the language model to learn, but it's also more that the language model can learn from. We're at the point where the capabilities of hardware far exceed the size of our dataset, so throwing in extra words that might have some relationship to functionality could actually be beneficial. Heck, it could even be beneficial to throw in flavor text.

    On a side note, it turns out mtgjson is also open source. They get their data directly from gatherer, which can cause issues when gatherer has inaccuracies, lol. Also, is anyone still working on generating artwork? I was not previously aware of mtg.wtf, but it looks like a very convenient source of card pictures (and other mtgjson-derived data). I may have to modify the html spoilers to take advantage of it.
    Posted in: Custom Card Creation
  • 0

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from maplesmall »
    That... seems like a hell of a script. I wouldn't even know where to start with something like that, but I've never worked with advanced python IO, so there's that. What kind of interface would the rnn library need to support this?
    Basically, the rnn library needs to be able to launch a Python script, and then read input from multiple IO streams. My current version uses low-level posix file operations, which works fine on linux, but there's probably a more portable way to do it with python. The fun part is coordinating so that the streamer knows when it should exit, either when training is done or if the rnn library crashes for some reason.

    It's not really that complicated, but it can be tricky to get it to work right if you aren't using some kind of specialized library to coordinate IO. Hopefully it's not to hard to build the APIs, and then users can just edit config files and run the script and not have to care about the gory details.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from maplesmall »
    What does this do exactly? Opening a file is pretty simple conceptually; you open a book and read the pages. This streaming over channels is more like having the individual pages shot at you all at once. What advantages, concretely, does it convey over just opening the .txt file of the corpus and splitting it up based on our categories? When you say 'custom, dynamic training regimen', I don't see why that can't be applied to a properly parsed .txt corpus file.
    Training with minibatches is not like opening a single book - it's more like opening 50 or 100 books at once, depending on the value of batch_size, and reading all of them simultaneously. Ideally, each book should be infinitely long, and the data should be continuous; there shouldn't be any places where the sequence stops and restarts like you get in char-rnn when you reach the end of a segment and have to go back and start over from the beginning.

    You're absolutely right, a relatively simple parser can take a text file, split it up into pieces, and spit out 50 or 100 continuous infinite streams of the data it contains. But this parser has to do more than just open the file, it's not a trivial program. You can't encode 50 infinite, continuous streams directly as a text file. If you make the mechanism general, then you can use a more complicated parser if you want to: maybe you train the first 10,000 batches on cards legal in Modern only, and then throw in the rest of the cards and train for another 10,0000 batches. That's a very simple instance of curriculum learning. Maybe you use a distribution of 75% cards from Modern and 25% cards not from Modern, even though those aren't the actual ratios in the training data. Maybe you even look at the output of the network periodically during training to figure out what distribution to use.

    The streamer script I mentioned would be implemented in Python, so it would be portable to Windows. It fills the role of the parser. Separating the programs and having the parser be its own Python script would mean that the logic to determine the training curriculum could live in mtgencode, not with a specific rnn implementation, and then any rnn library that supported the interface could use it. Supporting the interface should be much, much easier than porting the whole streamer script / parser.

    Quote from maplesmall »
    I was afraid they would add something new like that. The github way to add stuff to my repo is to submit a pull request. If it's just a minor change, it might not be worth the effort. I'll have time to look at it later this week.
    It's trivial; basically wherever you define other symbols, you just add definitions for C and E. Not really worth making a pull request over.
    Cool, that's what I was hoping. Shouldn't be a big deal for me to implement the change.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from maplesmall »
    Talcos just showed me this paper; imagine its results applied to MTG art.
    ...Wow! That is very impressive.
    Quote from maplesmall »
    Does your code support new stuff like {C} and {E}? I know my local copy of mtg-encode does, but I wasn't able to do a thing with git to apply the changes to your repo.
    No, it doesn't yet, I haven't looked at it in a while. I was afraid they would add something new like that. The github way to add stuff to my repo is to submit a pull request. If it's just a minor change, it might not be worth the effort. I'll have time to look at it later this week.
    Quote from maplesmall »
    What is this new library you speak of? Is it more effective at generation than mtg-rnn?
    The new library is here, cleverly hidden behind the "dev" branch on the github repo. It's based on torch-rnn, which is essentially the successor to char-rnn, providing the same capabilities but faster and more efficiently. I used it for a couple of different projects, so I built a more general-purpose interface that gives you more control during training and lets you do more advanced language model things other than just generating text.

    The problem with stock char-rnn is that it doesn't give you enough control of the training process. It slurps up all the text in the training corpus and divides it inefficiently, ignoring information about card boundaries and reusing the same divisions over and over again. Since our data is composed of many short independent segments, we can do much better, which mtg-rnn does manually with a custom data loader.

    The new library is much more powerful. Instead of reading a text file, it can invoke a linux program that streams training text over a variable number of channels. This is nice because you can write whatever custom, dynamic training regimen you want, and you don't have to do it in Torch7 lua, which is not my favorite language for string processing.

    The drawback is that writing the program to provide the corpus is hard, because getting all of the interprocess communication stuff right is kind of tricky. To make things easier, I had intended to write a single streamer script that would just take a corpus specified as a directory tree of text files and configuration options, and figure out how to output the right training streams based on the configuration. This would make it simple to specify things like randomization of independent segments and also do curriculum learning.

    I have some very basic examples in my torch-rnn repo, but nothing particularly usable yet. I hope I'll have some time over the holidays to finish it up. Let me know if you're feeling adventurous and want me to try and explain anything sooner.

    As for Windows support, in principle it should be possible to build a similar input API in TensorFlow (I mean, it's a simple interface, right? Just spawn a program and read a whole bunch of output streams from it...). Then the training curriculum script could even be reused, assuming it was writing in something portable like Python, which is my current language of choice for it. The trickiest part I think will be finding an interprocess communication method that works. Currently I'm using pretty low-level hacks with LuaPosix in Torch7, which probably won't transfer to Windows any better than Torch itself will. TensorFlow is Python though, so it might be a lot easier to build a portable interface. I'll have to look into it.
    Posted in: Custom Card Creation
  • 0

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from maplesmall »
    Hey folks! It's been a while, but I (with a huge amount of help from Talcos) have been working on some pretty interesting stuff involving cards and neural nets. No results yet, but one thing I can say is that image recognition networks have a hell of a hard time distinguishing between Angels and Birds in card art.

    I remember a while back there was a lot of discussion about making the char-rnn stuff run on Windows. For ages, the 'best' option was simply to take a VM and run Ubuntu in that, but that prevents GPU usage. I myself set up a dual-boot to be able to use GPUs in Ubuntu natively. Now, however, Google has blessed us with TensorFlow for Windows, complete with GPU support! My installation experience was pretty trivial. Just download the official Python 3.5 installer, run it, and do the steps in the TF docs. It's one step, really, and make sure you install the GPU version.
    I'm glad there's a viable solution for windows now! I'm also really glad to see that people are still working on this. It would be great to have some kind of plausible art generation, so I can finally write a bash script that prints up a booster box of never before seen cards to draft.

    I haven't worked on my code in a while, but if it would be helpful to people I can do a quick revision to mtgencode to put the latest sets in the default corpus on the github repo. It looks like I should update the tutorial to mention the possibility of using Windows TensorFlow as a backend.

    I also have my own usable but only partially complete and totally undocumented library for doing character-level language model things, which is faster and more flexible than mtg-rnn. I might have a chance to finish that as well over the holidays. It should make it really easy to do things like curriculum learning, but unfortunately it is not Windows friendly. I wonder how hard it would be to port the API over to TensorFlow...
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    I still exist, though unfortunately I've been busy lately working on other things.

    CUDA 8 just came out, along with a compatible version of cudnn. This is particularly exciting to me because I upgraded one of my machines a little while ago - Here's what nvidia-smi has to say about it Smile
    Sun Oct  9 13:29:44 2016       
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 367.48                 Driver Version: 367.48                    |
    |-------------------------------+----------------------+----------------------+
    | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |===============================+======================+======================|
    |   0  TITAN X (Pascal)    Off  | 0000:01:00.0      On |                  N/A |
    | 30%   52C    P0    56W / 250W |   1095MiB / 12180MiB |      0%      Default |
    +-------------------------------+----------------------+----------------------+
    I've been hoping to have some fun with it, but just haven't had a chance yet. I did start the process of updating mtgencode and my fork of torch-rnn to work with the new platform, but it's going to take some time, especially to rewrite the tutorial. I'll try to post developments as they happen.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Uii »
    That aside, how do I build a neural network of my own? I've only briefly touched upon it in college.
    I wrote a tutorial about how to do this here.

    I'm currently working on a new version of the NN training code, which is functional but lacking a few features and any documentation whatsoever. I'll post on here when I update the tutorial to use the new code, in the meantime the old NN code still works.

    You can always post / PM me if you have any questions.
    Posted in: Custom Card Creation
  • 3

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Just wanted to say the new HTML spoilers look really good. I'll try to get the pull request integrated tonight.

    Thanks so much for working on it! Your html/css skills far surpass my own.

    Oh, also, I have some new neural networks that I haven't really showed off yet. I'll try to get some big dumps out of them as well. You'll find 4 big 3MB raw dumps in this folder:

    https://drive.google.com/open?id=0B0sVbHh87RPmSnVzVjNKbDRnZXM

    The networks were big, so they've probably overfit a little bit. Might still be some interesting stuff in there though.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    OOPS. so Yeah, the not loading images of related cards is a HUGE thing. I just formatted a 100k dump with -c and now I can't look up the cards that -c didn't seems to make into links; and I think I got my IP blacklisted at least for now. (its probably an hour long blacklisting, 24 tops)
    @Hardcast: is the -c up to date? is it a trimmed down card list? I seem to have quite a few closest without links, any idea why that might be? i'm making a list of them in case you need them.
    I haven't looked at the code for the -c flag in a while. It should be reasonably up to date. I do recall there being some issues with the links it tries to create not working because the target card images just don't exist on magiccards.info, so that could be what you're seeing. If it's just a few of the links that don't work, I wouldn't worry about it, if it's like half of them I might need to do something else. It's also possible they've changed their formatting or something.

    I think I try to link the 5 most similar cards and the 3 most similar card names when the -c option is enabled, which is probably more than necessary. If there's an easy way to stop the links from trying to load before you actually hover over them, then keeping all of them around is fine, but if it's impractical it's very easy to reduce that to just one or two.
    Quote from reimannsum »
    After even a day that some primitive sorting system for the HTML spoiler would be apricated. By color at the very least. I was already planning on doing that, partly because as I was figuring out the border for each card I had the Idea of coloring the border depending on the card. Maybe not as fancy as actual card borders but some easily identifiable way

    I'll work on a way not have that happen. Then I'll work on the forum spoiler.
    Colored borders would be cool. I started to work on this at one point but gave up because I didn't want to do any more css design than absolutely necessary. Sorting is also super helpful. We can kind of do that already by using MSE2 to browse the cards instead of the .html spoiler, but having something simple for html would be really useful too. I think a combination of basic sorting and pagination would solve the -c image loading issue, if improving the hover overlay is impractical.

    In my experience, sorting by color is the most useful, and then sorting by type. Generally, rarity is less important, as the models aren't particularly good at assigning the right rarity to cards.

    Let me know if you have any questions/issues about the codebase. It's kind of a mess, but having card objects should let you do certain things very easily. For example, you should be able to get the colors of a card object as the field card.cost.colors.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Mr_Gamer_Geek »
    Hey are you guys still here?
    Yes! Unfortunately real life has been interfering with my ability to work on this. However, my quarter just finished, so I should have more free time soon (once I tie up some loose ends with my current research project).
    Quote from reimannsum »
    Also if people want I have some Ideas for improving the HTML spoiler format; although if a database is looking like it is on the way I guess it wont really matter.
    The HTML format is still useful, even if we use a database. When I generate a new batch, it would be a lot faster to just load them up in a browser as a big HTML sheet than to get them all into a database.

    I've some ideas about how I'd like the HTML to look myself, but I've been wary of trying to implement them because I hate web programming. What I really want is to hide a bunch of the diagnostic info, like the most similar cards if that was computed and a copyable forum spoiler, in a separate box that appears when you hover over something. I also want to link hover previews or something for the closest cards in a way that doesn't try to download one image per link when you load the page.

    If you want to implement something, I'd be happy to work on including it in a future version of mtgencode.
    Posted in: Custom Card Creation
  • 4

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Tzarnal »
    At any rate the switch to torch-rnn and multiple streams of input was a bit of a challenge to get working with Buzzbox and took me a good chunk of today but I managed to get it working, start a quick 512 node three layer network and feed it data through -stream_cmd.

    Thanks for your efforts and having this available and documented enough others can make use of it. I hope to get Buzzbox roughly equivalent in functionality to mtgencode and keep it that way in the future.
    Very cool!

    I'm glad my code has proved useful to you, it's always nice to hear that one's work is appreciated.

    I'm also quite impressed that you got it working with -stream_cmd already, considering that the documentation is slightly... nonexistent. Hopefully I'll have time to amend that soon, and also write a new tutorial. Feel free to PM me on here or post an issue against my torch-rnn github if you have any questions or things don't seem to be working as they should.

    On a different note: Would people be interested in having a separate thread for showing off computer generated cards? I was thinking something a little more structured, specifically for hand picked, interesting cards created by neural networks, plus any beautification people want to do like finding art and maybe edits to the text as long as the original neural net output is provided as well.
    Posted in: Custom Card Creation
  • 5

    posted a message on Generating Magic cards using deep, recurrent neural networks
    I trained for another hundred epochs or so: the training loss fell considerably, but I still seem to be getting mostly cards that aren't exact duplicates of real things. Proper validation is still in the works, but here's a few more little dumps.
    tireless fortal 4RW _INVALID_
    (rare)
    Y questep.
    whenever @ is dealt damage, it deals that much damage to target creature or player.
    ~~ closest cards ~~
    Tephraderm: 0.916397739696
    Spitemare: 0.8937371484
    Ghosts of the Innocent: 0.892257843784
    Embermaw Hellion: 0.888465075437
    Repercussion: 0.886893289146
    ~~ closest names ~~
    Teleportal: 0.72
    Tireless Tracker: 0.709677419355
    Tireless Tribe: 0.689655172414

    ghost warden W
    creature ~ dauthi minion (common)
    whenever a forest enters the battlefield, you may gain 1 life.
    (1/1)
    ~~ closest cards ~~
    Soul's Attendant: 0.916209389559
    Leonin Elder: 0.902217266798
    Soul Warden: 0.896742697766
    Deathgreeter: 0.878169167048
    Essence Warden: 0.877520438293
    ~~ closest names ~~
    Ghost Warden: 1.0

    silant 1G
    enchantment (rare)
    sacrifice a forest: put a 0/1 green centaur creature token onto the battlefield.
    ~~ closest cards ~~
    Bestial Menace: 0.919638091697
    Sprout: 0.918925278775
    Seed the Land: 0.908867928026
    Saproling Infestation: 0.905470601968
    Call of the Conclave: 0.901631772109
    ~~ closest names ~~
    Plant: 0.727272727273
    Silk Net: 0.714285714286
    Island: 0.666666666667

    opposition 3BB
    creature ~ viashino shaman (rare)
    kinship ~ 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 discards his or her hand.
    (3/2)
    ~~ closest cards ~~
    Squeaking Pie Grubfellows: 0.983307079537
    Sensation Gorger: 0.978416656109
    Nightshade Schemers: 0.963965855878
    Pyroclast Consul: 0.945469981755
    Ink Dissolver: 0.94343482607
    ~~ closest names ~~
    Opposition: 1.0

    mage~ring bully R
    enchantment ~ aura (common)
    enchant creature
    enchanted creature has first strike as long as you control an urza creature."
    ~~ closest cards ~~
    Mardu Runemark: 0.957568699805
    Favorable Destiny: 0.954880780515
    Snow Devil: 0.950055809304
    Abzan Runemark: 0.939367792997
    Temur Runemark: 0.939172065792
    ~~ closest names ~~
    Mage-Ring Bully: 1.0

    convalescence 1W
    enchantment ~ aura (rare)
    enchant permanent
    first strike
    B: regenerate @.
    non~eye creatures you control all other permanents don't untap during their controllers' untap steps.
    ~~ closest cards ~~
    Blizzard: 0.856291589766
    Intruder Alarm: 0.828945594624
    Arena of the Ancients: 0.805850252321
    Freyalise's Radiance: 0.775328965373
    Energy Storm: 0.766521600739
    ~~ closest names ~~
    Convalescence: 1.0

    arrow wizard 3G
    creature ~ naga shaman (rare)
    whenever a creature you control with a +1/+1 counter on it attacks, you may pay R rather than pay @'s mana cost.
    if @ is in your opening hand, you may begin the game with it on the battlefield.
    (3/3)
    ~~ closest cards ~~
    Leyline of Lightning: 0.902095340305
    Leyline of Vitality: 0.89333631952
    Scaleguard Sentinels: 0.88614879979
    Hibernation's End: 0.87494285069
    Worldheart Phoenix: 0.872295292949
    ~~ closest names ~~
    Patron Wizard: 0.8
    Marrow Shards: 0.72
    Thrull Wizard: 0.64

    trippling ogre 2
    artifact (rare)
    3, T: put a +1/+1 counter on each creature you control other than @.
    ~~ closest cards ~~
    Dragon Blood: 0.883760792268
    That Which Was Taken: 0.872576494244
    Scroll of the Masters: 0.870157610418
    High Sentinels of Arashin: 0.860031928845
    Oblivion Stone: 0.853588321587
    ~~ closest names ~~
    Flailing Ogre: 0.740740740741
    Drooling Ogre: 0.740740740741
    Sterling Grove: 0.714285714286

    wrap in gloomaster 2W
    creature ~ human wizard (uncommon)
    when @ has no +1/+1 counters on it, sacrifice @.
    T, sacrifice a creature: put a +1/+1 counter on @.
    (2/2)
    ~~ closest cards ~~
    Salt Road Quartermasters: 0.926514627169
    Carrion Feeder: 0.916301918535
    Skeleton Scavengers: 0.903611629945
    Shinewend: 0.903598582974
    Spike Rogue: 0.899241881521
    ~~ closest names ~~
    Wrap in Vigor: 0.709677419355
    Wrap in Flames: 0.6875
    Leaping Master: 0.6875

    naya sentinel 3
    artifact (uncommon)
    you may choose not to untap @ during your untap step.
    T: add C to your mana pool.
    ~~ closest cards ~~
    Basalt Monolith: 0.919637145946
    Grim Monolith: 0.90309641459
    Honor-Worn Shaku: 0.897887140898
    Waterveil Cavern: 0.884304731836
    Rootwater Depths: 0.884304731836
    ~~ closest names ~~
    Vent Sentinel: 0.769230769231
    Maze Sentinel: 0.769230769231
    Sentinel: 0.761904761905

    krovikan mantle 3R
    creature ~ elemental warrior (common)
    haste
    R: @ gets +1/+0 until end of turn.
    (2/2)
    ~~ closest cards ~~
    Furnace Whelp: 0.959030275842
    Char-Rumbler: 0.958970959198
    Flame Spirit: 0.958354628174
    Fiery Hellhound: 0.957189326658
    Furnace Spirit: 0.957138537995
    ~~ closest names ~~
    Krovikan Mist: 0.785714285714
    Krovikan Rot: 0.740740740741
    Krovikan Plague: 0.733333333333

    balloon glider 3U
    creature ~ beast (uncommon)
    flying
    morph 3U
    (1/5)
    ~~ closest cards ~~
    Glacial Stalker: 0.964420657291
    Dirgur Nemesis: 0.962968951965
    Ojutai Interceptor: 0.956594542609
    Whip-Spine Drake: 0.951299264455
    Blizzard Elemental: 0.947818697903
    ~~ closest names ~~
    Balloon Peddler: 0.758620689655
    Bog Glider: 0.75
    Goblin Glider: 0.740740740741

    spike scout 3G
    instant (rare)
    target creature gets +6/+6 until end of turn.
    ~~ closest cards ~~
    Might of Oaks: 0.960769974639
    Become Immense: 0.94029785987
    Monstrify: 0.935067133719
    Fanatical Fever: 0.916645926531
    Throttle: 0.914160920869
    ~~ closest names ~~
    Spike Rogue: 0.727272727273
    Silkwing Scout: 0.72
    Wei Scout: 0.7

    inkfathom surger 5UU
    creature ~ djinn (uncommon)
    flying
    trample
    cascade
    (4/6)
    ~~ closest cards ~~
    Breezekeeper: 0.973907220065
    Simic Sky Swallower: 0.969542081868
    Riverwheel Aerialists: 0.968429168295
    Djinn of the Lamp: 0.966443254131
    Mahamoti Djinn: 0.964429324671
    ~~ closest names ~~
    Inkfathom Divers: 0.75
    Fathom Seer: 0.740740740741
    Warstorm Surge: 0.666666666667

    whispersing star 1GG
    instant (uncommon)
    target beast creature you control flash and gets +X/+X until end of turn, where X is that creature's converted mana cost.
    ~~ closest cards ~~
    Aspect of Hydra: 0.92350460429
    Accelerated Mutation: 0.919909129761
    Great Defender: 0.918048095442
    Strength in Numbers: 0.887402347231
    Wirewood Pride: 0.877892579253
    ~~ closest names ~~
    Whispering Specter: 0.823529411765
    Whispering Shade: 0.8125
    Dispersing Orb: 0.733333333333

    ghostly sentinel 2W
    creature ~ human monk cleric (common)
    W, exile the top four cards of your library: the next time a source of your choice would deal damage this turn, prevent that damage.
    (2/2)
    ~~ closest cards ~~
    Seasoned Tactician: 0.944010730663
    Beacon of Destiny: 0.88374552137
    Pilgrim of Justice: 0.883570904829
    Pilgrim of Virtue: 0.880853323691
    Charm Peddler: 0.873861974275
    ~~ closest names ~~
    Ghostly Sentinel: 1.0

    creeping worshop BBX
    artifact (rare)
    whenever a spell or ability causes a player has noncreature, search your library for a card, put that card into your hand, then shuffle your library.
    countertype % dream
    ~~ closest cards ~~
    Gamble: 0.931795557376
    Distant Memories: 0.928130993077
    Infernal Tutor: 0.925262968283
    Diabolic Intent: 0.918758403407
    Imperial Seal: 0.917693898398
    ~~ closest names ~~
    Creeping Corrosion: 0.764705882353
    Creeping Mold: 0.689655172414
    Creeping Tar Pit: 0.6875

    rishadan ambush 2BU
    creature ~ imp (common)
    flying
    0: @ gets +1/+1 until end of turn.
    (1/1)
    ~~ closest cards ~~
    Drifting Shade: 0.972671827478
    Dungeon Shade: 0.96640344742
    Chilling Shade: 0.953141565695
    Loch Korrigan: 0.951951595354
    Blistering Dieflyn: 0.951114338232
    ~~ closest names ~~
    Rishadan Airship: 0.774193548387
    Rishadan Pawnshop: 0.75
    Rishadan Cutpurse: 0.6875

    merrow lion 3U
    enchantment ~ aura (common)
    enchant creature
    when @ is put into a graveyard from the battlefield, return @ to its owner's hand.
    enchanted creature doesn't untap during its controller's untap step.
    ~~ closest cards ~~
    Aspect of Mongoose: 0.921956510021
    Launch: 0.921644332344
    Cessation: 0.917317970772
    Abduction: 0.907792923319
    Sluggishness: 0.906720234477
    ~~ closest names ~~
    Merrow Levitator: 0.740740740741
    Merrow Witsniper: 0.666666666667
    Merrow Harbinger: 0.666666666667

    battletide aven 3WW
    creature ~ angel (rare)
    flying
    1U: untap @.
    UG, T: destroy target white creature. it can't be regenerated.
    (3/3)
    ~~ closest cards ~~
    Ethersworn Adjudicator: 0.875591280211
    Squall Drifter: 0.797973307896
    Nacatl Hunt-Pride: 0.793328330131
    Major Teroh: 0.789941424137
    Lieutenant Kirtar: 0.789275883939
    ~~ closest names ~~
    Battlewise Aven: 0.866666666667
    Battletide Alchemist: 0.742857142857
    Battlewise Valor: 0.645161290323

    vizzer's refure UUX
    instant (rare)
    uncast target spell. if that spell is uncasted this way, its controller may put a creature card from his or her hand onto the battlefield.
    ~~ closest cards ~~
    Fold into Æther: 0.984102089002
    Remand: 0.939071377228
    Hinder: 0.937051424064
    Desertion: 0.926033767276
    Memory Lapse: 0.919496201983
    ~~ closest names ~~
    Briber's Purse: 0.620689655172
    Veteran's Reflexes: 0.606060606061
    Vile Requiem: 0.592592592593

    elephant efreet 1W
    creature ~ human cleric (uncommon)
    T: return @ and target creature you control to their owner's hand.
    (1/2)
    ~~ closest cards ~~
    Wizard Mentor: 0.934338487879
    Snow Hound: 0.896802431783
    Miracle Worker: 0.853100968391
    Kami of Twisted Reflection: 0.836398720453
    Witch Hunter: 0.835850023558
    ~~ closest names ~~
    Elephant Resurgence: 0.705882352941
    Elephant: 0.695652173913
    Tempest Efreet: 0.689655172414

    nickent XBB
    instant (uncommon)
    until end of turn, target creature gains trample and gets +X/+0, where X is the number of instant and sorcery cards in your graveyard.
    ~~ closest cards ~~
    Ghoul's Feast: 0.967731939018
    Warped Physique: 0.950238936251
    Nightmarish End: 0.932252289133
    Scent of Nightshade: 0.924019721006
    Inner Calm, Outer Strength: 0.915681464752
    ~~ closest names ~~
    Sicken: 0.769230769231
    Quicken: 0.714285714286
    Epicenter: 0.625

    mystic meditation 1G
    instant (uncommon)
    split second
    search your library for a zombie card, put it onto the battlefield, then shuffle the revealed card on top of your library.
    ~~ closest cards ~~
    Sylvan Tutor: 0.955059193252
    Worldly Tutor: 0.95223487339
    Personal Tutor: 0.948143897987
    Sylvan Scrying: 0.944716746486
    Primal Growth: 0.944449724653
    ~~ closest names ~~
    Mystic Meditation: 1.0

    rhox behemoth 1WW
    creature ~ cat knight (common)
    flying
    when @ enters the battlefield, f0er this permanent an opponent controls, put a +1/+1 counter on @.
    (2/2)
    ~~ closest cards ~~
    Gideon's Avenger: 0.888664618922
    Elite Scaleguard: 0.883589247348
    Thalia's Lieutenant: 0.880923753341
    Oaken Brawler: 0.879990792646
    Chronicler of Heroes: 0.879400402458
    ~~ closest names ~~
    War Behemoth: 0.8
    Craterhoof Behemoth: 0.75
    Beacon Behemoth: 0.714285714286

    kismet drake UW
    legendary creature ~ human artificer (rare)
    1, sacrifice a creature: put a +1/+1 counter on @.
    (1/1)
    ~~ closest cards ~~
    Chronomaton: 0.913231951177
    Deranged Outcast: 0.902177633173
    Steel Overseer: 0.889726778888
    Bloodflow Connoisseur: 0.887232504431
    Armor Thrull: 0.860301068572
    ~~ closest names ~~
    Azimaet Drake: 0.8
    Sea Drake: 0.761904761905
    Desert Drake: 0.75

    groundsweeper 4
    artifact (common)
    2, T: you gain 1 life. activate this ability only if there are four or more creatures on the battlefield."
    ~~ closest cards ~~
    Shadows of the Past: 0.835850878797
    Nomad Stadium: 0.812543972417
    Fool's Tome: 0.808286831372
    Triassic Egg: 0.807222509502
    Leechridden Swamp: 0.801110393452
    ~~ closest names ~~
    Groundskeeper: 0.923076923077
    Groundswell: 0.75
    Grudge Keeper: 0.692307692308

    glimmed hearts R
    enchantment ~ aura (common)
    enchant creature
    enchanted creature gets +2/+0.
    ~~ closest cards ~~
    Immolation: 0.987412835242
    Giant Strength: 0.986912272094
    Magefire Wings: 0.971835900971
    Volcanic Strength: 0.96819480171
    Unholy Strength: 0.967271666215
    ~~ closest names ~~
    Golem's Heart: 0.666666666667
    Glimmervoid Basin: 0.645161290323
    Glimmerpost: 0.64

    trabbed assassin 2B
    creature ~ human fish beast (uncommon)
    when @ enters the battlefield, if you control two or more swamps, you may have target creature block @ this turn if able.
    (2/2)
    ~~ closest cards ~~
    Noggle Hedge-Mage: 0.872133238368
    Duergar Hedge-Mage: 0.862105581076
    Selkie Hedge-Mage: 0.853544540933
    Mardu Skullhunter: 0.82473427113
    Saruli Gatekeepers: 0.820378950941
    ~~ closest names ~~
    Tsabo's Assassin: 0.75
    Royal Assassin: 0.733333333333
    Rathi Assassin: 0.733333333333

    sorin's songbird 2W
    creature ~ human cleric (uncommon)
    soulbond
    as long as @ is paired with another creature, each of those creatures gets +2/+2.
    (1/1)
    ~~ closest cards ~~
    Trusted Forcemage: 0.940357654868
    Druid's Familiar: 0.935586732058
    Nearheath Pilgrim: 0.935496535235
    Hanweir Lancer: 0.912050864823
    Nightshade Peddler: 0.905748022086
    ~~ closest names ~~
    Sorin's Thirst: 0.666666666667
    Irini Sengir: 0.642857142857
    Seller of Songbirds: 0.628571428571

    jetting stave 3UU
    enchantment (rare)
    whenever a player casts a spell, that player sacrifices a permanent that shares a card type with it.
    ~~ closest cards ~~
    Oppression: 0.890221995895
    Æther Barrier: 0.886640313677
    Horn of Greed: 0.881948325054
    Rhystic Study: 0.881327081718
    Ice Cave: 0.880401259611
    ~~ closest names ~~
    Jetting Glasskite: 0.733333333333
    Healing Salve: 0.692307692308
    Fleeting Aven: 0.692307692308

    scarecrow G
    instant (common)
    target creature gains vigilance until end of turn.
    ~~ closest cards ~~
    Withstand Death: 0.981336044699
    Shape the Sands: 0.95447594507
    Tread Upon: 0.940769470927
    Snare the Skies: 0.939635932186
    Silk Net: 0.939635932186
    ~~ closest names ~~
    Scarecrow: 1.0

    benegated wood~scout 3G
    sorcery (uncommon)
    as an additional cost to cast @, exile X cards from your graveyard.
    draw a card.
    target creature gets +3/+3 until end of turn.
    remove three % counters from @: put a 2/2 green wolf creature token onto the battlefield.
    ~~ closest cards ~~
    Garruk Relentless: 0.875468986123
    Soul Exchange: 0.875301018405
    Makeshift Mannequin: 0.850299728523
    Genju of the Cedars: 0.844596796884
    Soul Stair Expedition: 0.842899294552
    ~~ closest names ~~
    Enslaved Scout: 0.647058823529
    Subterranean Scout: 0.578947368421
    Tainted Wood: 0.5625

    beast attendants 2B
    instant (common)
    cast @ only during the declare attackers step and only if you've been attacked this step.
    transmute B
    ~~ closest cards ~~
    Assassin's Blade: 0.92855387069
    Just Fate: 0.92242883744
    Eightfold Maze: 0.92242180145
    Command of Unsummoning: 0.865414390156
    Remove: 0.861181738715
    ~~ closest names ~~
    Treva's Attendant: 0.787878787879
    Silent Attendant: 0.75
    Oracle's Attendants: 0.742857142857

    ethereal crusader 1W
    creature ~ bird (common)
    flying
    (1/1)
    ~~ closest cards ~~
    Royal Falcon: 1.0
    Territorial Roc: 0.981973763997
    Suntail Hawk: 0.976701697604
    Armored Pegasus: 0.968561826488
    Stormfront Pegasus: 0.966398423369
    ~~ closest names ~~
    Ethereal Usher: 0.838709677419
    Stromgald Crusader: 0.742857142857
    Phyrexian Crusader: 0.742857142857

    attreling patrol 6
    artifact (rare)
    creatures can't attack you or a planeswalker you control unless their controller pays 1 for each of those creatures.
    ~~ closest cards ~~
    Norn's Annex: 0.921231943588
    Windborn Muse: 0.830627767444
    Ghostly Prison: 0.782531522076
    Propaganda: 0.781163497415
    Sphere of Safety: 0.76038625053
    ~~ closest names ~~
    Dwarven Patrol: 0.733333333333
    Goblin Patrol: 0.689655172414
    Scattering Stroke: 0.666666666667

    fleet, exile of witchs 2GWW
    creature ~ demon (rare)
    flying
    haste
    at the beginning of your upkeep, sacrifice @ unless you pay 1W.
    (5/5)
    ~~ closest cards ~~
    Chromium: 0.9161329891
    Palladia-Mors: 0.906324439328
    Kami of the Tended Garden: 0.878043440199
    Bog Elemental: 0.872390738532
    Drifting Djinn: 0.865606307285
    ~~ closest names ~~
    Battle of Wits: 0.611111111111
    Kalemne, Disciple of Iroas: 0.583333333333
    Beguiler of Wills: 0.564102564103

    pygmy luberator 4U
    creature ~ insect horror (common)
    flash
    flying
    (3/3)
    ~~ closest cards ~~
    Spire Monitor: 0.979099746014
    Stormrider Spirit: 0.976149445371
    Skyline Predator: 0.965803662564
    Nimbus of the Isles: 0.963982866459
    Sky Ruin Drake: 0.963067536363
    ~~ closest names ~~
    Pygmy Razorback: 0.666666666667
    Myr Incubator: 0.642857142857
    Aven Liberator: 0.620689655172

    tropical blacks 2
    artifact (common)
    at the beginning of your upkeep, if you have more cards in hand than each opponent, you may return @ from your graveyard to your hand. activate this ability only during your upkeep.
    countertype % charge
    ~~ closest cards ~~
    Oversold Cemetery: 0.916059223112
    Library of Leng: 0.899043362547
    Mindstorm Crown: 0.887119522286
    Decaying Soil: 0.881956819146
    Hedron Alignment: 0.880776528723
    ~~ closest names ~~
    Tropical Island: 0.733333333333
    Tropical Storm: 0.689655172414
    Tribal Flames: 0.642857142857

    melee stake 1UB
    enchantment (rare)
    all creatures have protection from the chosen at random. then that player puts the top two cards of his or her library into his or her graveyard.
    ~~ closest cards ~~
    Head Games: 0.950745413925
    Tunnel Vision: 0.944402350826
    Glimpse the Unthinkable: 0.94270669783
    Mind Funeral: 0.940896988211
    Pilfered Plans: 0.937757644383
    ~~ closest names ~~
    Lethe Lake: 0.666666666667
    Skeletal Snake: 0.64
    Melesse Spirit: 0.64

    ghalma, whisperbane fields 4GG
    legendary creature ~ elf warrior (rare)
    whenever @ or another permanent is turned face up, X is the power of the creature tapped this way, put a +1/+1 counter on @.
    (2/3)
    ~~ closest cards ~~
    Kresh the Bloodbraided: 0.870913448619
    Reverent Hunter: 0.842801111296
    Hamletback Goliath: 0.841619192631
    Oran-Rief Hydra: 0.826913075222
    Elvish Vanguard: 0.826839006576
    ~~ closest names ~~
    Lightmine Field: 0.585365853659
    Whisperer of the Wilds: 0.541666666667
    Flowering Field: 0.536585365854

    dread whippage 5BB
    legendary creature ~ human rogue (uncommon)
    whenever @ attacks, return target creature card from your graveyard to the battlefield. untap @.
    (4/4)
    ~~ closest cards ~~
    Sibsig Muckdraggers: 0.900265325362
    Eater of the Dead: 0.891609923697
    Treasury Thrull: 0.875915827001
    Silent Sentinel: 0.869056900751
    Havengul Skaab: 0.865552792208
    ~~ closest names ~~
    Dread Charge: 0.769230769231
    Dreadwing: 0.695652173913
    Dread Slag: 0.666666666667

    jungle charge 2(R/G)
    creature ~ beast (common)
    trample
    whenever you attack with those creatures attack, @ gains banding until end of turn.
    (2/2)
    ~~ closest cards ~~
    Warmind Infantry: 0.890325438427
    Pyreheart Wolf: 0.872271269119
    Boros Mastiff: 0.867332336702
    Root Spider: 0.85665784339
    Ordruun Veteran: 0.854300893064
    ~~ closest names ~~
    Jungle Shrine: 0.769230769231
    Jungle Barrier: 0.740740740741
    Jund Charm: 0.695652173913

    kher keep 1
    artifact (uncommon)
    you may spend blue mana as though it were mana of any color to pay the activation costs of @'s equipment.
    ~~ closest cards ~~
    Quicksilver Elemental: 0.850022737291
    North Star: 0.842768286405
    Food Chain: 0.836541069309
    False Dawn: 0.834591231029
    Thran Turbine: 0.829250891003
    ~~ closest names ~~
    Kher Keep: 1.0

    street fury 5R
    sorcery (common)
    destroy target land.
    ~~ closest cards ~~
    Craterize: 0.964136536648
    Volcanic Awakening: 0.960164466279
    Rain of Salt: 0.945220940774
    Volcanic Upheaval: 0.944999549063
    Desert Twister: 0.929544213332
    ~~ closest names ~~
    Stonefury: 0.7
    Street Savvy: 0.695652173913
    Street Wraith: 0.666666666667

    cobra ward 6
    artifact creature ~ golem (uncommon)
    2: target barbare on the battlefield tapped and attacking at the beginning of the next end step.
    (2/4)
    ~~ closest cards ~~
    Crystal Golem: 0.836616463966
    Brackwater Elemental: 0.824190897477
    Harrier Griffin: 0.791967140745
    Crumbling Colossus: 0.780106564521
    Skittish Valesk: 0.774826937784
    ~~ closest names ~~
    Spectra Ward: 0.727272727273
    Cobra Trap: 0.7
    Scoria Wurm: 0.666666666667

    shambling sentinel 2G
    creature ~ spirit (common)
    whenever you cast a spirit or arcane spell, target creature gains shadow until end of turn.
    (2/2)
    ~~ closest cards ~~
    Guardian of Solitude: 0.950560242471
    Kami of the Waning Moon: 0.944901671933
    Kami of the Hunt: 0.917499392822
    Kami of Tattered Shoji: 0.869859866081
    Cathar's Companion: 0.868049673778
    ~~ closest names ~~
    Shambling Vent: 0.8125
    Changeling Sentinel: 0.810810810811
    Shambling Shell: 0.787878787879

    young contemplet 3UB
    artifact (rare)
    at the beginning of your upkeep, choose target creature you control. = destroy target creature. its controller loses 2 life.
    suspend X~XUX.
    ~~ closest cards ~~
    Touch of Death: 0.809247636717
    Slaughter Pact: 0.802835411609
    Jinxed Idol: 0.80206279975
    Mind Whip: 0.792751541652
    Form of the Dragon: 0.792728383713
    ~~ closest names ~~
    Contempt: 0.666666666667
    Quiet Contemplation: 0.628571428571
    Wayfaring Temple: 0.625

    trasher rush R
    sorcery (common)
    @ deals X damage to target player.
    ~~ closest cards ~~
    Blaze: 0.959325679258
    Volcanic Geyser: 0.955091834642
    Lava Spike: 0.947121720113
    Scorching Spear: 0.943015911377
    Volcanic Hammer: 0.92962612251
    ~~ closest names ~~
    Treasure Cruise: 0.666666666667
    Trade Routes: 0.666666666667
    Treva's Ruins: 0.64

    skycloud clean 5
    artifact creature ~ golem (uncommon)
    @ enters the battlefield with X +1/+1 counters on it, where X is the number of % counters on @.
    when @ enters the battlefield, put a +1/+1 counter on each artifact you control.
    (0/4)
    ~~ closest cards ~~
    Scourge of Skola Vale: 0.934584672705
    Karstoderm: 0.93344913457
    Servant of the Scale: 0.923361029549
    Bloodspore Thrinax: 0.921265534462
    Spike Cannibal: 0.921080181297
    ~~ closest names ~~
    Skycloud Expanse: 0.8
    Skycloud Egg: 0.769230769231
    Skyshroud Claim: 0.689655172414

    angel of resurgence 0 _UNPARSED_ _INVALID_
    enchantment (rare)
    at the beginning of your upkeep, choose target nonland permanent you control and target land you don't control.
    +1: target creature gets +1/+1 for as long as @ remains tapped. you may choose new targets for the copy.
    morph 1BWUB
    ~~
    (7) <cost> {3}
    ~~ closest cards ~~
    Safe Haven: 0.860003546849
    Callous Oppressor: 0.857054610033
    Helm of Possession: 0.849656207339
    Vedalken Shackles: 0.845933577793
    Mastery of the Unseen: 0.845239901814
    ~~ closest names ~~
    Wall of Resurgence: 0.864864864865
    Voice of Resurgence: 0.789473684211
    Wall of Reverence: 0.722222222222

    vivid crag _NOCOST_
    snow land (uncommon)
    T: add R to your mana pool.
    T, sacrifice @: add BW to your mana pool.
    T: add R to your mana pool.
    countertype % charge
    ~~ closest cards ~~
    An-Havva Township: 0.975559991004
    Koskun Keep: 0.97508224391
    Crystal Vein: 0.974983018023
    Castle Sengir: 0.973901502039
    Wizards' School: 0.972626810939
    ~~ closest names ~~
    Vivid Crag: 1.0

    chilling berserker 4G
    creature ~ elemental (uncommon)
    RR: @ gets +2/+0 until end of turn.
    whenever an opponent casts a blue or black spell, you may put a 1/1 green insect creature token onto the battlefield."
    (1/1)
    ~~ closest cards ~~
    Satyr Nyx-Smith: 0.867074530274
    Brood Keeper: 0.847785800756
    Orochi Eggwatcher: 0.845102250541
    Dragon Egg: 0.816409126963
    Skirk Ridge Exhumer: 0.812239515668
    ~~ closest names ~~
    Changeling Berserker: 0.842105263158
    Highland Berserker: 0.777777777778
    Goblin Berserker: 0.764705882353

    touch of zhalfir 1BB
    sorcery (uncommon)
    destroy target creature, then add B to your mana pool. activate this ability only during your upkeep.
    ~~ closest cards ~~
    Tectonic Edge: 0.862093593499
    Scepter of Fugue: 0.861225804667
    Rix Maadi, Dungeon Palace: 0.85365274797
    Tainted Isle: 0.842925597877
    Tainted Peak: 0.841566799712
    ~~ closest names ~~
    Touch of Vitae: 0.666666666667
    Touch of the Void: 0.666666666667
    Touch of the Eternal: 0.666666666667

    spirallasher 2G
    instant ~ arcane (common)
    if you control a creature with power 4 or greater, you may put a 1/1 green insect creature token onto the battlefield.
    flashback G
    ~~ closest cards ~~
    Gloomwidow's Feast: 0.87353052762
    Golgari Germination: 0.871751081982
    Saproling Infestation: 0.871203933719
    Promise of Bunrei: 0.869155725917
    Ulvenwald Mysteries: 0.862632394083
    ~~ closest names ~~
    Stigma Lasher: 0.72
    Spincrusher: 0.695652173913
    Skylasher: 0.666666666667

    adaptive dead 4GG
    creature ~ elf (rare)
    when @ dies, you may search your library for a card named avarax on the bottom of a ninja on X, to your artifact creatures and other the same two or more cards this turn, you may put @ onto the battlefield under your control.
    draw a card at the beginning of the next turn's upkeep.
    (2/2)
    ~~ closest cards ~~
    Into the Wilds: 0.939097083539
    Clone Shell: 0.928755433021
    Deadbridge Chant: 0.928634161701
    Wolf-Skull Shaman: 0.927212948438
    Gamekeeper: 0.92627575663
    ~~ closest names ~~
    Animate Dead: 0.72
    Raise Dead: 0.695652173913
    Adaptive Snapjaw: 0.689655172414

    naughty 4G
    creature ~ centaur warrior (common)
    heroic ~ whenever you cast a spell that targets @, put a +1/+1 counter on @.
    (4/3)
    ~~~~~~~~
    cryptwing U
    tribal sorcery ~ illusion (uncommon)
    target player puts the top X cards of his or her library into his or her graveyard.
    flashback 2U
    ~~ closest cards ~~
    Pheres-Band Thunderhoof: 0.982728360939
    Centaur Battlemaster: 0.97846524853
    Staunch-Hearted Warrior: 0.960200891128
    Briarknit Kami: 0.903234550031
    Setessan Oathsworn: 0.902401040847
    Dream Twist: 0.980001954177
    Dampen Thought: 0.950267256129
    Brain Freeze: 0.945781921802
    Paranoid Delusions: 0.936281534799
    Millstone: 0.934517800418
    ~~ closest names ~~
    Naughty: 1.0

    convicted position 1G
    creature ~ eldrazi drone (common)
    flying
    (2/2)
    ~~ closest cards ~~
    Culling Drone: 0.899737508875
    Lurking Crocodile: 0.899612009673
    Wind Drake: 0.890004921491
    Willow Faerie: 0.889283205431
    Jagwasp Swarm: 0.882122137428
    ~~ closest names ~~
    Conviction: 0.714285714286
    Privileged Position: 0.702702702703
    Convicted Killer: 0.647058823529

    _NONAME_ _NOCOST_ _INVALID_
    creature ~ faerie
    2U, sacrifice @: switch target creature's power and toughness until end of turn.
    each spell if @
    (1/1)
    ~~~~~~~~
    _NONAME_ _NOCOST_ _UNPARSED_ _INVALID_

    ~~ closest cards ~~
    Nightscape Apprentice: 0.851934051043
    Overtaker: 0.849412460576
    Krovikan Elementalist: 0.8464922502
    Inkfathom Witch: 0.827487537459
    Ana Disciple: 0.823547047789
    ~~ closest names ~~
    Zzzyxas's Abyss: 0.0
    Zurgo Helmsmasher: 0.0
    Zurgo Bellstriker: 0.0

    stern infantry 1WW
    Cto lost second.\as @ enters the battlefield, choose a color. (rare)
    ~~ closest cards ~~
    Jhovall Queen: 0.899974898986
    Aysen Highway: 0.887859645353
    Soulscour: 0.877922613528
    Starlit Angel: 0.87521868685
    Serra Angel: 0.871248531752
    ~~ closest names ~~
    Wei Infantry: 0.769230769231
    Shu Elite Infantry: 0.75
    Warmind Infantry: 0.733333333333

    stalking ghoul 1R
    creature ~ goblin (common)
    R: target creature can't block @ this turn.
    (1/1)
    ~~ closest cards ~~
    Duct Crawler: 0.954428715878
    Dwarven Warriors: 0.884835290088
    Dwarven Nomad: 0.869894688596
    Goblin Tunneler: 0.867200079224
    Hurr Jackal: 0.863694194562
    ~~ closest names ~~
    Shambling Ghoul: 0.827586206897
    Scavenging Ghoul: 0.733333333333
    Vedalken Ghoul: 0.714285714286

    embolden 2W
    creature ~ human cleric (uncommon)
    sacrifice @: @ deals 1 damage to target creature or player. activate this ability only during your turn, before attackers are declared.
    (1/1)
    ~~ closest cards ~~
    Wu Longbowman: 0.975326385061
    Fire Bowman: 0.973138836852
    Apprentice Sorcerer: 0.969945722118
    Capricious Sorcerer: 0.966540917211
    Goblin Firestarter: 0.948257334333
    ~~ closest names ~~
    Embolden: 1.0

    ghostly specter 2G
    sorcery (common)
    destroy target land. its controller puts a 1/1 green saproling creature token onto the battlefield.
    ~~ closest cards ~~
    Beast Within: 0.926136366378
    Sprout: 0.910878575166
    Seed the Land: 0.893490937743
    Chatter of the Squirrel: 0.874144827429
    Survey the Wreckage: 0.873550424248
    ~~ closest names ~~
    Ghostly Sentinel: 0.774193548387
    Hollow Specter: 0.758620689655
    Nightveil Specter: 0.75

    seeds of power RX
    sorcery (rare)
    each player sacrifices X lands.
    ~~ closest cards ~~
    Tectonic Break: 0.977096785863
    Prosperity: 0.825219700194
    Lavalanche: 0.816142651701
    Bonfire of the Damned: 0.7960035659
    Death Cloud: 0.780729691959
    ~~ closest names ~~
    Reins of Power: 0.785714285714
    Siege of Towers: 0.758620689655
    Promise of Power: 0.733333333333

    crot swarm R
    instant ~ arcane (common)
    @ deals 3 damage to target creature or player.
    ~~ closest cards ~~
    Lightning Bolt: 0.986168927383
    Shock: 0.979263550165
    Searing Spear: 0.971472855846
    Lightning Strike: 0.971472855846
    Scorching Spear: 0.964275160674
    ~~ closest names ~~
    Sprout Swarm: 0.818181818182
    Locust Swarm: 0.727272727273
    Remote Farm: 0.666666666667

    sunken hope 1U
    enchantment ~ aura (uncommon)
    enchant creature
    enchanted creature has "1, T: tap target creature."
    ~~ closest cards ~~
    Second Wind: 0.944751513234
    Burden of Guilt: 0.936478873717
    Mana Chains: 0.928260909982
    Kjeldoran Pride: 0.923795980117
    Malicious Intent: 0.916676917733
    ~~ closest names ~~
    Sunken Hope: 1.0

    crackleback 1R
    enchantment (rare)
    whenever you cast a creature spell, if @ is an enchantment, @ becomes a 4/4 horror creature with first strike.
    ~~ closest cards ~~
    Opal Acrolith: 0.925380073633
    Opal Champion: 0.923681484195
    Opal Gargoyle: 0.917671857173
    Opal Guardian: 0.914660748675
    Hidden Spider: 0.909868064388
    ~~ closest names ~~
    Crackleburr: 0.727272727273
    Prickleboar: 0.636363636364
    Gristleback: 0.636363636364

    stromgald crusader R
    sorcery (common)
    as an additional cost to cast @, pay X life.
    target creature gets +1/+0 and gains first strike until end of turn.
    ~~ closest cards ~~
    Wicked Reward: 0.907014227284
    Devouring Rage: 0.906409319832
    Surge of Strength: 0.877150982894
    Vicious Betrayal: 0.865732417763
    Defiant Strike: 0.861752374363
    ~~ closest names ~~
    Stromgald Crusader: 1.0

    mardu scout 4B
    creature ~ elemental (uncommon)
    flying
    when @ enters the battlefield, each player discards a card.
    (3/3)
    ~~ closest cards ~~
    Tar Fiend: 0.934906341134
    Slum Reaper: 0.934065568562
    Abyssal Horror: 0.928600964438
    Ebon Dragon: 0.921506322961
    Screeching Buzzard: 0.919165054041
    ~~ closest names ~~
    Mardu Scout: 1.0

    master of vigor 2W
    creature ~ human soldier (common)
    when @ enters the battlefield, you may return target enchantment card from your graveyard to your hand.
    (1/2)
    ~~ closest cards ~~
    Auramancer: 0.992707674874
    Treasure Hunter: 0.981047645726
    Monk Idealist: 0.966752190207
    Cartographer: 0.962113307206
    Stoic Builder: 0.957256699952
    ~~ closest names ~~
    Master of Diversion: 0.764705882353
    Master of Arms: 0.758620689655
    Magister of Worth: 0.75

    brainblable anger 1G
    creature ~ goblin (uncommon)
    when @ enters the battlefield, if it was kicked, destroy target creature with flying.
    morph G
    (1/1)
    ~~ closest cards ~~
    Benalish Emissary: 0.91568794468
    Oran-Rief Recluse: 0.904825240557
    Verduran Emissary: 0.895942139409
    Goblin Ruinblaster: 0.890866219438
    Tolarian Emissary: 0.882391171001
    ~~ closest names ~~
    Tangle Angler: 0.666666666667
    Burning Anger: 0.666666666667
    Baneslayer Angel: 0.666666666667

    sidisi's bauble U
    creature ~ eldrazi drone (common)
    devoid
    1C: @ gets +2/+0 and gains flying until end of turn.
    (1/2)
    ~~ closest cards ~~
    Sludge Crawler: 0.926699179117
    Kozilek's Shrieker: 0.896989741045
    Slaughter Drone: 0.896830695586
    Forerunner of Slaughter: 0.890193605843
    Kavu Glider: 0.863071792049
    ~~ closest names ~~
    Sidisi's Faithful: 0.75
    Sidisi's Pet: 0.740740740741
    Mishra's Bauble: 0.733333333333

    deserted plate _NOCOST_
    land (rare)
    T: add C to your mana pool.
    T: add one mana of any color to your mana pool. spend this mana only to cast a creature spell of the chosen type, and that spell can't be uncasted.
    ~~ closest cards ~~
    Cavern of Souls: 0.979237460506
    Ancient Ziggurat: 0.97840119691
    Corrupted Crossroads: 0.970827402516
    Pillar of the Paruns: 0.969820262669
    Nykthos, Shrine to Nyx: 0.94849311773
    ~~ closest names ~~
    Deserted Temple: 0.827586206897
    Desecrated Earth: 0.733333333333
    Darksteel Plate: 0.689655172414

    woodland kirin 4G
    creature ~ giant warrior (common)
    when @ enters the battlefield, you may return another target creature you control to its owner's hand.
    (5/5)
    ~~ closest cards ~~
    Ambush Krotiq: 0.93759544859
    Invasive Species: 0.920142967744
    Surrakar Banisher: 0.911583771919
    Bull Elephant: 0.895140408842
    Ancestral Statue: 0.891051204255
    ~~ closest names ~~
    Woodland Druid: 0.714285714286
    Woodland Guidance: 0.709677419355
    Woodland Stream: 0.689655172414

    mind from the wicked 3U
    sorcery (common)
    put target creature on top of its owner's library.
    ~~ closest cards ~~
    Repel: 0.989070696209
    Griptide: 0.989070696209
    Time Ebb: 0.978374995408
    Forced Retreat: 0.978374995408
    Spin into Myth: 0.955434050308
    ~~ closest names ~~
    No Rest for the Wicked: 0.714285714286
    Thing from the Deep: 0.666666666667
    Rise from the Tides: 0.666666666667

    spider spider 3G
    creature ~ human wizard (common)
    protection from black
    1G: regenerate @.
    (2/1)
    ~~ closest cards ~~
    Darkwatch Elves: 0.904386781544
    Undercity Troll: 0.903384868159
    Horned Troll: 0.895896939205
    Living Airship: 0.892587416168
    Tel-Jilad Exile: 0.889068654123
    ~~ closest names ~~
    Pincer Spider: 0.846153846154
    Hidden Spider: 0.769230769231
    Side to Side: 0.72

    polluted restoration G
    creature ~ human druid (uncommon)
    2G, T: put a 1/1 green spike creature token onto the battlefield."
    (1/1)
    ~~ closest cards ~~
    Jade Mage: 0.952657086494
    Centaur's Herald: 0.948888634204
    Renowned Weaver: 0.937392595225
    Rhys the Redeemed: 0.910071230306
    Jungle Patrol: 0.901424654788
    ~~ closest names ~~
    Polluted Delta: 0.705882352941
    Polluted Mire: 0.666666666667
    Polluted Dead: 0.666666666667

    murmuring terrain 3
    legendary artifact ~ equipment (uncommon)
    equip 2
    equipped creature gets +1/+1 for each other creature on the battlefield.
    ~~ closest cards ~~
    Pennon Blade: 0.92690389119
    Strider Harness: 0.897829890486
    Gorgon Flail: 0.894424997861
    Veteran's Sidearm: 0.893914161595
    Armory of Iroas: 0.891950713803
    ~~ closest names ~~
    Roiling Terrain: 0.75
    Living Terrain: 0.709677419355
    Murmuring Phantasm: 0.685714285714

    nantuko spliter 1G
    enchantment (uncommon)
    1: prevent the next 1 damage that would be dealt to target creature this turn. until end of turn, an opponent chooses a creature that player controls.
    ~~ closest cards ~~
    Martyrdom: 0.928721219721
    Bandage: 0.918301267515
    Guardian Angel: 0.914920909706
    Martyr's Cause: 0.910448104182
    Hypochondria: 0.908223750268
    ~~ closest names ~~
    Nantuko Elder: 0.785714285714
    Nantuko Disciple: 0.774193548387
    Nantuko Tracer: 0.758620689655

    winding vine 4
    artifact (rare)
    whenever a player casts a spell from his or her hand, that player destroy any number of takes on the battlefield.
    0: put a +1/+1 counter on @.
    @ enters the battlefield with X +1/+1 counters on it.
    T: put a % counter on @.
    countertype % charge
    ~~ closest cards ~~
    Surge Node: 0.951653281153
    Plague Boiler: 0.948778921269
    Serrated Arrows: 0.936211751708
    Necrogen Censer: 0.929737865073
    Bomb Squad: 0.929366599067
    ~~ closest names ~~
    Rending Vines: 0.8
    Wandering Ones: 0.692307692308
    Blinding Drone: 0.692307692308

    phantom witch 1G
    sorcery (uncommon)
    search your library for a card, put that card into your hand, then shuffle your library.
    draw a card.
    ~~ closest cards ~~
    Gamble: 0.977748689455
    Merchant Scroll: 0.977511422213
    Cateran Summons: 0.97522782886
    Sprouting Vines: 0.973288426715
    Demonic Tutor: 0.973155671204
    ~~ closest names ~~
    Phantom Wings: 0.769230769231
    Phantom Whelp: 0.769230769231
    Phantom Wurm: 0.72

    bladewing elemental 2G
    creature ~ elemental shaman (uncommon)
    1G, T: put a 1/1 green squirrel creature token onto the battlefield.
    (2/2)
    ~~ closest cards ~~
    Jade Mage: 0.973340005989
    Centaur's Herald: 0.923412070129
    Renowned Weaver: 0.917027384068
    Ant Queen: 0.901419777426
    Deranged Hermit: 0.899610119866
    ~~ closest names ~~
    Wave-Wing Elemental: 0.842105263158
    Dawn Elemental: 0.787878787879
    Plant Elemental: 0.764705882353

    viashino sandstone 3GR
    creature ~ satyr (uncommon)
    each griffin creatures get +2/+2.
    (4/4)
    ~~ closest cards ~~
    Megantic Sliver: 0.880199965107
    Rhox Brute: 0.873315961871
    Livonya Silone: 0.871982513059
    Bloodbraid Elf: 0.868937186132
    Tajuru Pathwarden: 0.868422786288
    ~~ closest names ~~
    Viashino Sandstalker: 0.842105263158
    Viashino Sandscout: 0.833333333333
    Viashino Sandswimmer: 0.789473684211

    changeling fire 4GG
    creature ~ beast (rare)
    when @ enters the battlefield, you may put target nontoken creature on top of its owner's library.
    (5/5)
    ~~ closest cards ~~
    Arashin Sovereign: 0.914388673762
    Nulltread Gargantuan: 0.900239400282
    Soul of the Harvest: 0.889107850085
    Regal Force: 0.882568760045
    Shivan Wurm: 0.87612053354
    ~~ closest names ~~
    Changeling Hero: 0.8
    Changeling Titan: 0.774193548387
    Changeling Sentinel: 0.764705882353

    loyal barrier 2W
    enchantment (uncommon)
    WW: put a 1/1 white kor soldier creature token onto the battlefield.
    when @ enters the battlefield, tap enchanted permanent.
    ~~ closest cards ~~
    Vessel of Ephemera: 0.913957007548
    Mobilization: 0.886416184816
    Seller of Songbirds: 0.885664385482
    Attended Knight: 0.884937681145
    Pegasus Stampede: 0.884470968704
    ~~ closest names ~~
    Coral Barrier: 0.846153846154
    Soul Barrier: 0.8
    Loyal Retainers: 0.714285714286

    shield of kaminance 3
    artifact (uncommon)
    T: add U to your mana pool.
    when @ enters the battlefield, each opponent loses 2 life and you gain 2 life.
    ~~ closest cards ~~
    Radiant Fountain: 0.900873242144
    Piranha Marsh: 0.891766833358
    Jwar Isle Refuge: 0.887905050932
    Akoum Refuge: 0.886214868773
    Sejiri Refuge: 0.884201901644
    ~~ closest names ~~
    Shield of Kaldra: 0.742857142857
    Ire of Kaminari: 0.705882352941
    Shield Dancer: 0.6875

    soul shred 4B
    sorcery (uncommon)
    destroy target land. that player gains 4 life and draws two cards.
    ~~ closest cards ~~
    Mental Agony: 0.912896566206
    Harrowing Journey: 0.905316288376
    Fill with Fright: 0.900621920819
    Kiss of the Amesha: 0.864260644673
    Mind Rot: 0.856265465724
    ~~ closest names ~~
    Soul Shred: 1.0

    volcanic doppelganger 3R
    sorcery (common)
    put two 1/1 red devil creature tokens onto the battlefield. they have "sacrifice this creature: add C to your mana pool."
    ~~ closest cards ~~
    Call the Scions: 0.955557596858
    Corpsehatch: 0.937115928053
    Brood Birthing: 0.91283668205
    Eyeless Watcher: 0.903128905087
    Kozilek's Predator: 0.902221016752
    ~~ closest names ~~
    Vesuvan Doppelganger: 0.780487804878
    Dimir Doppelganger: 0.717948717949
    Shifty Doppelganger: 0.7

    earthless butcher R
    sorcery (common)
    exile target artifact. if that artifact is put into a graveyard this way, @ deals 3 damage to that creature or player instead.
    kicker 3
    ~~ closest cards ~~
    Red Sun's Zenith: 0.906503524591
    Burst Lightning: 0.889877914911
    Brutal Expulsion: 0.867856272317
    Flaming Gambit: 0.867102713427
    Pillar of Flame: 0.866273116297
    ~~ closest names ~~
    Faceless Butcher: 0.787878787879
    Eyeless Watcher: 0.6875
    Deathless Behemoth: 0.685714285714

    wohfaer 2W
    creature ~ human cleric (common)
    T: target creature gets +0/+3 until end of turn. activate this ability only once each turn.
    (1/3)
    ~~ closest cards ~~
    Knight of the Skyward Eye: 0.933287989645
    Frilled Oculus: 0.927459827539
    Alaborn Veteran: 0.920076988907
    Stern Marshal: 0.919665232819
    Fault Riders: 0.912549503442
    ~~ closest names ~~
    Where: 0.666666666667
    Woebearer: 0.625
    Whipflare: 0.625

    spitting dragon 1R
    creature ~ spirit (common)
    haste
    whenever @ blocks, it gets +2/+0 until end of turn.
    (1/1)
    ~~ closest cards ~~
    Rogue Kavu: 0.954414740766
    Borderland Marauder: 0.949749572016
    Ravenous Skirge: 0.936498536111
    Vicious Kavu: 0.934382341046
    Fortress Cyclops: 0.930410237415
    ~~ closest names ~~
    Spitting Hydra: 0.827586206897
    Spitting Drake: 0.827586206897
    Spitting Gourna: 0.8

    deathwood dryad 4B
    creature ~ spirit (rare)
    flying
    whenever @ deals combat damage to a player, that player sacrifices a creature.
    (4/4)
    ~~ closest cards ~~
    Banshee of the Dread Choir: 0.960792493534
    Blazing Specter: 0.910549791887
    Abyssal Specter: 0.905125122102
    Shockmaw Dragon: 0.901207200973
    Balefire Dragon: 0.894751456821
    ~~ closest names ~~
    Heartwood Dryad: 0.866666666667
    Rushwood Dryad: 0.758620689655
    Death-Hood Cobra: 0.709677419355

    seasoned skimmer 2GG
    creature ~ snake (uncommon)
    whenever @ deals combat damage to a player, if you control a swamp, you may have it deal damage equal to its power to target creature. if you do, that creature doesn't untap during its controller's next untap step.
    (3/3)
    ~~ closest cards ~~
    Furnace Scamp: 0.884491489513
    Laccolith Whelp: 0.881312249494
    Laccolith Grunt: 0.880949034743
    Ohran Viper: 0.873669391315
    Electropotence: 0.870120298149
    ~~ closest names ~~
    Silent Skimmer: 0.733333333333
    Mana Skimmer: 0.714285714286
    Heat Shimmer: 0.642857142857

    karplusan shaman 4R
    creature ~ beast (uncommon)
    bloodthirst 1
    (4/4)
    ~~ closest cards ~~
    Bonebreaker Giant: 0.978332825725
    Obsidian Giant: 0.97786958811
    Glowering Rogon: 0.975961169667
    Fomori Nomad: 0.969991355608
    Tenement Crasher: 0.969275328695
    ~~ closest names ~~
    Krark-Clan Shaman: 0.787878787879
    Karplusan Giant: 0.774193548387
    Balduvian Shaman: 0.75

    mesmeric sphere _NOCOST_
    planeswalker ~ garruk (rare)
    -7: you get an emblem with "whenever a creature enters the battlefield under your control, you gain 1 life.
    T: add B or R to your mana pool.
    ((4))
    ~~ closest cards ~~
    Tomb of Urami: 0.891694430005
    Seraph Sanctuary: 0.884262787143
    Tomb of the Spirit Dragon: 0.881780724649
    High Market: 0.877974541562
    Koth of the Hammer: 0.874364405418
    ~~ closest names ~~
    Mesmeric Sliver: 0.8
    Chimeric Sphere: 0.8
    Mesmeric Orb: 0.740740740741

    bear kami 1G
    instant (common)
    target creature you control gets +2/+0 until end of turn.
    ~~ closest cards ~~
    Prey's Vengeance: 0.949995150773
    Mutagenic Growth: 0.944933241324
    Bull Rush: 0.943689110369
    Consume Strength: 0.942130778735
    Glint: 0.942124007894
    ~~ closest names ~~
    Hearth Kami: 0.8
    Teardrop Kami: 0.727272727273
    Gibbering Kami: 0.695652173913

    defender of sleight 2W
    instant (common)
    [choose one ~
    = target nonattacking creature gains flying until end of turn.]
    entwine 2
    ~~ closest cards ~~
    Ephemeral Shields: 0.848787095448
    Hope Charm: 0.835974079357
    Ruthless Instincts: 0.83527861733
    Incite War: 0.833140765677
    Canopy Claws: 0.826647228099
    ~~ closest names ~~
    Defender of Law: 0.764705882353
    Defender of Chaos: 0.722222222222
    Keeper of the Light: 0.684210526316

    angelic bandit 2W
    creature ~ bat (common)
    flying
    when @ enters the battlefield, put a 1/1 colorless thopter artifact creature token with flying onto the battlefield.
    (1/1)
    ~~ closest cards ~~
    Aspiring Aeronaut: 0.97915024355
    Ghirapur Gearcrafter: 0.973477172144
    Seller of Songbirds: 0.960885163281
    Belfry Spirit: 0.94205980104
    Thopter Engineer: 0.937997126577
    ~~ closest names ~~
    Angelic Edict: 0.814814814815
    Angelic Benediction: 0.787878787879
    Angelic Gift: 0.769230769231

    amaru, kithkin stalker 3WW
    legendary creature ~ zombie ogre (rare)
    when @ enters the battlefield, return two lands you control to their owner's hand.
    (4/4)
    ~~ closest cards ~~
    Bull Elephant: 0.877901631435
    Sea Drake: 0.873233698206
    Sun Ce, Young Conquerer: 0.872480873216
    Ancestral Statue: 0.857562732796
    Denizen of the Deep: 0.857541580064
    ~~ closest names ~~
    Amrou Kithkin: 0.685714285714
    Darkling Stalker: 0.684210526316
    Kithkin Healer: 0.666666666667

    runeclaw legionnaire 6R
    sorcery (common)
    destroy target artifact or land.
    ~~ closest cards ~~
    Craterize: 0.943219798495
    Volcanic Awakening: 0.935670876793
    Rain of Salt: 0.924433702409
    Demolish: 0.923601522562
    Volcanic Upheaval: 0.922650196092
    ~~ closest names ~~
    Porcelain Legionnaire: 0.780487804878
    Akron Legionnaire: 0.756756756757
    Sunstrike Legionnaire: 0.731707317073

    resounding protector 3WW
    creature ~ human cleric (uncommon)
    lifelink
    morph RWWW
    (4/4)
    ~~ closest cards ~~
    Daru Lancer: 0.964460991236
    Herald of Serra: 0.932999678628
    Malach of the Dawn: 0.919700593522
    Misthoof Kirin: 0.917751111515
    War Oracle: 0.909067766969
    ~~ closest names ~~
    Resounding Roar: 0.8
    Den Protector: 0.727272727273
    Resounding Scream: 0.702702702703

    guardian of the gargantuan 3W
    sorcery (common)
    target player discards a card. activate this ability only any time you could cast a sorcery.
    when @ dies, you gain 3 life.
    ~~ closest cards ~~
    He Who Hungers: 0.887264459653
    Cryptwailing: 0.870405470746
    Corpse Traders: 0.867095345262
    Mind Slash: 0.866894288506
    Smoldering Tar: 0.862753371859
    ~~ closest names ~~
    Gift of the Gargantuan: 0.833333333333
    Guardian of the Gateless: 0.76
    Guardian of the Guildpact: 0.745098039216

    moriok asperia 3B
    creature ~ insect (common)
    flying
    when @ enters the battlefield, each player discards a card.
    (2/2)
    ~~ closest cards ~~
    Sibsig Icebreakers: 0.952526201885
    Screeching Buzzard: 0.951097476572
    Liliana's Specter: 0.945062895623
    Cackling Fiend: 0.92885377014
    Slum Reaper: 0.918449624698
    ~~ closest names ~~
    Moriok Reaver: 0.740740740741
    Moriok Scavenger: 0.666666666667
    Moriok Rigger: 0.666666666667

    dread revival 4BB
    creature ~ human soldier (rare)
    at the beginning of your upkeep, you may exile a card from your hand into your library.
    (2/7)
    ~~ closest cards ~~
    Ratcatcher: 0.890540097382
    Squee, Goblin Nabob: 0.881222678726
    Wort, Boggart Auntie: 0.879233072045
    Tolarian Serpent: 0.868780377002
    Iname, Death Aspect: 0.864549627818
    ~~ closest names ~~
    Cruel Revival: 0.769230769231
    Dread Reaper: 0.72
    Dead Reveler: 0.72

    ancient rampart 2G
    creature ~ elemental mutant (uncommon)
    graft 2
    1G: until end of turn, target creature with a +1/+1 counter on it gains "R: this creature gets +1/+0 until end of turn."
    whenever enchanted creature deals damage to a creature, destroy the other creature at the beginning of the next end step.
    (0/0)
    ~~ closest cards ~~
    Nahiri's Machinations: 0.885012729734
    Simic Basilisk: 0.880507191798
    Evolution Vat: 0.879024214126
    Mark of Mutiny: 0.872083756315
    Dragon Mantle: 0.869206711294
    ~~ closest names ~~
    Ancient Amphitheater: 0.742857142857
    Ancient Crab: 0.740740740741
    Ancient Carp: 0.740740740741

    auriok survivors 1W
    creature ~ wall (common)
    defender
    (0/4)
    ~~ closest cards ~~
    Fortified Rampart: 0.980895926583
    Angelic Wall: 0.95360025249
    Steel Wall: 0.948263044457
    Wall of Earth: 0.928755126349
    Wall of Shields: 0.927821195713
    ~~ closest names ~~
    Auriok Survivors: 1.0

    anya's to dust 2WW
    enchantment (rare)
    at the beginning of your upkeep, you may put a % counter on @.
    at the beginning of your upkeep, you may pay 1. if you do, put a 1/1 white spirit creature token with flying onto the battlefield.
    ~~ closest cards ~~
    Bloodhall Ooze: 0.919890382305
    Tetravus: 0.912765324313
    Spirit Mirror: 0.91222867739
    Minion Reflector: 0.908319622427
    Forgotten Harvest: 0.903699486354
    ~~ closest names ~~
    Turn to Dust: 0.692307692308
    Dust to Dust: 0.692307692308
    Dawn to Dusk: 0.692307692308

    keldon berserker 4U
    creature ~ elemental spirit (common)
    when @ enters the battlefield, put the top four cards of your library into your graveyard.
    flashback G
    (4/5)
    ~~ closest cards ~~
    Armored Skaab: 0.916865489645
    Enigma Sphinx: 0.907041275483
    Forsaken Drifters: 0.901702336436
    Necromancer's Assistant: 0.888697685014
    Crow of Dark Tidings: 0.877454958073
    ~~ closest names ~~
    Keldon Berserker: 1.0

    citanul shaper 5
    artifact creature ~ golem (common)
    1: target creature gains protection from the color of your choice until end of turn.
    (2/2)
    ~~ closest cards ~~
    Scrapbasket: 0.882306071994
    Rainbow Crow: 0.87898362206
    Pale Wayfarer: 0.868042694974
    Shell Skulkin: 0.866152685985
    Antler Skulkin: 0.865959338557
    ~~ closest names ~~
    Vital Splicer: 0.666666666667
    Tangle Spider: 0.666666666667
    Soilshaper: 0.666666666667

    mogic recluse 4
    artifact (rare)
    whenever a creature without flying attacks you or a plane card at random and sacrifice it. if you do, search your library for a card and put that card into your hand. otherwise, put it into your graveyard.
    ~~ closest cards ~~
    Momir Vig, Simic Visionary: 0.95710973685
    Remembrance: 0.947952948825
    Enduring Renewal: 0.946416645301
    Foster: 0.946013823175
    Lost in the Woods: 0.942446593712
    ~~ closest names ~~
    Ogre Recluse: 0.8
    Gorgon Recluse: 0.740740740741
    Oran-Rief Recluse: 0.666666666667

    grizzly sentinel 3GG
    creature ~ yeti (common)
    2: @ gets +1/+1 until end of turn.
    (3/3)
    ~~ closest cards ~~
    Folk of the Pines: 0.970360279802
    Ursapine: 0.953490881829
    Tyrranax: 0.949483629569
    Dross Ripper: 0.947353891113
    Shambling Strider: 0.943517255332
    ~~ closest names ~~
    Griffin Sentinel: 0.75
    Ghostly Sentinel: 0.75
    Gargoyle Sentinel: 0.727272727273

    magus of the falling team 1UU
    creature ~ human wizard (rare)
    2U, T: [1 = put target artifact, creature, or land of them on the bottom of your library. activate this ability only if you have no cards in hand.
    (2/2)
    ~~ closest cards ~~
    Moonring Island: 0.889523809692
    Conjurer's Bauble: 0.855382016104
    Renowned Weaponsmith: 0.852400310447
    Mistveil Plains: 0.848347601083
    Weathered Wayfarer: 0.845168674841
    ~~ closest names ~~
    Magus of the Arena: 0.744186046512
    Magus of the Vineyard: 0.739130434783
    Magus of the Future: 0.727272727273

    hand of coleach 1G
    instant (common)
    until end of turn, @ becomes a 3/2 blue and red elemental creature with vigilance until end of turn. it's still a land.
    when enchanted land dies, return that card to its owner's hand.
    ~~ closest cards ~~
    Hydroform: 0.897075532829
    Vivify: 0.894924233864
    Genju of the Realm: 0.880012259248
    Animate Land: 0.879207125876
    Genju of the Cedars: 0.877776097097
    ~~ closest names ~~
    Hand of Death: 0.785714285714
    Herald of Leshrac: 0.6875
    Hand of Justice: 0.666666666667

    mesa of underturun 4B
    sorcery (rare)
    target player discards two cards. you gain 3 life for each creature card in your graveyard.
    ~~ closest cards ~~
    Urza's Guilt: 0.870778380663
    Read the Bones: 0.846247654928
    Extortion: 0.843050668524
    Witness the End: 0.839191634501
    Ancient Craving: 0.836330588491
    ~~ closest names ~~
    Fires of Undeath: 0.647058823529
    Test of Endurance: 0.628571428571
    March of the Returned: 0.615384615385

    lighthorment mantle 2W
    creature ~ human wizard (mythic rare)
    2, T: search your library for a basic land card, reveal it, and put it into your hand. then shuffle your library.
    @ can't be uncasted.
    whenever you gain life, put two +1/+1 counters on @.
    (2/2)
    ~~ closest cards ~~
    Horizon Spellbomb: 0.948832783588
    Expedition Map: 0.942574340799
    Yavimaya Elder: 0.939763402641
    Wanderer's Twig: 0.934530685052
    Traveler's Amulet: 0.934530685052
    ~~ closest names ~~
    Tormented Angel: 0.647058823529
    Lightning Mauler: 0.628571428571
    Spirit Mantle: 0.625

    hivelate mystic 1R
    creature ~ human shaman (common)
    soulbond
    as long as @ is paired with another creature, each of those creatures has "R: this creature gets +1/+0 until end of turn."
    (1/1)
    ~~ closest cards ~~
    Stonewright: 0.996022962186
    Flaring Flame-Kin: 0.897666913904
    Scourge of the Nobilis: 0.862394505097
    Fires of Yavimaya: 0.820118061405
    Everflame Eidolon: 0.816679256378
    ~~ closest names ~~
    Kitsune Mystic: 0.689655172414
    Lunar Mystic: 0.666666666667
    Rootwater Mystic: 0.645161290323

    flowstone blood 3RR
    creature ~ sliver (uncommon)
    all sliver creatures have fear.
    (4/4)
    ~~ closest cards ~~
    Battering Sliver: 0.963989880765
    Fury Sliver: 0.959850222202
    Spitting Sliver: 0.930620909733
    Synchronous Sliver: 0.912354032516
    Lymph Sliver: 0.903744782352
    ~~ closest names ~~
    Flowstone Flood: 0.933333333333
    Flowstone Blade: 0.866666666667
    Flowstone Slide: 0.8

    shattered noble 2W
    creature ~ human soldier (uncommon)
    horsemanship
    (2/2)
    ~~ closest cards ~~
    Shu Cavalry: 0.99534239568
    Alert Shu Infantry: 0.982938028089
    Shu Foot Soldiers: 0.982298344287
    Alaborn Trooper: 0.982298344287
    Glory Seeker: 0.974844926956
    ~~ closest names ~~
    Shattered Angel: 0.8
    Battered Golem: 0.758620689655
    Faerie Noble: 0.740740740741

    warden of the mists 2W
    enchantment (uncommon)
    whenever a card is put into an opponent's graveyard from anywhere, you may pay B. if you do, draw a card.
    enchanted land is a 5/5 green human creature that's still a land.
    ~~ closest cards ~~
    Compost: 0.917451894111
    Burgeoning: 0.914354659468
    Pedantic Learning: 0.906031965549
    Druidic Satchel: 0.904932392854
    Ceta Sanctuary: 0.903216212564
    ~~ closest names ~~
    Warden of the First Tree: 0.790697674419
    Warden of the Eye: 0.777777777778
    Sword of the Animist: 0.769230769231

    krark~clan infiltrator 3GG
    creature ~ elemental (uncommon)
    at the beginning of your upkeep, sacrifice @ unless you pay 1G.
    (6/6)
    ~~ closest cards ~~
    Darba: 0.964631764428
    Hungry Mist: 0.959176246967
    Wild Leotau: 0.950747281025
    Endless Wurm: 0.930211319303
    Kami of the Tended Garden: 0.927120341663
    ~~ closest names ~~
    Marchesa's Infiltrator: 0.727272727273
    Krark-Clan Stoker: 0.717948717949
    Krark-Clan Ironworks: 0.714285714286

    _NONAME_ _NOCOST_ _INVALID_
    creature ~ human warrior
    whenever @ becomes blocked, it gets +1/+1 un
    (1/1)
    ~~~~~~~~
    _NONAME_ _NOCOST_ _UNPARSED_ _INVALID_

    ~~ closest cards ~~
    Norwood Warrior: 0.808355631684
    Benalish Veteran: 0.799284518537
    Cave Tiger: 0.797053597605
    Trained Cheetah: 0.793036034112
    Village Cannibals: 0.775182625109
    ~~ closest names ~~
    Zzzyxas's Abyss: 0.0
    Zurgo Helmsmasher: 0.0
    Zurgo Bellstriker: 0.0
    Posted in: Custom Card Creation
  • 3

    posted a message on Generating Magic cards using deep, recurrent neural networks
    First, a tiny dump of annotated but otherwise totally unedited cards from the first 10,000 characters that came out of the network.
    gluttonous portal _NOCOST_
    ^/&^^^^^^ r (rare)
    vigilance
    lifelink
    indestructible
    ~~ closest cards ~~
    Baneslayer Angel: 0.8188183902
    Akroma, Angel of Wrath: 0.816899179321
    Transcendent Master: 0.784022304396
    Chromanticore: 0.779068070798
    Sphinx of the Steel Wind: 0.770691440463
    ~~ closest names ~~
    Gluttonous Slime: 0.727272727273
    Gluttonous Zombie: 0.705882352941
    Gluttonous Cyclops: 0.685714285714

    chiod's echorack 1GG
    creature ~ vampire (uncommon)
    haste
    whenever an opponent sacrifices a land.
    (2/2)
    ~~ closest cards ~~
    Thresher Beast: 0.790282707506
    Hurloon Shaman: 0.77458351557
    Valeron Wardens: 0.772289965544
    Dirtcowl Wurm: 0.751274250557
    Ogre Recluse: 0.751261829229
    ~~ closest names ~~
    Chitinous Cloak: 0.645161290323
    Zephid's Embrace: 0.625
    Champion's Drake: 0.625

    basal trutoder 1W
    creature ~ horror (uncommon)
    defender
    vigilance
    (0/3)
    ~~ closest cards ~~
    Guardians of Akrasa: 0.944635065591
    Angelic Wall: 0.930722846763
    Wall of Swords: 0.930702712787
    Wall of Shields: 0.913222187607
    Wall of Spears: 0.912694133187
    ~~ closest names ~~
    Basal Thrull: 0.692307692308
    Coastal Tower: 0.666666666667
    Blastoderm: 0.666666666667

    krovikon griffin 4WG
    creature ~ dragon (rare)
    flying
    @ gets +1/+1 for each other sliver creature you control.
    (4/4)
    ~~ closest cards ~~
    Earth Servant: 0.89492755011
    Walker of the Wastes: 0.885437587654
    Gallows Warden: 0.873846396998
    Battleground Geist: 0.866657611183
    Sapphire Drake: 0.862135485655
    ~~ closest names ~~
    Diving Griffin: 0.733333333333
    Teremko Griffin: 0.709677419355
    Makindi Griffin: 0.709677419355

    endbringer 3G
    instant (uncommon)
    destroy target artifact or enchantment. @ deals 3 damage to that artifact's controller.
    golem creatures you control get +0/+2.
    ~~ closest cards ~~
    Spirit Flare: 0.834543260687
    Destructive Revelry: 0.832750196035
    Smash to Smithereens: 0.831992052198
    Aftershock: 0.828265194739
    Hit: 0.826632792249
    ~~ closest names ~~
    Endbringer: 1.0

    sundered monstrosity 1G
    creature ~ lizard (common)
    whenever @ blocks, it gets +2/+0 until end of turn and becomes a colorless blocking @.
    (2/2)
    ~~ closest cards ~~
    Deepwood Wolverine: 0.944603489209
    Folk of An-Havva: 0.930765297039
    Giant Badger: 0.920917757919
    Chub Toad: 0.920893935326
    Cave Tiger: 0.918605363689
    ~~ closest names ~~
    Etched Monstrosity: 0.789473684211
    Cursed Monstrosity: 0.789473684211
    Ashen Monstrosity: 0.756756756757

    dragonlord adaptation 3RR
    instant (rare)
    split second
    put a 5/5 green beast creature token onto the battlefield.
    unearth 1RG
    ~~ closest cards ~~
    Dragon Roost: 0.879358905207
    Walker of the Grove: 0.867658196053
    Hunting Pack: 0.867509465312
    Roar of the Wurm: 0.866032090906
    Savage Conception: 0.834222903288
    ~~ closest names ~~
    Forced Adaptation: 0.736842105263
    Dragonlord Ojutai: 0.736842105263
    Dragonlord Atarka: 0.736842105263

    dragon predator 1RRR
    creature ~ human shaman (rare)
    whenever another goblin you control becomes blocked, target opponent khiss combat phase followed by an additional main phase. add RRR to your mana pool.
    (2/2)
    ~~ closest cards ~~
    Brothers of Fire: 0.726443188787
    Krark-Clan Stoker: 0.715647783834
    Skirsdag Cultist: 0.712423310008
    Krark-Clan Shaman: 0.71224428557
    Orcish Mechanics: 0.707948645007
    ~~ closest names ~~
    Trygon Predator: 0.866666666667
    Dragon Breath: 0.785714285714
    Kavu Predator: 0.714285714286

    krosan helix 2GG
    creature ~ elk (uncommon)
    when @ dies, return it to the battlefield transformed under your control at the beginning of the next end step.
    (2/2)
    ~~ closest cards ~~
    Saltskitter: 0.931422975666
    Glimmerpoint Stag: 0.907490591205
    Anurid Brushhopper: 0.893378054906
    Phytotitan: 0.886874619083
    Flickerwisp: 0.875792897899
    ~~ closest names ~~
    Krosan Archer: 0.72
    Krosan Grip: 0.695652173913
    Akroan Phalanx: 0.692307692308

    guardian loreshaker 5U
    legendary creature ~ angel (rare)
    flying
    1W: @'s owner shuffles it into his or her library.
    (3/3)
    ~~ closest cards ~~
    Cerulean Sphinx: 0.925720789341
    Ulamog, the Ceaseless Hunger: 0.812518788373
    Ulamog, the Infinite Gyre: 0.811970678297
    Patron of the Moon: 0.811072876844
    Emrakul, the Aeons Torn: 0.797652187587
    ~~ closest names ~~
    Guardian Lions: 0.727272727273
    Guardian Seraph: 0.705882352941
    Guardians of Akrasa: 0.684210526316

    goblin war scout R
    creature ~ human cleric (common)
    G, T: target blocking creature gets +2/+0 until end of turn.
    (1/1)
    ~~ closest cards ~~
    Kithkin Daggerdare: 0.947330350697
    Armorer Guildmage: 0.946039914768
    Anointer of Champions: 0.945650914044
    Infantry Veteran: 0.942760504728
    Shield Mate: 0.941964877594
    ~~ closest names ~~
    Goblin Scouts: 0.827586206897
    Goblin War Cry: 0.8
    Goblin War Strike: 0.787878787879

    diabolic venom 2G
    instant (rare)
    target player can't cast noncreature spells this turn with the same name as that creature and exile them. then that player shuffles his or her library.
    ~~ closest cards ~~
    Slaughter Games: 0.925839321727
    Thought Hemorrhage: 0.911719780734
    Quash: 0.911459156921
    Counterbore: 0.907473263643
    Splinter: 0.898265391769
    ~~ closest names ~~
    Diabolic Vision: 0.758620689655
    Diabolic Intent: 0.758620689655
    Diabolic Revelation: 0.727272727273

    leader bear 3
    artifact (rare)
    you may spend white mana as though it were mana of any color.
    ~~ closest cards ~~
    Sunglasses of Urza: 0.940149651008
    North Star: 0.804966208591
    Caged Sun: 0.744406169567
    Seal of the Guildpact: 0.731725998807
    Trinisphere: 0.731031260923
    ~~ closest names ~~
    Golden Bear: 0.727272727273
    Ulvenwald Bear: 0.72
    Molder Beast: 0.695652173913

    spikix ingest _NOCOST_
    basic land ~ forest (basic land)
    ~~ closest cards ~~
    Forest: 1.0
    Plains: 0.980393841137
    Snow-Covered Forest: 0.978712636833
    Mountain: 0.978246791161
    Swamp: 0.977736454229
    ~~ closest names ~~
    Silk Net: 0.666666666667
    Spike Jester: 0.64
    Simic Signet: 0.64

    despire of shadows 2W
    creature ~ cleric (uncommon)
    protection from black
    cast @ only if you've been attacked this step.
    (2/2)
    ~~ closest cards ~~
    Skyshroud Condor: 0.792479598599
    Illusory Angel: 0.693485012952
    Kongming's Contraptions: 0.688698892859
    Hewed Stone Retainers: 0.666411533431
    Steam Catapult: 0.649252443338
    ~~ closest names ~~
    Spiteful Shadows: 0.764705882353
    Reach of Shadows: 0.764705882353
    Dance of Shadows: 0.764705882353

    wind skyjuk 5
    land (uncommon)
    T: add R to your mana pool.
    @ enters the battlefield tapped.
    cycling 1(W/U)
    ~~ closest cards ~~
    Worn Powerstone: 0.912329085723
    Fire Diamond: 0.906766888588
    Marble Diamond: 0.901153140935
    Sky Diamond: 0.9009224547
    Moss Diamond: 0.897060280449
    ~~ closest names ~~
    Winter Sky: 0.666666666667
    Daring Skyjek: 0.666666666667
    Wind Sail: 0.6

    bomber strength 1G
    creature ~ horror (common)
    evolve
    reach
    (1/1)
    ~~ closest cards ~~
    Crocanura: 0.959268947096
    Bayou Dragonfly: 0.94849991444
    Deadly Recluse: 0.933973818773
    Battering Krasis: 0.930337332391
    Grappler Spider: 0.93013399251
    ~~ closest names ~~
    Consume Strength: 0.774193548387
    Brute Strength: 0.758620689655
    Holy Strength: 0.714285714286

    kitsune troll 1W
    creature ~ human druid ally (uncommon)
    you may choose not to untap @ during your untap step.
    B: regenerate @.
    (2/2)
    ~~ closest cards ~~
    Rubinia Soulsinger: 0.837582936054
    Hisoka's Guard: 0.835320641495
    Rust Tick: 0.828937476187
    Willow Satyr: 0.826688162716
    Mole Worms: 0.8254235795
    ~~ closest names ~~
    Sea Troll: 0.727272727273
    Jungle Troll: 0.72
    Hunted Troll: 0.72

    juvana's thirst _NOCOST_
    land (uncommon)
    T: add C to your mana pool.
    3, T: add one mana of any color to your mana pool.
    ~~ closest cards ~~
    School of the Unseen: 0.998196558408
    Henge of Ramos: 0.998196558408
    Unknown Shores: 0.9913722918
    Shimmering Grotto: 0.9913722918
    Prismatic Lens: 0.98458082777
    ~~ closest names ~~
    Sorin's Thirst: 0.689655172414
    Cankerous Thirst: 0.645161290323
    Eternal Thirst: 0.620689655172

    mindwrack nightstalker 2B
    artifact (rare)
    at the beginning of each player's upkeep, that player gets a % counter. that player sacrifices a creature.
    @ deals X damage to target creature or player.
    creatures the active player controls get -1/-1 until end of turn.
    ~~ closest cards ~~
    Keldon Twilight: 0.863312108208
    Impatience: 0.856526499698
    Pestilence: 0.85625866114
    Mind Whip: 0.854169334688
    Insubordination: 0.854040245031
    ~~ closest names ~~
    Shimian Night Stalker: 0.744186046512
    Brutal Nightstalker: 0.731707317073
    Raiding Nightstalker: 0.714285714286

    mongref pielcence W
    enchantment (uncommon)
    whenever you cast a white spell, you may put a 1/1 blue merfolk creature token onto the battlefield.
    ~~ closest cards ~~
    Fable of Wolf and Owl: 0.951339880214
    Spirit Cairn: 0.922096216572
    Goblinslide: 0.92012490633
    Militia's Pride: 0.912918362988
    Ulvenwald Mysteries: 0.909994505399
    ~~ closest names ~~
    Moment of Silence: 0.647058823529
    Mongrel Pack: 0.620689655172
    Stony Silence: 0.6

    root seeker GU
    creature ~ human rogue ally (uncommon)
    3G: search your library for a land card, put it onto the battlefield, then shuffle your library.
    (3/2)
    ~~ closest cards ~~
    Frontier Guide: 0.960960107726
    Skyshroud Poacher: 0.956056926292
    Seahunter: 0.953043886947
    Bogbrew Witch: 0.952608164341
    Yavimaya Granger: 0.946672078052
    ~~ closest names ~~
    Blood Seeker: 0.782608695652
    Amrou Seekers: 0.75
    Root Spider: 0.727272727273

    commande camion 3U
    sorcery (rare)
    return all nonland permanents to their owners' hands.
    replicate 4U
    ~~ closest cards ~~
    Rebuild: 0.923131658492
    Essence Fracture: 0.923041104902
    Devastation Tide: 0.919049787529
    Kederekt Leviathan: 0.860561043947
    Dematerialize: 0.847234339014
    ~~ closest names ~~
    Command Beacon: 0.758620689655
    Ondu Champion: 0.714285714286
    Commando Raid: 0.714285714286

    angel of phyrexia 1WUW
    creature ~ spirit (rare)
    flying
    threshold ~ as long as seven or more cards are in your graveyard, @ gets +2/+2 and attacks each turn if able.
    W, T: put an % counter on target artifact. it gains "3B: regenerate this creature."
    (3/1)
    ~~ closest cards ~~
    Possessed Aven: 0.853859414373
    Boneshard Slasher: 0.847564685647
    Possessed Nomad: 0.845516380593
    Repentant Vampire: 0.831450468943
    Possessed Barbarian: 0.829174193972
    ~~ closest names ~~
    Caress of Phyrexia: 0.8
    Gate to Phyrexia: 0.787878787879
    Angel of Renewal: 0.727272727273

    auriok revelers WGBW
    enchantment (rare)
    all creatures have shroud.
    ~~ closest cards ~~
    Terra Eternal: 0.83335258432
    Hanna's Custody: 0.822890761689
    Ivory Mask: 0.809375965545
    Aysen Highway: 0.79483358273
    True Conviction: 0.760500534141
    ~~ closest names ~~
    Auriok Steelshaper: 0.727272727273
    Moriok Reaver: 0.714285714286
    Auriok Survivors: 0.709677419355

    sorin's jester 1B
    sorcery (uncommon)
    all creatures get -1/-1 until end of turn.
    ~~ closest cards ~~
    Shrivel: 0.994223735941
    Nausea: 0.994223735941
    Hell Swarm: 0.950450803974
    Cower in Fear: 0.949674984448
    Stench of Decay: 0.9466069388
    ~~ closest names ~~
    Demon's Jester: 0.785714285714
    Sorin's Thirst: 0.714285714286
    Spike Jester: 0.692307692308

    stabbing grip 3RB
    creature ~ basilisk (uncommon)
    when @ dies, it deals 3 damage to each creature and each player.
    (1/2)
    ~~ closest cards ~~
    Pitchburn Devils: 0.907575821403
    Thrashing Wumpus: 0.881424276926
    Rage Thrower: 0.874119782003
    Mudbutton Torchrunner: 0.869712229326
    Shockmaw Dragon: 0.864731028483
    ~~ closest names ~~
    Stabbing Pain: 0.769230769231
    Saving Grasp: 0.72
    Stalking Tiger: 0.666666666667

    recromancy 2BB
    creature ~ horror (uncommon)
    when you cast a creature spell, @ gains forestwalk until end of turn.
    (3/3)
    ~~ closest cards ~~
    Gristle Grinner: 0.867288534377
    Undead Executioner: 0.859904247215
    Marsh Lurker: 0.856110531604
    Blind Creeper: 0.847301926308
    Warchanter of Mogis: 0.842115556717
    ~~ closest names ~~
    Necromancy: 0.9
    Sarcomancy: 0.8
    Retromancer: 0.761904761905

    auriok immense 1
    artifact (uncommon)
    3U, T: look at the top three cards of target player's library, then put them back in any order.
    ~~ closest cards ~~
    Elemental Augury: 0.961370469521
    Soothsaying: 0.956535386816
    Sensei's Divining Top: 0.934053075435
    Thran Tome: 0.921966614188
    Browse: 0.913194441889
    ~~ closest names ~~
    Auriok Siege Sled: 0.709677419355
    Auriok Sunchaser: 0.666666666667
    Auriok Transfixer: 0.645161290323

    selkie spearbok 3G
    sorcery (rare)
    destroy all nonland permanents.
    ~~ closest cards ~~
    Acid Rain: 0.91757540482
    Ravages of War: 0.916556858129
    Armageddon: 0.916556858129
    Creeping Corrosion: 0.886857377984
    Tsunami: 0.877528280435
    ~~ closest names ~~
    Seed Spark: 0.72
    Searing Spear: 0.642857142857
    Squeaking Pie Sneak: 0.588235294118

    steam seer 4
    artifact creature ~ construct (rare)
    G, sacrifice @: draw a card.
    T: add G or U to your mana pool.
    @ enters the battlefield with two +1/+1 counters on it.
    2, remove a +1/+1 counter from @: @ deals 1 damage to target creature or player.
    (3/4)
    ~~ closest cards ~~
    Trigon of Thought: 0.925111137656
    Trigon of Mending: 0.9238530824
    Serum Tank: 0.918791113011
    Prism Array: 0.913966251575
    Trigon of Corruption: 0.913152320302
    ~~ closest names ~~
    Steam Spitter: 0.782608695652
    Soratami Seer: 0.782608695652
    Viscera Seer: 0.727272727273

    lord of impestery 5BB
    sorcery (rare)
    destroy target creature. its controller loses life equal to the number of attacking creatures and/or players.
    ~~ closest cards ~~
    Deadly Tempest: 0.795840275785
    Rain of Daggers: 0.791469577486
    Consuming Vapors: 0.785294876722
    Twisted Justice: 0.779572226568
    Phthisis: 0.77862007233
    ~~ closest names ~~
    Ward of Piety: 0.666666666667
    Trail of Mystery: 0.666666666667
    Lord of Tresserhorn: 0.666666666667

    hold gnarlid R
    creature ~ elf warrior (common)
    1GR: destroy target island or suspended creature.
    (2/2)
    ~~ closest cards ~~
    Dwarven Miner: 0.850247143926
    Dwarven Blastminer: 0.841675081073
    Gruul Guildmage: 0.816148065058
    Reckless Reveler: 0.815422769176
    Elvish Skysweeper: 0.812211986697
    ~~ closest names ~~
    Aura Gnarlid: 0.666666666667
    Herd Gnarr: 0.636363636364
    Homarid: 0.631578947368

    swalloward's shadow 5
    artifact creature ~ sliver (rare)
    all sliver creatures have haste.
    at the beginning of your upkeep, destroy the creature with the least power and toughness until end of turn. the flashback cost is equal to its mana cost.
    (2/2)
    ~~ closest cards ~~
    Halfdane: 0.833205358085
    Junkyo Bell: 0.828853887027
    Might Makes Right: 0.804335552157
    Fatal Frenzy: 0.793594669792
    Stone Giant: 0.79249147998
    ~~ closest names ~~
    Wall of Shadows: 0.705882352941
    Altar of Shadows: 0.628571428571
    Warlord's Axe: 0.625

    lithotongue 2B
    creature ~ ape (common)
    when @ becomes the target of a spell or ability, sacrifice it.
    (2/2)
    ~~ closest cards ~~
    Skulking Fugitive: 0.946648931477
    Tar Pit Warrior: 0.93265009944
    Skulking Ghost: 0.928350568323
    Skulking Knight: 0.926571786967
    Frost Walker: 0.918958711904
    ~~ closest names ~~
    Lithatog: 0.736842105263
    Lithophage: 0.666666666667
    Frog Tongue: 0.636363636364

    fatal queen 4G
    legendary creature ~ human (common)
    (3/4)
    ~~ closest cards ~~
    Jasmine Boreal: 0.977719320155
    Meng Huo's Horde: 0.977290369306
    Order of the Sacred Bell: 0.976834664709
    Southern Elephant: 0.973279593832
    Thraben Purebloods: 0.972246309715
    ~~ closest names ~~
    Ant Queen: 0.8
    Fatal Fumes: 0.727272727273
    Fatal Frenzy: 0.695652173913

    verdant reflection 4U
    creature ~ snake (common)
    flying
    deathtouch
    (3/2)
    ~~ closest cards ~~
    Jagwasp Swarm: 0.961767070984
    Silver Erne: 0.961562385864
    Sultai Scavenger: 0.961283564817
    Wind Spirit: 0.960575519434
    Cloud Manta: 0.959434798311
    ~~ closest names ~~
    Dawn's Reflection: 0.8
    Mana Reflection: 0.787878787879
    Dazzling Reflection: 0.756756756757

    spirit snapper WW
    enchantment (uncommon)
    whenever you sacrifice an enchantment, @ gets +2/+0 and has flying.
    as long as enchanted creature is blue, it gets +1/+1 and has flying.
    ~~ closest cards ~~
    Favor of the Overbeing: 0.937491770388
    Edge of the Divinity: 0.932537650757
    Shield of the Oversoul: 0.930202790519
    Clout of the Dominus: 0.92835529933
    Hope Against Hope: 0.928199113917
    ~~ closest names ~~
    Silburlind Snapper: 0.75
    Spirit Weaver: 0.740740740741
    Shore Snapper: 0.740740740741

    tukul, scarmasher trapper 4BB
    creature ~ spirit avatar (uncommon)
    flying
    whenever a dragon you control attacks alone, then each opponent loses 1 life. you gain life equal to the life lost this way.
    (3/4)
    ~~ closest cards ~~
    Kokusho, the Evening Star: 0.934736640007
    Cliffhaven Vampire: 0.859388423613
    Sanguine Bond: 0.852654571535
    Exquisite Blood: 0.845056970224
    Malakir Bloodwitch: 0.84005906483
    ~~ closest names ~~
    Tuktuk Scrapper: 0.65
    Gruul Scrapper: 0.615384615385
    Anurid Swarmsnapper: 0.545454545455

    crade sliver 4R
    creature ~ elf warrior (rare)
    trample
    whenever @ deals damage, you gain that much life.
    (3/3)
    ~~ closest cards ~~
    Warrior Angel: 0.909867407313
    Dromad Purebred: 0.898520187358
    Kjeldoran Gargoyle: 0.893607465716
    Horned Cheetah: 0.864828164737
    Kami of the Honored Dead: 0.864111337827
    ~~ closest names ~~
    Blade Sliver: 0.833333333333
    Ward Sliver: 0.782608695652
    Sedge Sliver: 0.75

    barbarian wight 1R
    enchantment ~ aura (common)
    enchant creature
    flash
    enchanted creature gets +3/+3 and has first strike.
    ~~ closest cards ~~
    Flaming Sword: 0.983004315664
    Lightning Talons: 0.977216922255
    Madcap Skills: 0.966198447446
    Volcanic Strength: 0.964765968488
    Spiteful Motives: 0.964366659329
    ~~ closest names ~~
    Barbarian Ring: 0.827586206897
    Barbarian Horde: 0.733333333333
    Barbarian Guides: 0.709677419355

    wirefly hive XR
    sorcery (rare)
    destroy all nontoken permanents except for artifacts and lands.
    ~~ closest cards ~~
    Jokulhaups: 0.823790440676
    Ruination: 0.812546322468
    Anarchy: 0.809536524163
    Wake of Destruction: 0.809289585788
    Ravages of War: 0.801391151382
    ~~ closest names ~~
    Wirefly Hive: 1.0

    groffspee B
    sorcery (common)
    target creature gets +1/+0 and gains infect until end of turn.
    ~~ closest cards ~~
    Tainted Strike: 0.995283652987
    Coat with Venom: 0.974966798663
    Grotesque Mutation: 0.955107269155
    Virulent Swipe: 0.949607361929
    Rush of Adrenaline: 0.947713998253
    ~~ closest names ~~
    Burst of Speed: 0.608695652174
    Auger Spree: 0.6
    Rouse: 0.571428571429

    sandbar emperialist 4UU
    creature ~ bird soldier (uncommon)
    flying
    trample
    when @ enters the battlefield, target opponent discards a card for each % counter he or she owns.
    whenever a creature you control with a +1/+1 counter on it deals combat damage to a player, you may draw a card.
    2U, sacrifice @: return all enchantment cards from your graveyard to your hand.
    (3/3)
    ~~ closest cards ~~
    Doomsday Specter: 0.898287820391
    Jinxed Ring: 0.887072897138
    Eye of Doom: 0.882140178013
    Krovikan Horror: 0.877385097647
    Derevi, Empyrial Tactician: 0.874495431172
    ~~ closest names ~~
    Sandbar Serpent: 0.705882352941
    Sandbar Merfolk: 0.705882352941
    Daru Spiritualist: 0.666666666667

    rhift the watch 1UW
    enchantment (uncommon)
    whenever a creature with flying attacks you, @ deals 2 damage to it.
    ~~ closest cards ~~
    Raking Canopy: 0.934651824934
    Soul Seizer: 0.908009942398
    Circle of Flame: 0.896141129315
    Powerstone Minefield: 0.894608348476
    Barbed Foliage: 0.868199044112
    ~~ closest names ~~
    Captain of the Watch: 0.685714285714
    Eagle of the Watch: 0.666666666667
    Eyes of the Watcher: 0.647058823529

    stonebrough the ancients 3RR
    legendary creature ~ elf warrior (uncommon)
    creatures your opponents control with a +1/+1 counter on it deals damage equal to its power to @.
    (4/4)
    ~~ closest cards ~~
    Preyseizer Dragon: 0.829788593644
    Kilnmouth Dragon: 0.804225112649
    Borborygmos: 0.795832996887
    Falkenrath Marauders: 0.787075931031
    Thundercloud Shaman: 0.781348157973
    ~~ closest names ~~
    Sporoloth Ancient: 0.682926829268
    Retribution of the Ancients: 0.666666666667
    Seshiro the Anointed: 0.636363636364

    waterveil expedition G
    instant (common)
    target creature gets +4/+4 until end of turn. untap that creature.
    ~~ closest cards ~~
    Savage Surge: 0.966574345005
    Gerrard's Command: 0.957124757876
    Vines of the Recluse: 0.94774022525
    Aim High: 0.942833795867
    Giant Growth: 0.940586390183
    ~~ closest names ~~
    Aerial Predation: 0.722222222222
    Waterveil Cavern: 0.666666666667
    Ior Ruin Expedition: 0.666666666667

    un demon 1B
    instant (uncommon)
    uncast target spell. if that spell is uncasted this way, exile it instead of putting it into its owner's graveyard.
    madness 1B
    ~~ closest cards ~~
    Deny Existence: 0.958554458026
    Void Shatter: 0.948519768068
    Dissipate: 0.947966845871
    Spell Shrivel: 0.938809977453
    Syncopate: 0.935114028221
    ~~ closest names ~~
    Demon: 0.769230769231
    Undermine: 0.705882352941
    Hunt Down: 0.705882352941

    abwatch 1W
    instant (common)
    prevent all combat damage that would be dealt by target attacking creature this turn.
    ~~ closest cards ~~
    Warning: 0.993446939788
    Holy Day: 0.972350283159
    Azorius Ploy: 0.968864593621
    Terrifying Presence: 0.965055047384
    Ethereal Haze: 0.962309337415
    ~~ closest names ~~
    Watchdog: 0.666666666667
    Death Watch: 0.666666666667
    Catch: 0.666666666667

    kemba's cavalry 4W
    creature ~ human soldier (common)
    vigilance
    (1/6)
    ~~ closest cards ~~
    Ardent Militia: 0.991528178138
    Border Patrol: 0.990563232458
    Guardian Lions: 0.983408392963
    Icatian Phalanx: 0.977083842344
    Foot Soldiers: 0.976106876379
    ~~ closest names ~~
    Takeno's Cavalry: 0.774193548387
    Skyspear Cavalry: 0.709677419355
    Benalish Cavalry: 0.709677419355

    deathreat guide 2
    artifact (rare)
    when an enchantment is a creature with power 3 or greater, you may pay 2 any number of times. a creature card is revealed this way. put any number of those cards with that name into its owner's hand.
    ~~ closest cards ~~
    Transmute Artifact: 0.902741959665
    Goblin Charbelcher: 0.891930501929
    Erratic Explosion: 0.889981688335
    Thought Dissector: 0.882805617203
    Helm of Obedience: 0.879338891347
    ~~ closest names ~~
    Ethereal Guidance: 0.75
    Deathrender: 0.692307692308
    Sacred Guide: 0.666666666667

    rune~slinger expert 2G
    artifact creature ~ golem (rare)
    cumulative upkeep 1
    at the beginning of each player's upkeep, that player exiles two cards with choses "achilice onto arcane for mana, that player adds one mana of any color to his or her mana pool .
    (5/5)
    ~~ closest cards ~~
    Blinkmoth Urn: 0.883819268908
    Spectral Searchlight: 0.845889640876
    Mana Flare: 0.835329115885
    Heartbeat of Spring: 0.834589750281
    Eladamri's Vineyard: 0.82612940931
    ~~ closest names ~~
    Kor Line-Slinger: 0.628571428571
    Sunspring Expedition: 0.615384615385
    Quill-Slinger Boggart: 0.6

    nyxborn wolf 3G
    creature ~ elf shaman (common)
    when @ is turned face up, all creatures get -1/-1 until end of turn.
    (2/2)
    ~~ closest cards ~~
    Minister of Pain: 0.827968350561
    Woodcloaker: 0.793255907345
    Yeva's Forcemage: 0.793048601265
    Undead Executioner: 0.780561239904
    Defender of the Order: 0.777441554318
    ~~ closest names ~~
    Nyxborn Wolf: 1.0

    whip~kin spellbomb 1U
    creature ~ thalakos (rare)
    islandwalk
    you may choose not to untap @ during your untap step.
    T: prevent the next 3 damage that would be dealt to target creature this turn.
    1R: target creature gains flying until end of turn.
    (2/2)
    ~~ closest cards ~~
    Raka Disciple: 0.883662973887
    Esper Battlemage: 0.876983676645
    Samite Alchemist: 0.867028696852
    Nahiri's Machinations: 0.833100458741
    Glittering Lynx: 0.83048696496
    ~~ closest names ~~
    Origin Spellbomb: 0.764705882353
    Horizon Spellbomb: 0.742857142857
    Nihil Spellbomb: 0.727272727273

    tower of arms 2
    artifact ~ equipment (uncommon)
    equip 2
    equipped creature has haste and "B: regenerate this creature."
    ~~ closest cards ~~
    Heartseeker: 0.939665399159
    Siren Song Lyre: 0.936693559404
    Manriki-Gusari: 0.934262211496
    Witches' Eye: 0.928554226987
    Leonin Bola: 0.924629330112
    ~~ closest names ~~
    Tower of Murmurs: 0.827586206897
    Master of Arms: 0.814814814815
    Tower of Champions: 0.774193548387

    pestilence reaver BB
    creature ~ human cleric (common)
    T: add B to your mana pool.
    (0/2)
    ~~ closest cards ~~
    Bog Initiate: 0.945159018145
    Llanowar Dead: 0.935611376111
    Basal Thrull: 0.932116210274
    Blood Pet: 0.924901633918
    Blood Vassal: 0.907878381431
    ~~ closest names ~~
    Pestilence Rats: 0.8125
    Pestilence: 0.740740740741
    Pestilence Demon: 0.727272727273

    kalrathotfer 3RBR
    legendary creature ~ human soldier (uncommon)
    1RR: destroy target artifact. = put a +1/+1 counter on @.]
    (3/3)
    ~~ closest cards ~~
    Extruder: 0.800209104765
    Chandler: 0.792882108107
    Defiant Ogre: 0.790563451013
    Energizer: 0.786048163315
    Joven: 0.784222415134
    ~~ closest names ~~
    Falkenrath Torturer: 0.645161290323
    Karstoderm: 0.636363636364
    Falkenrath Gorger: 0.620689655172

    mundungur mage 3G
    enchantment (rare)
    whenever a permanent deals damage to you, put a % counter on it.
    @ enters the battlefield with a % counter on it for each +1/+1 counter on it"
    T: target creature can't be regenerated this turn.
    ~~ closest cards ~~
    Quest for the Gemblades: 0.959420529463
    Bomb Squad: 0.943152355939
    Magnetic Web: 0.924768854453
    Aurification: 0.924516198491
    Freyalise's Winds: 0.920312588819
    ~~ closest names ~~
    Mundungu: 0.727272727273
    Undying Rage: 0.692307692308
    Meddling Mage: 0.666666666667

    deathweaver spirit 3GG
    creature ~ cat (uncommon)
    trample
    remove a % counter from @: gain control of target green creature until end of turn.
    (5/5)
    ~~ closest cards ~~
    Korozda Gorgon: 0.83507633029
    Llanowar Behemoth: 0.822950958053
    Prized Elephant: 0.815763579976
    Killer Bees: 0.810522106371
    Unstoppable Ash: 0.804969440518
    ~~ closest names ~~
    Nether Spirit: 0.774193548387
    Thunder Spirit: 0.6875
    Lantern Spirit: 0.6875

    kyoki, rath protector 5BBB
    creature ~ elemental (mythic rare)
    when @ enters the battlefield, you lose 3 life.
    (7/7)
    ~~ closest cards ~~
    Dread Reaper: 0.954011923303
    Eviscerator: 0.92289305373
    Commander Greven il-Vec: 0.917885583528
    Halo Hunter: 0.915573030718
    Mold Demon: 0.914494343444
    ~~ closest names ~~
    Midvast Protector: 0.684210526316
    Seton, Krosan Protector: 0.681818181818
    Timber Protector: 0.648648648649

    nessian paladin's mend 3GG
    creature ~ barbarian werewolf (rare)
    haste
    @'s power and toughness are each equal to the number of forests you control.
    (*/*)
    ~~ closest cards ~~
    Molimo, Maro-Sorcerer: 0.948691366429
    Dungrove Elder: 0.946356714334
    Drove of Elves: 0.946176924452
    Heedless One: 0.924616048115
    Scion of the Wild: 0.921206173027
    ~~ closest names ~~
    Nessian Wilds Ravager: 0.604651162791
    Western Paladin: 0.594594594595
    Sylvan Paradise: 0.594594594595

    squactie 1W
    instant (rare)
    exile target creature. its controller gains life equal to its power.
    ~~ closest cards ~~
    Swords to Plowshares: 0.979219628634
    Last Breath: 0.888250462933
    Condemn: 0.879734971717
    Backlash: 0.86930308999
    Vapor Snag: 0.86806804908
    ~~ closest names ~~
    Squire: 0.714285714286
    Squall Line: 0.631578947368
    Sunlance: 0.625

    sky warrior _NOCOST_
    creature ~ human cleric (uncommon)
    at the beginning of each upkeep, if a player cast two or more spells last turn, transform @.
    (1/1)
    ~~ closest cards ~~
    Reckless Waif: 0.94096605833
    Lambholt Elder: 0.925068471955
    Hermit of the Natterknolls: 0.919648840572
    Village Messenger: 0.918190644971
    Hinterland Hermit: 0.918050925381
    ~~ closest names ~~
    Talas Warrior: 0.75
    Pious Warrior: 0.75
    Kraul Warrior: 0.75

    undier's swine 1W
    sorcery (common)
    target creature you control gets +0/+3 until end of turn. it fights target creature an opponent controls.
    ~~ closest cards ~~
    Wild Instincts: 0.948698074531
    Hunt the Hunter: 0.941678686239
    Epic Confrontation: 0.937484006473
    Swift Kick: 0.911942380424
    Fistful of Force: 0.910103118927
    ~~ closest names ~~
    Undermine: 0.695652173913
    Unbender Tine: 0.666666666667
    Runner's Bane: 0.666666666667

    _NONAME_ _NOCOST_ _INVALID_
    creature ~ human shaman
    5, T: search your library for a rebel permanent card with converted mana
    (2/1)
    ~~~~~~~~
    _NONAME_ _NOCOST_ _UNPARSED_ _INVALID_

    ~~ closest cards ~~
    Ramosian Commander: 0.8765664698
    Ramosian Sky Marshal: 0.86748015302
    Ramosian Captain: 0.866613792571
    Ramosian Lieutenant: 0.861687761606
    Ramosian Revivalist: 0.856225152103
    ~~ closest names ~~
    Zzzyxas's Abyss: 0.0
    Zurgo Helmsmasher: 0.0
    Zurgo Bellstriker: 0.0
    Quote from maplesmall »
    Is that an 800-cell network?? That looks terrific. How long do you think it'll take to do the full training? And how does the setup process differ from the old set? Your branch's instructions are pretty clear for actually changing the data into .json and .hdf5 formats, but do we still want to use mtg-encode to process the raw data from mtgjson.com?
    Yep, it's 800 cells per layer and 3 layers. Training finished comfortably overnight, I went for somewhere between 50-100 epochs and it was doing what looked like 5-10 epochs in about an hour.

    The documentation on my branch of torch-rnn doesn't really reflect what's going on yet. Instead of using the .json and .h5 files, I wrote my own input mechanism that can launch another process and then read any number of streams of data from it to train on, so you don't have to provide the whole dataset up front, just a way to produce it. This is really nice for magic cards, because I can load up all of the known cards in a python script and then randomize the order of cards, symbols in mana cost, order of lines in text, or whatever, from in python land. You still have to provide a .json file with the vocabulary, but I have a handmade one of those for my encoding in mtgencode/data/mtgvocab.json.

    I'm still working on examining the output to figure out how things went and what clever things I can do to make it work better. There are a few big differences with this neural network's architecture that could change how it works - mostly, it uses a fixed-width representation internally to represent the symbols, and then encodes/decodes at the input/output layers, rather than passing a one-hot encoding all the way through like char-rnn did. I don't how much of a difference that makes.

    For anyone desperate to run it right now, here's the command line and parameters file I used. You'll want to save the parameters as a text file in torch-rnn; the funny $(< mtg.cmd) is a bash thing that reads the file into the command line, so you don't have to type as much. This also assumes ../mtgencode is the path to the mtgencode repo from the torch-rnn repo. Run from the root of torch-rnn.
    command line:
    ./scripts/retrain.py $(< mtg.cmd) -gpu 0 -stream_cmd "../mtgencode/scripts/streamcards.py -s 209209209" -checkpoint_name cv/mtg/s800/cp
    file mtg.cmd:
    th train.lua
    
    -vocab ../mtgencode/data/mtgvocab.json
    -unk 
    
    -model_type   lstm
    -wordvec_size 64
    -rnn_size     800
    -num_layers   3
    -dropout      0.1
    -batchnorm    0
    
    -grad_clip        5
    -learning_rate    0.002
    -lr_decay_factor  0.5
    -lr_decay_batches 1500
    -lr_decay_epochs  10
    
    -batch_size 50
    -seq_length 200
    
    -max_batches 15000
    -max_epochs  100
    
    -print_every      10
    -eval_val_every   0
    -checkpoint_every 1500
    Posted in: Custom Card Creation
  • 4

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Just kicked off the first training run with my modified torch-rnn, and loss is dropping!
    --------
    ./scripts/retrain.py: restarting training until 15000 batches
      or 3 consecutive failures to make progress.
    Command:
      th train.lua
        -vocab ../mtgencode/data/mtgvocab.json
        -unk \x1a
        -model_type lstm
        -wordvec_size 64
        -rnn_size 800
        -num_layers 3
        -dropout 0.1
        -batchnorm 0
        -grad_clip 5
        -learning_rate 0.002
        -lr_decay_factor 0.5
        -lr_decay_batches 1500
        -lr_decay_epochs 10
        -batch_size 50
        -seq_length 200
        -max_epochs 100
        -print_every 10
        -eval_val_every 0
        -gpu 0
        -stream_cmd ../mtgencode/scripts/streamcards.py -s 209209209
        -checkpoint_name cv/mtg/s800/cp
        -checkpoint_every 1500
        -max_batches 15000
    --------
    
    Press enter to continue, or C-c to interrupt
    
    
    --------
    starting from , batch 0
    th train.lua -vocab ../mtgencode/data/mtgvocab.json -unk  -model_type lstm -wordvec_size 64 -rnn_size 800 -num_layers 3 -dropout 0.1 -batchnorm 0 -grad_clip 5 -learning_rate 0.002 -lr_decay_factor 0.5 -lr_decay_batches 1500 -lr_decay_epochs 10 -batch_size 50 -seq_length 200 -max_epochs 100 -print_every 10 -eval_val_every 0 -gpu 0 -stream_cmd ../mtgencode/scripts/streamcards.py -s 209209209 -checkpoint_name cv/mtg/s800/cp -checkpoint_every 1500 -max_batches 15000
    --------
    
    Running with CUDA on GPU 0
    Opening encoded card file: ../mtgencode/scripts/../lib/../data/output.txt
    15564 valid, 0 skipped, 0 invalid, 0 failed to parse.
    Streaming, i = 10 / 15000, loss = 3.515655
    Streaming, i = 20 / 15000, loss = 3.447536
    Streaming, i = 30 / 15000, loss = 3.471018
    Streaming, i = 40 / 15000, loss = 3.463952
    Streaming, i = 50 / 15000, loss = 3.461727
    Streaming, i = 60 / 15000, loss = 3.414716
    Streaming, i = 70 / 15000, loss = 3.233145
    Streaming, i = 80 / 15000, loss = 3.066110
    Streaming, i = 90 / 15000, loss = 2.965470
    Streaming, i = 100 / 15000, loss = 2.848653
    Streaming, i = 110 / 15000, loss = 2.776162
    I should be able to post an update tomorrow with some new cards!

    Also, one very cool observation: This is the largest network I've ever tried to train on cards, and it's only using 1.3GB of RAM on my GPU. So for people out there with something like a GTX 970, this, and everything else that's ever been shown off on the tread, is totally doable now.
    Posted in: Custom Card Creation
  • 4

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from helpiminabox »
    Are there any speed improvements to the new framework?
    Yes, absolutely. The new language model library is based on this code on github. It's a direct successor to char-rnn, and if you scroll down to the bottom of the readme there's some pretty detailed benchmark information showing how much better it is.

    My clone of the code can be found here. Be sure to look at the 'dev' branch, master is currently tied up with a pull request. The neural net code is the same, but I've developed additional code to allow much more sophisticated training input and sampling output on Linux. I'll add a tutorial explaining how the new functionality works once I'm ready for a semi-official release together with mtgencode, hopefully this weekend.
    Posted in: Custom Card Creation
  • 4

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Elseleth »
    That's correct, sample_hs_v3.lua expects a format that isn't used any more. You can force the encoder to produce it (I think, but I'm not sure which one it is specifically), but you'd have to retrain or find the right legacy checkpoint to sample.
    There's an --encoding option called "old"; I have a suspicion that'd be it! But why regress to the past when we can look to the future, eh?
    Indeed!
    Quote from Elseleth »
    Anyway, I just paid the month's AWS bill a couple days ago, so I'm trying a 512 x 3 network using field and mana randomization. I don't remember if random mana did any notable good, but it sounded like random fields at least were a worthy way to go.
    Randomizing mana is usually a good idea, Talcos did some work that showed that if you don't, the network tends to be lazy and refuse to look at much of the mana cost field, which means it has a harder time with color.

    Randomizing fields is fun, I think there's a higher limit to how much we can teach the network there, as there are more possible randomized cards we could give it (almost infinite, really), but it also makes the learning problem harder, so with the finite amount of training that we can do it tends to give less consistent results.

    What I want do do with the new training process is implement some form of curriculum learning, where we give it a mixture of ordered cards and randomized ones. That way, it has to learn the meanings of the field labels independently of order, but when we generate cards we can tell it to give us nicely ordered ones and it will be more consistent. This is all part of a grander hypothesis I have about adding ambiguity to your encoding scheme to increase the effective amount of training you can do - basically, you want to make the data just ambiguous enough that when you present it in all of the different ways you can, you have a big enough dataset to train the largest kind of model you can handle with your hardware.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from maplesmall »
    Awesome Grin

    Would that scale up as well? So if I could do a 3-layer 512-cell network on my 6gb GPU previously, would I be able to do 3-layer 1024 or 2048-cell now?
    Yes, absolutely. Last time I tried to scale up, I ran into a lot of issues with CUDA crashing and halting training. Part of my current toolchain is a script that basically watches the training process, and can both restart it when it fails and change the training parameters periodically based on outside input, like some custom accuracy measure. It's really ugly, but the version I'm using for my research has managed to administrate the training curriculum from this paper for over a day now, and actually produces better accuracy than what the authors published.
    Quote from Elseleth »
    Quote from moronstudios »
    What comes out when you prime it for 4 color legendary creatures?
    Alas, priming using specific fields doesn't seem to work for me. The inserted text goes in the wrong places. I'm guessing that sample_hs_v3.lua (which has all the priming options) isn't up to date for the format the network was trained on.
    That's correct, sample_hs_v3.lua expects a format that isn't used any more. You can force the encoder to produce it (I think, but I'm not sure which one it is specifically), but you'd have to retrain or find the right legacy checkpoint to sample. Going forward I think all formats will have standardized field labels just to remove that headache. Part of the new toolchain will also include a massively reworked version of the targeted sampling script, with a full python api and probably a good command line tool as well that will at least reproduce the original functionality.

    Hacking on this starts now, and will continue through the weekend. I hope to have new checkpoints / card dumps soon, and a new tutorial soon after.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Very small update, I updated mtgencode with the latest cards and fixed the new C symbol.

    Currently working on training and evaluating with my shiny new torch-rnn framework. I'll update the tutorial once everything is working.

    torch-rnn tends to use a lot less memory than char-rnn, so it will probably be easier for people with middle-end graphics cards to train big networks. I don't have the precise numbers, but I wouldn't be surprised if the traditional 3-layer, 512-cell networks that have produced most of the cards on here would fit comfortably on even a 1-GB gpu.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Elseleth »
    Sounds like an excellent idea!

    How fuzzy can the evaluation logic be? If you're looking only for exact hits, then mana cost will work great, but it's going to be pretty limited beyond that. If on the other hand there's a score on how close the NN got, you could do things like:

    Prime a planeswalker up to the subtype line; do you get three loyalty abilities?
    Similar for levelers, do you get more than one level tier?
    If you prime a subtype with clear themes, do you get appropriate keywords? E.g. a Bird should fly, a Wurm should not, an Ally scores better if it has a Rally or Cohort effect...

    If the NN can score well for making appropriate decisions in examples like that, even if they're not the exact ones in the test data, that'd be cool.
    That's the beauty of this method of evaluation. The evaluation logic can be as fuzzy as you want, all you have to do with the actual neural network is give in the input and let it the output whatever it thinks should come next, and then you can evaluate that output however you want. Even for mana costs it would probably make sense to give it some kind of accuracy based on how many symbols from the real cost it got right, with some penalty if the cost was not correctly formatted or not a cost.
    Quote from maplesmall »
    My only concern with this method is that if we're encouraging it to generate cards that resemble real cards, we could end up stifling its 'natural creativity' to a certain extent. Or would the temperature parameter take care of that for us?
    What we do for evaluation would have absolutely no impact on the neural network's training, it would just tell us extra things about how successful that training had been. We could still sample from the network as usual and get the full natural creativity if we wanted to, and we probably would for tasks like generating a set. We could also do target sampling exactly like Talcos's sample_hs script, but with more flexibility.
    Posted in: Custom Card Creation
  • 4

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Based on my current research on generating programs with neural networks, I've had a new idea about evaluating networks that generate cards. Instead of looking at the loss (which is kind of meaningless) or bringing in outside metrics (which are hard to write), we could use a sequence to sequence learning task where we prime the network with part of a card, then see how accurate it is at generating the rest of it.

    For example, if we had a format where the mana cost is last (which is easy enough to arrange), we could give the neural network everything about some real card up to the mana cost, then see what mana cost it spits out. You still have to figure out how to define an accuracy metric, but it's a whole lot easier and more meaningful than trying to use the validation loss or something like that.

    It doesn't have to be cost: this sort of evaluation would work for any part of the card that is determined by other parts. For example, it makes less sense from an evaluation standpoint to prime with the cost R and then compare accuracy against Lightning Bolt, because there are a lot of cards that cost R. But if we were to give it everything except the type, there are many cards for which only a few types make sense - if the card has a trigger on entering the battlefield, then clearly it can't be an instant. I think these sorts of metrics will be particularly useful because they can identify networks that know things and generate plausible cards independently of their ability to memorize lots of cards exactly. And we can sort out the overfitters separately by looking at word2vec distances.

    Anyone have any ideas about tasks like this that would make sense? I think predicting costs is going to be the big one. There are more abilities that resemble costs other than just the mana cost though: I can think of kicker, suspend, echo, evoke, any others? How about prowl and ninjutsu? The thing is some of them, like kicker, are strongly determined by the text: if the rest of the text mentions being kicked, then there better be a kicker ability. Ideally I'd like to separate all of these out so I can put them at the end as special 'cost-like' abilities, to make the dependencies as clear as possible, and then evaluate how good the networks are at learning those dependencies.
    Posted in: Custom Card Creation
  • 4

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Hi everybody, I figured I should stick my head up again since I've started to work on more things related to this. I've been very busy, but one of my current research projects is converging towards some technology that I think will be able to improve card generation.
    Quote from Elseleth »
    Is the tutorial at https://github.com/billzorn/mtgencode still the state of the art for card generation, or are there tweaks worth incorporating for the latest greatest output?
    The short answer is yes, the tutorial still describes the most up to date generation process that I know of. There are a few options you might want to play around with, like the neural network size and the dropout, but that's easy to change in the commands. I don't know if Talcos or anyone else has come up with new generation techniques, but I haven't seen any issues / pull requests on github.

    That said, the library is getting out of date. I haven't updated it to include the latest sets, so the encoding algorithm probably breaks with the new colorless-only mana symbol. Maplesmall has assured me this is easy to fix, and I'd like to push a major overhaul when I have some time, but I don't know when that will be.

    The biggest change is that char-rnn is no longer state of the art as a character-level language model backend. There is a full rewrite of it called torch-rnn that offers significant performance improvements and greatly reduced memory usage, which should make it possible to train much large networks. I've worked extensively with the codebase, and I'm currently in the process of adding much more powerful training and sampling interfaces to my own fork. It's a terrible mess of lua and python, but once I've got it working for my research project it should be easy to come back and do some clever things to improve magic card generation, like experimenting curriculum learning and other techniques to mix up the format during training to get as much out of the limited data as we can with a larger neural net.

    You could try using torch-rnn as it is right now, by following their tutorial and just substituting a card corpus encoded with mtgencode for their example data file, but I suspect you'll run into some issues with not having enough data because by default they do very silly things to split the data up into training epochs. I intend to solve those problems, and I'll be sure to update the tutorial when I do, and share any new results.
    Posted in: Custom Card Creation
  • 0

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Melted_Rabbit »
    The increase in training loss occurs to a smaller degree the batch after saving a checkpoint in the run and during the other run that aborted. I assume this is related to saving the checkpoint.
    Interesting.

    I've noticed a similar problem in a few of my networks, where training will experience a sudden spike in the loss. Sometimes it dies down immediately, other times it ends up crippling the training, though it recovers somewhat after a few epochs. I had not noticed a link between when this happened and when it saved the checkpoints, I'll have to pay more attention when I train a new network.

    1024 is a pretty ambitions size. I was able to do it by scaling back the batch size a bit (otherwise it wouldn't fit on my 6GB Titan) but I kept getting memory errors in the Torch framework that would break my training after a few thousand batches for anything above size 768. Your problem seems unrelated, but it's entirely possible that some tiny bug or hardware error could cause a massive failure and throw everything off.

    What happens if you try to resume training on the checkpoint right before the explosion, say with a different seed?
    Posted in: Custom Card Creation
  • 3

    posted a message on Generating Magic cards using deep, recurrent neural networks
    I trained lots of checkpoints to do my hyperparameter sweep; I have about 80 of various sizes that all use the most recent version of the encoding. I'll try to get them organized and post at least the good ones to Google Drive so others can use them. They're all GPU checkpoints, which are significantly smaller than CPU checkpoints because apparently the CUDA libraries do some compression (or just use float32 or something), so I think the best solution is to have people use the gpu-to-cpu feature that now comes with char-rnn. I'll post some documentation about how to use that in the mtgencode readme.

    I also have a bunch of disorganized scripts, including an Ipython notebook for plotting data, and a huuuuuuuuuuuge amount of data that I couldn't fit into the paper I wrote. I'd like to make that available as well, as some of it is certain to be interesting. For example I just produced a bunch of dumps to compare what happens if we put the name in the first field as opposed to the last field of the encoding. I just have to run my analysis on it and then fiddle with the graphs until they're readable.

    So yeah, whether you want to see more cards or know more about the best hyperparameters to use for training the networks, stay tuned over the next few days. I'll try to provide as much as I can, and document / automate my techniques so that others can reproduce my work and expand on it.
    Posted in: Custom Card Creation
  • 5

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from neotelesocio »
    Came across this thread a few days ago, after a couple weeks following the RoboRosewater twitter! Loving everything I've seen so far, and had moderate success using the RNN myself.
    Welcome aboard! Always good to see someone new enjoying this technology.
    Quote from neotelesocio »
    I'm currently 33 epochs into a size-512, 2-layer network(running on a VM so that's about as much as it'll handle) and the network is spitting out an alarming amount of cards with names that already exist, and in a few cases carbon copies of existing cards down to rarity. The training loss and validation loss are both between .15 and .2, but hardcast's tutorial(which I followed to get started) says training_loss generally starts to hover around .5. I assume this is related to this over(under?)fitting issue. How can I fix it? Does it have something to do with dropout? I haven't experimented with that parameter yet. What's the difference between, say, 0, .5, and 1.0 dropout?
    So, as far as choosing parameters goes, I have very little experience with 2-layer networks, but I'm just finishing up a bunch of work trying to optimize the training parameters for 3-layer networks. As in, I wrote an 8-page research paper for a class, and I'll post a link to the final version when I hand it in in a few hours.

    You're massively overfitting if the network is spitting out copies of real cards. In general the way to prevent this is to increase the dropout. Essentially, dropout turns off a randomly selected fraction of neurons for each training batch, so the network can't become too reliant on particular connections. Dropout 0.25 turns of a quarter of connections, dropout 0.5 turns off half of them, and so on. So, dropout 1.0 would be a bad idea.

    I'm actually pretty curious to see what the best parameters for 2-layer networks are, as I haven't used them much at all. With 3 layers, I've had the best success with size 768, dropout 0.5, and seq_length 200. Training loss is actually worse if you increase the dropout above 0, but other metrics indicate that this is very, very misleading about the quality of the output. This is all using the latest encoding format (explicit labels, name field last) as currently on GitHub.
    Quote from neotelesocio »
    Sorry if these questions have been answered earlier in the thread, I'm not much for reading dozens of forum pages Hooray!
    Thanks in advance!
    No worries! It's a beast of a thread. I have some Chrome windows I have to remember not to close because they have tabs open to important pages, lol.

    I think I'm the first person to do a hyperparameter optimization sweep, so if you want to know what the best training parameters all, you've come at exactly the right time. And if you just want to sample from existing checkpoints, I've trained something like 100 different networks in the past month. I'll try to organize and post as much of my work as possible.

    EDIT:
    Link to paper and to the poster I made a week ago on google drive.
    Posted in: Custom Card Creation
  • 4

    posted a message on Generating Magic cards using deep, recurrent neural networks
    So I created a poster for my class project: google drive link.

    There's also a paper due in two weeks. I'll post some more detailed discussion of my discoveries as I work on it.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from maplesmall »
    That is fantastic! Interesting how all the checkpoints you've tested have no dropout; any test results from networks with the default dropout value? It seems based on this that a network size of 512 is optimal; 640 seems to have slightly worse results.

    I believe 0 is the default dropout value? Anyway, yes, I do have the same data (all in duplicate) from models trained with dropouts of 0.25 and 0.50, I just didn't produce the hideous text tables to show off the statistics. I'm working on scripts to do that more automatically.

    If you can run mtgencode, you can compute the same statistics from any of the dumps on my google drive - they're labeled with the dropout.
    ./scripts/validate.py name_of_dump.txt


    EDIT: ok, here's some numbers with dropout.

    real cards               s512, d0, v0.1952       s512, d0.25, v0.2663    s512, d0.50, v0.3269
    
    -- overall --            -- overall --           -- overall --           -- overall --
      total: 15065             total: 5777             total: 6032             total: 5913
      good : 15061 (99.97%)    good : 5153 (89.19%)    good : 5367 (88.97%)    good : 5304 (89.70%)
      bad  : 4 (0.026%)        bad  : 624 (10.80%)     bad  : 665 (11.02%)     bad  : 609 (10.29%)
    ----                     ----                    ----                    ----
    types:                   types:                  types:                  types:
      total: 15065 (100.0%)    total: 5777 (100.0%)    total: 6032 (100.0%)    total: 5913 (100.0%)
      good : 15065 (100.0%)    good : 5774 (99.94%)    good : 6028 (99.93%)    good : 5910 (99.94%)
      bad  : 0 (0.0%)          bad  : 3 (0.051%)       bad  : 4 (0.066%)       bad  : 3 (0.050%)
    pt:                      pt:                     pt:                     pt:
      total: 8007 (53.14%)     total: 3527 (61.05%)    total: 3419 (56.68%)    total: 3330 (56.31%)
      good : 8007 (53.14%)     good : 3519 (60.91%)    good : 3413 (56.58%)    good : 3329 (56.29%)
      bad  : 0 (0.0%)          bad  : 8 (0.138%)       bad  : 6 (0.099%)       bad  : 1 (0.016%)
    lands:                   lands:                  lands:                  lands:
      total: 533 (3.538%)      total: 110 (1.904%)     total: 138 (2.287%)     total: 127 (2.147%)
      good : 533 (3.538%)      good : 68 (1.177%)      good : 133 (2.204%)     good : 114 (1.927%)
      bad  : 0 (0.0%)          bad  : 42 (0.727%)      bad  : 5 (0.082%)       bad  : 13 (0.219%)
    X:                       X:                      X:                      X:
      total: 757 (5.024%)      total: 484 (8.378%)     total: 501 (8.305%)     total: 500 (8.455%)
      good : 756 (5.018%)      good : 168 (2.908%)     good : 174 (2.884%)     good : 128 (2.164%)
      bad  : 1 (0.006%)        bad  : 316 (5.469%)     bad  : 327 (5.421%)     bad  : 372 (6.291%)
    kicker:                  kicker:                 kicker:                 kicker:
      total: 114 (0.756%)      total: 93 (1.609%)      total: 98 (1.624%)      total: 112 (1.894%)
      good : 112 (0.743%)      good : 36 (0.623%)      good : 41 (0.679%)      good : 28 (0.473%)
      bad  : 2 (0.013%)        bad  : 57 (0.986%)      bad  : 57 (0.944%)      bad  : 84 (1.420%)
    counters:                counters:               counters:               counters:
      total: 401 (2.661%)      total: 237 (4.102%)     total: 308 (5.106%)     total: 167 (2.824%)
      good : 401 (2.661%)      good : 91 (1.575%)      good : 100 (1.657%)     good : 89 (1.505%)
      bad  : 0 (0.0%)          bad  : 146 (2.527%)     bad  : 208 (3.448%)     bad  : 78 (1.319%)
    choices:                 choices:                choices:                choices:
      total: 175 (1.161%)      total: 114 (1.973%)     total: 99 (1.641%)      total: 103 (1.741%)
      good : 174 (1.154%)      good : 45 (0.778%)      good : 34 (0.563%)      good : 45 (0.761%)
      bad  : 1 (0.006%)        bad  : 69 (1.194%)      bad  : 65 (1.077%)      bad  : 58 (0.980%)
    auras:                   auras:                  auras:                  auras:
      total: 2318 (15.38%)     total: 852 (14.74%)     total: 928 (15.38%)     total: 969 (16.38%)
      good : 2318 (15.38%)     good : 852 (14.74%)     good : 928 (15.38%)     good : 969 (16.38%)
      bad  : 0 (0.0%)          bad  : 0 (0.0%)         bad  : 0 (0.0%)         bad  : 0 (0.0%)
    equipment:               equipment:              equipment:              equipment:
      total: 200 (1.327%)      total: 44 (0.761%)      total: 59 (0.978%)      total: 67 (1.133%)
      good : 200 (1.327%)      good : 43 (0.744%)      good : 59 (0.978%)      good : 67 (1.133%)
      bad  : 0 (0.0%)          bad  : 1 (0.017%)       bad  : 0 (0.0%)         bad  : 0 (0.0%)
    planeswalkers:           planeswalkers:          planeswalkers:          planeswalkers:
      total: 61 (0.404%)       total: 15 (0.259%)      total: 10 (0.165%)      total: 19 (0.321%)
      good : 61 (0.404%)       good : 2 (0.034%)       good : 0 (0.0%)         good : 4 (0.067%)
      bad  : 0 (0.0%)          bad  : 13 (0.225%)      bad  : 10 (0.165%)      bad  : 15 (0.253%)
    levelup:                 levelup:                levelup:                levelup:
      total: 27 (0.179%)       total: 17 (0.294%)      total: 8 (0.132%)       total: 14 (0.236%)
      good : 27 (0.179%)       good : 6 (0.103%)       good : 4 (0.066%)       good : 11 (0.186%)
      bad  : 0 (0.0%)          bad  : 11 (0.190%)      bad  : 4 (0.066%)       bad  : 3 (0.050%)
    activated:               activated:              activated:              activated:
      total: 4307 (28.58%)     total: 1618 (28.00%)    total: 1741 (28.86%)    total: 1719 (29.07%)
      good : 4307 (28.58%)     good : 1591 (27.54%)    good : 1709 (28.33%)    good : 1677 (28.36%)
      bad  : 0 (0.0%)          bad  : 27 (0.467%)      bad  : 32 (0.530%)      bad  : 42 (0.710%)
    triggered:               triggered:              triggered:              triggered:
      total: 4340 (28.80%)     total: 1848 (31.98%)    total: 1944 (32.22%)    total: 1985 (33.57%)
      good : 4340 (28.80%)     good : 1818 (31.46%)    good : 1914 (31.73%)    good : 1934 (32.70%)
      bad  : 0 (0.0%)          bad  : 30 (0.519%)      bad  : 30 (0.497%)      bad  : 51 (0.862%)
    
                             names:                 names:                   names:
                               dist : 0.784            dist : 0.749            dist : 0.715
                               dupes: 961              dupes: 177              dupes: 52
                             cards (word2vec):      cards (word2vec):        cards (word2vec):
                               dist : 0.917            dist : 0.914            dist : 0.906
                               dupes: 209              dupes: 48               dupes: 24
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    I just finished a massive parameter sweep across 60 different parameter settings for training models with default char-rnn and my modified mtg-rnn. The full data of the sweep is available on my google drive.

    Here's some fun metrics I generated with some of my data analysis scripts:
    Validation and distance metrics for baseline_XXX_1 component of mtg-rnn sweep.
    
    Each column corresponds to a single checkpoint. 's' is the size, 'd' is the
    dropout, and 'v' is the validation error. All of these checkpoints are from
    epoch 50 (the end of training). So, 's128, d0, v0.3941' is a checkpoint
    from a size 128 network with dropout 0, that had a validation loss of 0.3941.
    If you look at the full sweep, it corresponds to mtg-rnn-sweep1/baseline_128_1.
    
    All of the validation metrics like 'types' and 'pt' are simple string processing
    tests to determine if a card has a property, and roughly check if it is used
    in the correct way. For the specific definitions, you'll have to see the source
    code in scripts/validate.py.
    
    The 'names' and 'cards' distances are the average of the name text edit distance
    and the word2vec semantic distance from each card in the dump to the nearest
    real card. Calling them distances is a little misleading, they're really
    similarity measures with 1.0 being identical.
    
    This data isn't very scientific, but it is interesting to look at. There seems
    to be a fair amount of variance between different 1MB dumps.
    
    
    real cards               s128, d0, v0.3941       s256, d0, v0.2736       s384, d0, v0.2117       s512, d0, v0.1952       s640, d0, v0.1798
    
    -- overall --            -- overall --           -- overall --           -- overall --           -- overall --           -- overall --
      total: 15065             total: 5666             total: 5820             total: 5960             total: 5777             total: 5800
      good : 15061 (99.97%)    good : 4457 (78.66%)    good : 4979 (85.54%)    good : 5277 (88.54%)    good : 5153 (89.19%)    good : 5130 (88.44%)
      bad  : 4 (0.026%)        bad  : 1209 (21.33%)    bad  : 841 (14.45%)     bad  : 683 (11.45%)     bad  : 624 (10.80%)     bad  : 670 (11.55%)
    ----                     ----                    ----                    ----                    ----                    ----
    types:                   types:                  types:                  types:                  types:                  types:
      total: 15065 (100.0%)    total: 5666 (100.0%)    total: 5820 (100.0%)    total: 5960 (100.0%)    total: 5777 (100.0%)    total: 5800 (100.0%)
      good : 15065 (100.0%)    good : 5648 (99.68%)    good : 5818 (99.96%)    good : 5956 (99.93%)    good : 5774 (99.94%)    good : 5796 (99.93%)
      bad  : 0 (0.0%)          bad  : 18 (0.317%)      bad  : 2 (0.034%)       bad  : 4 (0.067%)       bad  : 3 (0.051%)       bad  : 4 (0.068%)
    pt:                      pt:                     pt:                     pt:                     pt:                     pt:
      total: 8007 (53.14%)     total: 2688 (47.44%)    total: 3094 (53.16%)    total: 2956 (49.59%)    total: 3527 (61.05%)    total: 2641 (45.53%)
      good : 8007 (53.14%)     good : 2648 (46.73%)    good : 3078 (52.88%)    good : 2943 (49.37%)    good : 3519 (60.91%)    good : 2618 (45.13%)
      bad  : 0 (0.0%)          bad  : 40 (0.705%)      bad  : 16 (0.274%)      bad  : 13 (0.218%)      bad  : 8 (0.138%)       bad  : 23 (0.396%)
    lands:                   lands:                  lands:                  lands:                  lands:                  lands:
      total: 533 (3.538%)      total: 231 (4.076%)     total: 225 (3.865%)     total: 228 (3.825%)     total: 110 (1.904%)     total: 177 (3.051%)
      good : 533 (3.538%)      good : 184 (3.247%)     good : 86 (1.477%)      good : 147 (2.466%)     good : 68 (1.177%)      good : 126 (2.172%)
      bad  : 0 (0.0%)          bad  : 47 (0.829%)      bad  : 139 (2.388%)     bad  : 81 (1.359%)      bad  : 42 (0.727%)      bad  : 51 (0.879%)
    X:                       X:                      X:                      X:                      X:                      X:
      total: 757 (5.024%)      total: 568 (10.02%)     total: 407 (6.993%)     total: 461 (7.734%)     total: 484 (8.378%)     total: 564 (9.724%)
      good : 756 (5.018%)      good : 74 (1.306%)      good : 90 (1.546%)      good : 144 (2.416%)     good : 168 (2.908%)     good : 201 (3.465%)
      bad  : 1 (0.006%)        bad  : 494 (8.718%)     bad  : 317 (5.446%)     bad  : 317 (5.318%)     bad  : 316 (5.469%)     bad  : 363 (6.258%)
    kicker:                  kicker:                 kicker:                 kicker:                 kicker:                 kicker:
      total: 114 (0.756%)      total: 92 (1.623%)      total: 51 (0.876%)      total: 46 (0.771%)      total: 93 (1.609%)      total: 70 (1.206%)
      good : 112 (0.743%)      good : 5 (0.088%)       good : 14 (0.240%)      good : 15 (0.251%)      good : 36 (0.623%)      good : 19 (0.327%)
      bad  : 2 (0.013%)        bad  : 87 (1.535%)      bad  : 37 (0.635%)      bad  : 31 (0.520%)      bad  : 57 (0.986%)      bad  : 51 (0.879%)
    counters:                counters:               counters:               counters:               counters:               counters:
      total: 401 (2.661%)      total: 338 (5.965%)     total: 475 (8.161%)     total: 236 (3.959%)     total: 237 (4.102%)     total: 192 (3.310%)
      good : 401 (2.661%)      good : 38 (0.670%)      good : 156 (2.680%)     good : 82 (1.375%)      good : 91 (1.575%)      good : 68 (1.172%)
      bad  : 0 (0.0%)          bad  : 300 (5.294%)     bad  : 319 (5.481%)     bad  : 154 (2.583%)     bad  : 146 (2.527%)     bad  : 124 (2.137%)
    choices:                 choices:                choices:                choices:                choices:                choices:
      total: 175 (1.161%)      total: 161 (2.841%)     total: 144 (2.474%)     total: 174 (2.919%)     total: 114 (1.973%)     total: 92 (1.586%)
      good : 174 (1.154%)      good : 1 (0.017%)       good : 38 (0.652%)      good : 78 (1.308%)      good : 45 (0.778%)      good : 30 (0.517%)
      bad  : 1 (0.006%)        bad  : 160 (2.823%)     bad  : 106 (1.821%)     bad  : 96 (1.610%)      bad  : 69 (1.194%)      bad  : 62 (1.068%)
    auras:                   auras:                  auras:                  auras:                  auras:                  auras:
      total: 2318 (15.38%)     total: 1036 (18.28%)    total: 1092 (18.76%)    total: 1061 (17.80%)    total: 852 (14.74%)     total: 1074 (18.51%)
      good : 2318 (15.38%)     good : 1036 (18.28%)    good : 1092 (18.76%)    good : 1061 (17.80%)    good : 852 (14.74%)     good : 1074 (18.51%)
      bad  : 0 (0.0%)          bad  : 0 (0.0%)         bad  : 0 (0.0%)         bad  : 0 (0.0%)         bad  : 0 (0.0%)         bad  : 0 (0.0%)
    equipment:               equipment:              equipment:              equipment:              equipment:              equipment:
      total: 200 (1.327%)      total: 43 (0.758%)      total: 82 (1.408%)      total: 112 (1.879%)     total: 44 (0.761%)      total: 114 (1.965%)
      good : 200 (1.327%)      good : 43 (0.758%)      good : 81 (1.391%)      good : 112 (1.879%)     good : 43 (0.744%)      good : 114 (1.965%)
      bad  : 0 (0.0%)          bad  : 0 (0.0%)         bad  : 1 (0.017%)       bad  : 0 (0.0%)         bad  : 1 (0.017%)       bad  : 0 (0.0%)
    planeswalkers:           planeswalkers:          planeswalkers:          planeswalkers:          planeswalkers:          planeswalkers:
      total: 61 (0.404%)       total: 30 (0.529%)      total: 20 (0.343%)      total: 25 (0.419%)      total: 15 (0.259%)      total: 37 (0.637%)
      good : 61 (0.404%)       good : 0 (0.0%)         good : 2 (0.034%)       good : 4 (0.067%)       good : 2 (0.034%)       good : 6 (0.103%)
      bad  : 0 (0.0%)          bad  : 30 (0.529%)      bad  : 18 (0.309%)      bad  : 21 (0.352%)      bad  : 13 (0.225%)      bad  : 31 (0.534%)
    levelup:                 levelup:                levelup:                levelup:                levelup:                levelup:
      total: 27 (0.179%)       total: 11 (0.194%)      total: 25 (0.429%)      total: 6 (0.100%)       total: 17 (0.294%)      total: 5 (0.086%)
      good : 27 (0.179%)       good : 4 (0.070%)       good : 13 (0.223%)      good : 2 (0.033%)       good : 6 (0.103%)       good : 4 (0.068%)
      bad  : 0 (0.0%)          bad  : 7 (0.123%)       bad  : 12 (0.206%)      bad  : 4 (0.067%)       bad  : 11 (0.190%)      bad  : 1 (0.017%)
    activated:               activated:              activated:              activated:              activated:              activated:
      total: 4307 (28.58%)     total: 1692 (29.86%)    total: 1688 (29.00%)    total: 1587 (26.62%)    total: 1618 (28.00%)    total: 1639 (28.25%)
      good : 4307 (28.58%)     good : 1555 (27.44%)    good : 1634 (28.07%)    good : 1556 (26.10%)    good : 1591 (27.54%)    good : 1621 (27.94%)
      bad  : 0 (0.0%)          bad  : 137 (2.417%)     bad  : 54 (0.927%)      bad  : 31 (0.520%)      bad  : 27 (0.467%)      bad  : 18 (0.310%)
    triggered:               triggered:              triggered:              triggered:              triggered:              triggered:
      total: 4340 (28.80%)     total: 1589 (28.04%)    total: 1526 (26.21%)    total: 1661 (27.86%)    total: 1848 (31.98%)    total: 1622 (27.96%)
      good : 4340 (28.80%)     good : 1496 (26.40%)    good : 1509 (25.92%)    good : 1635 (27.43%)    good : 1818 (31.46%)    good : 1601 (27.60%)
      bad  : 0 (0.0%)          bad  : 93 (1.641%)      bad  : 17 (0.292%)      bad  : 26 (0.436%)      bad  : 30 (0.519%)      bad  : 21 (0.362%)
    
                             names:                  names:                  names:                  names:                  names:
                               dist : 0.691            dist : 0.732            dist : 0.776            dist : 0.784            dist : 0.802
                               dupes: 17               dupes: 253              dupes: 905              dupes: 961              dupes: 1266
                             cards (word2vec):       cards (word2vec):       cards (word2vec):       cards (word2vec):       cards (word2vec):
                               dist : 0.887            dist : 0.905            dist : 0.918            dist : 0.917            dist : 0.921
                               dupes: 14               dupes: 51               dupes: 142              dupes: 209              dupes: 218
    Oh, and as a little note, there are a few invalid cards in the real cards because it's really hard to write tests that account for all of the corner cases.
    I'm working on rendering all of this data (and the data for the rest of the sweep, that's just 5 checkpoints of the 60 that I generated) in a more easily consumable form. I'll try to post things as I come up with them. Expect lots of pretty graphs.

    Preliminary analysis suggests that large networks trained with mtg-rnn's training set card order randomization and *no dropout at all* are really good at producing things that look like real cards. Of course, that comes with the tradeoff of producing more cards that are too similar to existing cards to be interesting. One of my main goals is to examine that tradeoff in more detail.
    Posted in: Custom Card Creation
  • 0

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from maplesmall »

    @failbird105, try using a piece of software called Magic Set Editor 2 for making the cards? It's better than all the web-based card generators and a lot more powerful (we even have an RNN set symbol quite a few pages back that someone made, that MSE2 lets you include).

    I should really get that symbol and add it to the set files mtgencode can automatically generate from dumps. Any idea where it is?

    Oh, @Failbird, in case you didn't know, that's a thing. My code here can take raw dump files as they come out of the neural network and turn them into a MSE2 set file for you automatically. There's no art (yet) and it doesn't do much to clean up the text, but it might be easier than typing everything in yourself. I'm not sure how hard it is to cut and paste cards between sets - I think it should just work, though I don't know how it handles the art.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    First full spoiler with copyable forum code and hoverable names is here.

    As a warning, if you open that file in a browser it will spin forever trying to preload 500,000 images from magiccards.info. I'll look into a fix for that (namely, loading the images on demand) and improvements to general readability. Any feedback is appreciated.
    Posted in: Custom Card Creation
  • 3

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Alright, html spoilers are pushed to github, huge thanks to reimannsum for figuring most of it out. I'm not an html wizard, so if anyone has any complaints / suggestions I'm happy to hear them. There are a few tweaks I want to add myself, mostly a hover-over spoiler (like the [ card ] tag on here) to make the closest-card and closest-name info more useful.

    An example of a spoiler is here, it's another 10MB dump from my most recent size-768 network sampled at temperature 0.8.

    EDIT: I added some new technology to display visual spoilers on hovering over the names of the nearest cards by function or by name, as they appear in the creativity analysis. Currently I'm working on computing those statistics for my existing dumps (I have 60MB total) which is going to take a while even parallelized on my 8-core intel machine. I'll of course post all of those once they're done cooking. Hooray for strong processors - if only Python were as easy to accelerate on a GPU as the training of neural nets.

    EDIT2: After several attempts, this version of my parallel computation of the distance metrics actually makes things faster! Here's the numbers from my i7-3770k (4 cores, 8 threads) processing 960 cards:
    real    14m14.701s
    user    14m13.521s
    sys     0m0.284s
    real    3m25.739s
    user    24m52.410s
    sys     0m3.636s
    As you can see, we actually get about a 4.15x speedup in real time - better than linear! - due to the miracles of Intel's hyperthreading. The total user time increases by almost a factor of two, though, because the threads have to wait for each other to share a smaller number of physical cores.

    Anyway, it's great to see numbers like that for real applications. Due to the intricacies of Python's Global Interpreter Lock and the overhead of creating multiple processes to get around it, I had to jump through some hoops to exploit parallelism as coarsely as possible. But, it is definitely cool to have a high level language that lets me express parallelism easily when I want it, even if there are some conditions attached to take full advantage of it.

    EDIT3:
    Quote from reimannsum »
    things I would still like to do with this, but others can help (in order of importance, I feel)
    • Have sorting on the cards, probably borrowing heavily from the sortcards.py
    • have a hover panel with dumped data for each card, (vdump data, creativity info, maybe even a text box with forum code)
    • color the border of the according to their card border (gradient borders with CSS3)
    • Maybe generate a folder with files of specific types of cards in them so it can load faster (generate an Index file with a nav bar and subfiles display in an Iframe maybe)
    Quick comments on these ideas.

    The second is already implemented, just not as a hover panel. I just stick all of the additional info directly into the div, including creativity distance metrics with visual spoilers on hover, and a forum-encoded spoiler you can copy to share cards on here if you ask for it with -f. I think it's ok as it is, but I have many enormous monitors to display lots of large divs. If anyone has a better way to format things, I'm open to ideas.

    The third is something I think I know how to do (not gradients :p) but I haven't gotten around to yet. Basically you make a few little style classes that change the color of the border and specify one of them based on what colors the card thinks it is.

    Sorting and folder structure will both also be useful. Now that we've got human-readable output pretty much under control (the HTML spoilers are awesome to read) I'll be switching most of my attention to the very vague problem of evaluating the neural nets, which will certainly involve some sorting. As usual I'll post any major updates here, and probably stick the code in the scripts/ folder on github once it's stable.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    so I just tried to whisper to my network with bodytext_prepend with the new format. It was prepending rebound in to the mane field. Does the sample_hs_v3.lua m ap th the labled fields?
    No, I believe it just counts '|' characters and assumes the fields are ordered according to 'old' or 'noname'. In theory it will still work if you give it the name of the field in the right position, and remember to include the identifier number first or you'll confuse the network a lot. That's another thing that I should rewrite and maintain with the rest of the mtg-rnn codebase. I probably won't get around to that for a few days though.

    Talcos, how hard is it to change that script? Ideally it could a setting to look for identifier characters like ('0', '1', '2', etc.) and then you could just tell it a sequence of identifiers and what you want it to insert for each one, and then it doesn't need to know the order ahead of time.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Talcos »
    Oh, wait, there's also the fact that I gave that big talk to all the computer science undergraduate students about the project. They would have been more likely to seek out the github page. I mentioned you by name and showered praise on you. That might be why. Grin
    I thought of this as well, though I'd have expected the spike to be closer to when you gave the talk.

    In any case, I certainly won't complain about the free publicity.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    I like your new format, I have a question: the choice spells are formatted as [#ofchoices =choice =choice] how will this hold up to the new confluence cycle? will it need custom processing? maybe a each choice can be selected more than once\[3 =option =option =option]
    Yes, the current syntax doesn't really have a great way of representing that. I suspect that given the different wording, the encoding will just leave it alone and not put it into [ # = choice ] syntax at all. The clever thing to do is probably make the choice syntax more english-friendly so there's some general way to attach modifiers to it.

    EDIT: Talcos, have you been posting things on reddit again? The number of stars I have on mtgencode has gone way up in the past couple of days, and in the past that's been tied to the free advertising you provide on reddit. Grin
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    So as I was reading through this extensive thread I remember reading some about card formatting and the position on the elements.
    This is definitely an interesting area of study. Changing the order of the fields should have no effect on the training sampling process, and it should be pretty easy to do if you're comfortable opening up encode.py and decode.py and changing the arguments they give to the Card class. As long as the fields are all labeled, then decode.py should work fine no matter what order they're in. If you don't include the explicit labels, then you'll have to make sure decode.py knows the order or it will be confused. If you're having a hard time with the code, I can try to explain or provide some examples.

    The mtgencode changeset that I'm working on right now (and that was used to create the two 10MB dumps I posted most recently) changes the field order to be better than it was before, but I've by no means done all of the necessary experimentation to figure out what's best.

    Also, I'll note that if you want to be able to prime cards in any order, then you can train a network while randomizing the order of the (labeled) fields, and this works pretty well in practice, though on average cards are less likely to be well-formed and there are some interesting effects on remembering X and things like that.

    EDIT: the latest mtgencode and mtg-rnn versions have been pushed to github. It's quite likely that something in there is a little broken, if anyone runs into any issues I'll try to get them fixed as quickly as possible.
    Posted in: Custom Card Creation
  • 4

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from AlukSky »
    They also seem to have utilized the semantic vectors of the responses themselves as a pre-filter, so they wouldn't converge too much - you want options that, while meaningful to the context, have some degree of variation.
    Exactly. We want exactly the same things here - new cards that are similar enough to existing cards to be plausible, but different enough to be interesting.

    I'm hoping I can address this a bit with my class project. The big question is, how do you define 'different enough,' and then once you do, how do you provide it? One option is just to build a filter, as Google is doing. I can do a similar thing with my own word2vec data, basically just taking all of the cards from a dump and separating out the ones that are too similar to existing cards or are obviously invalid. The hardest part there is trying to identify word salad.

    Really what you want, though, is to somehow feed this information back into the training process, and I have no idea how to do that, other than by looking for parameters that produce good output. The thing with the word2vec distance is that although it does seem to give us a pretty good idea of how creative a card is, it's very expensive to compute.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    I keep getting out of memory errors, Does that mean I should prune back my network?
    I got one using a 512x3 network, I can (and am) running that on my 5 year old aleinware LAPTOP I'm confused.
    with a 398x3 network I get 0.5s batch times!! I'M SO HAPPY!!
    When training on a GPU, you're limited by the RAM that's available on the graphics card, not the whole RAM installed on your system. I bet your old laptop has at least 8 GB of RAM, while a 970 probably has like 2 or 3. My GTX Titan has 6GB, which is enough to train a 512x3 with seq_length of 200 and a batch size of 50. If I move up to a 768x3 network, I need to bump the batch size down to 40 or it doesn't fit.

    There are a couple of things you can do to try to make it fit in your graphics card's memory - obviously reducing the size of the network is one, but you can also make the seq_length and batch_size smaller (though this will make it take longer to train). In general I find changing batch_size doesn't affect the results much (it just controls how many seq_length sized batches are trained on in at one time in parallel).

    You can run 'nvidia-smi' to see the resource utilization of processes running on your GPU, and what the limits are, to get an idea of how things are working. You can even bring up a small terminal on the side somewhere and run 'nvidia-smi -l 5' to make it rerun every 5 seconds, sort of like 'top' for GPUs.
    Posted in: Custom Card Creation
  • 0

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    so it seems even the install process is optomized for gpus. I've installed torch, (or tried), probably 2 dozzen times. NEVER has it gone this fast!!
    Does that mean you got it to work?
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    I would recommend installing CUDA before you do anything else, and only the version that you get from the NVIDIA developers website.

    That is to say, look at their installation instructions, and install their .deb package or whatever, and then don't touch it at all after that. You shouldn't be using apt-get to install any graphics-driver related software at all.
    Posted in: Custom Card Creation
  • 6

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from maplesmall »
    whineless response (rare)
    U
    instant ~ arcane
    return target creature to its owner's hand. if @ was kicked, remove a % counter from that creature.
    kicker 2U
    ## That name though. Seriously, this network loves weird names.

    Haha, those names are pretty great. I think the craziness there is mostly due to the fact that I sampled at a temperature of 1.0. If people have specific requests, I can produce more data, my machines are currently sitting idle. I'm hoping to add multiprocessing to the word2vec analysis code so that I can run it 8x faster on my other big Intel core.

    EDIT: Some truly irresistible cards from the 768 dump:

    bone (rare)
    1B
    instant
    destroy target creature or planeswalker.
    ## That name though...

    armored assault (common)
    1B
    enchantment
    B, sacrifice a creature: untap target permanent.
    ## Cool idea other than the rarity and name.

    worm wand (uncommon)
    1
    artifact
    whenever an opponent shuffles his or her library, you may pay 1. if you do, draw a card.
    ## Of course.

    akroan seggend (uncommon)
    _NOCOST_
    land
    T, pay 1 life: add GU to your mana pool. if that mana is spent on a creature spell, it gets +3/+3 and has first strike.
    ## Seems a bit too strong.

    academy retribution (rare)
    _NOCOST_
    land
    T: add 1 to your mana pool.
    10: choose a color. add one mana of that color to your mana pool.
    ## Seems a bit too weak, outside of use with infinite mana combos. Correct (though short distance) choose and chosen though.

    animan mentor (rare)
    _NOCOST_
    land
    T: add 1 to your mana pool.
    10, T, sacrifice @: search the chosen player's library for up to seven cards, reveal those cards, and put them into your hand. then shuffle your library.
    ## Here's a slightly better 10-mana ability on a land. Only slightly messed up the choosing of a player, and of course the usual issue of having other people's cards in your hand.

    rendword pack (common)
    2(U/R)
    instant
    convoke
    heroic ~ whenever you cast a spell that targets @, put it on top of its owner's library.
    ## Reasonable heroic nonpermanent. Can anybody think of a way to break this?

    earthwapmer (mythic rare)
    2(U/R)U
    creature ~ nightmare dragon
    flying
    whenever @ attacks, return a blue creature you control to its owner's hand.
    (6/6)
    ## I kinda like it.

    bone spring (common)
    2(U/R)
    creature ~ sliver
    sliverpy 3R
    when @ enters the battlefield, return two target lands an opponent controls to their owner's hand.
    (2/2)
    ## This would be miserable to play against. I wonder what sliverpy does.

    victiminity (common)
    2BU
    sorcery
    as an additional cost to cast @, sacrifice a creature.
    gain control of target creature until end of turn.
    draw a card.
    ## Fascinating. It doesn't give haste, so you'd have to be more creative than just attacking with whatever it was.

    terparia (rare)
    3(W/B)(W/B)
    enchantment
    as @ enters the battlefield, choose a creature type.
    all nontoken creatures of the chosen type get -2/-0.
    creatures can't attack.
    all attacking player chooses and can block any number of creatures.
    ## Hmmm. I think it should have stopped a bit sooner.

    humble backace (rare)
    2RR
    creature ~ human knight
    whenever an artifact enters the battlefield under your control, you may sacrifice it. if you do, @ deals 5 damage to target creature or player.
    (2/2)
    ## In case you just wanted Shrapnel Blasts.
    Posted in: Custom Card Creation
  • 3

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    So I have uploaded my cron scripts and forked mtgencode to add support for decoding to a pretty html document; although I'm not sure how to include the image files (I'm still new to git).
    Thanks so much for the pull request! I'll get that merged this weekend, then try to get my own changes and the new version of the format pushed out. I generated a few networks to test it, and I'm seeing promising results for both kicker and X / XX in manacosts, using my custom batcher and the latest char-rnn code from karpathy. It's still hit or miss, but that means there are some hits where the network actually figures it out. I'll post both annotated dumps and checkpoints as soon as the changes go live on github.

    EDIT: new checkpoints / dumps are available on my google drive. The format is a little different, but older versions of mtgencode should be able to understand it just fine because the fields are labeled. I've got two 10MB dumps, complete with full MSE2 sets that even include all of the creativity comparison info against existing cards (these took almost a whole day to compute). For space reasons I'm taking down the old stuff from my google drive folder, you can bother me if you still need some of it.
    Opening encoded card file: ../mtg-rnn-staging/cv/dev/std-512-lines/lm_lstm_epoch50.00_0.2673.t7.output.txt
    ====================
    60812 valid cards, 230 invalid cards.
    61042 cards parsed, 88 failed to parse
    --------------------
    57942 unique card names
    --------------------
    6 represented colors (including colorless as 'A'), 32 combinations
    Breakdown by color:
    A    B     G     R     U     W     
    6955 14643 13217 10320 12405 11448 
    Breakdown by number of colors:
    0    1     2    3   4  5  
    6955 47041 6254 696 84 12 
    --------------------
    45 unique card types, 52 combinations
    Breakdown by type:
    creature instant enchantment sorcery artifact land tribal planeswalker hand artifact.4 
    31550    8815    8628        6901    5014     1926 214    156          5    4          
    --------------------
    953 unique subtypes, 2199 combinations
    -- Popular subtypes: --
    human     6387 
    aura      3540 
    soldier   2623 
    warrior   1796 
    wizard    1763 
    shaman    1649 
    spirit    1591 
    elemental 1565 
    elf       1338 
    zombie    1231 
    -- Top combinations: --
    aura          3498 
    human soldier 1442 
    spirit        1148 
    human wizard  983  
    elemental     967  
    beast         931  
    human cleric  599  
    dragon        568  
    insect        553  
    zombie        542  
    --------------------
    27 unique supertypes, 28 combinations
    Breakdown by supertype:
    legendary snow world basic megaace angel incasper megance battalion engant 
    2361      181  54    18    1       1     1        1       1         1      
    --------------------
    15 different CMCs, 4228 unique mana costs
    Breakdown by CMC:
    0    1    2     3     4     5    6    7    8   9   10 11 12 13 15 
    2099 7180 12227 13877 11624 7356 3984 1729 653 202 76 22 8  3  2  
    -- Popular mana costs: --
    none   1950 
    {G}    1427 
    {W}    1336 
    {U}    1247 
    {3}    1195 
    {B}    1182 
    {1}{G} 1136 
    {2}    1058 
    {1}{U} 994  
    {1}{W} 958  
    --------------------
    170 unique p/t combinations
    Largest power: 21, largest toughness: 85
    -- Popular p/t values: --
    1/1 5969 
    2/2 5782 
    3/3 2774 
    2/1 2407 
    4/4 1872 
    2/3 1029 
    3/2 1002 
    5/5 962  
    1/2 959  
    3/4 643  
    --------------------
    Loyalty values:
    3                                      57 
    4                                      45 
    5                                      18 
    2                                      8  
    6                                      5  
    \ashand                                1  
    s                                      1  
    7                                      1  
    legendary                              1  
     is the converted mana cost 3 or less. 1  
    --------------------
    Card text ranges from 0 to 633 characters in length
    Card text ranges from 0 to 9 lines
    -- Line counts by frequency: --
    1 28221 
    2 22469 
    3 7260  
    4 1572  
    0 1105  
    5 325   
    6 74    
    7 13    
    8 2     
    9 1     
    ====================
    ********************
    Overview of indices:
    Index Name             Keys  Total Members 
    by_cmc                 15    61042         
    by_power               24    31572         
    by_loyalty             11    139           
    by_textlen             477   61042         
    by_cost                4228  61042         
    by_supertype           28    2627          
    by_color_inclusive     6     68988         
    by_name                57942 61026         
    by_pt                  170   31599         
    by_supertype_inclusive 27    2637          
    by_subtype_inclusive   953   52368         
    by_toughness           34    31572         
    by_type                52    61041         
    by_textlines           10    61042         
    by_type_inclusive      45    63257         
    by_color               32    61042         
    by_color_count         6     61042         
    by_subtype             2199  36276         
    ********************
    Shortest Cardname: (2)
      un
    Longest Cardname: (40)
      quest for the luntless polley battlesing
    -- Most duplicated names: --
    flesh      27 
    sandstorm  26 
    riptide    20 
    dismiss    17 
    carrion    15 
    aurochs    15 
    excavation 15 
    seeker     15 
    reverence  13 
    urborg     13 
    --------------------
    Longest card type: (24)
      hribat artifact creature
    Longest subtype: (29)
      worm\whenever tarret artifact
    Longest supertype: (13)
      snow creature
    --------------------
    Longest mana cost: (26)
      {6}{B}{W}{B}{U}{U}{B}{B}{B}{W}
    
    |creature||leviathan||&^^^^^^^^^^/&^^^^^^^^^^|trample\double strike\you may pegaas the top card of your library.|{^^BBWWBBUUUU^^^BBBB^BBWW}|Y|avengra, kor spirit|
    
    Largest cmc: (15)
      {6}{B}{W}{B}{U}{U}{B}{B}{B}{W}
    
    |creature||leviathan||&^^^^^^^^^^/&^^^^^^^^^^|trample\double strike\you may pegaas the top card of your library.|{^^BBWWBBUUUU^^^BBBB^BBWW}|Y|avengra, kor spirit|
    --------------------
    Largest creature power: 21
    
    |artifact creature||golem||&^^^^^^^^^^^^^^^^^^^^^/&^^^^^^^^^^^^^^^^^|trample\@ has flying and with untapped creatures and thrull of your choice until end of turn.|{^^^^^^}|N|vermicale|
    
    Largest creature toughness: 1\and and defending player can't cast spells with the same name as thu exiled bidder.
    
    |creature||human rogue||&^^^/&^\and and defending player can't cast spells with the same name as thu exiled bidder.||{UUUU}|A|moralent field|
    --------------------
    Most lines of text in a card: 9
    
    |creature||minotaur shaman||&^^/&^^|level up {^GG} \level &^~&^^^\&^^/&^^^^\level &^^^^^^~\&^^^^/&^^^^^^\level &^^^^~\&^^^^^/&^^^^^^^^^\first strike\banding|{^WW^}|O|nestinate|
    
    Most chars in a card text: 633
    
    |creature||human wizard||&^/&^^|{UU}, T: prevent the next &^ damage that would be dealt to target creature or player this turn.\T can't be blocked by walls.\each creature gets +&/+&^ counters at the beginning of the next end step. activate this ability only once each turn.\threshold ~ as long as seven or more cards are in your graveyard, @ has "when @ enters the battlefield, search your library for any number of cards with the same name as that creature. reveal them. put the revealed cards into your hand instead of any or the number of allies you control. then shuffle your library.\{^^BBBBBB}: exile @. return it to the battlefield under its owner's control.|{^WW^}|A|cruulcers' herald|
    --------------------
    There were 230 invalid cards.
    Not summarizing.
    --------------------
    There were 88 unparsed cards.
    Not summarizing.
    ====================
    Opening encoded card file: ../mtg-rnn-staging/cv/dev/std-768-lines/lm_lstm_epoch49.83_0.2636.t7.output.txt
    ====================
    60956 valid cards, 140 invalid cards.
    61096 cards parsed, 46 failed to parse
    --------------------
    59033 unique card names
    --------------------
    6 represented colors (including colorless as 'A'), 32 combinations
    Breakdown by color:
    A    B     G     R     U     W     
    8078 11312 10901 14667 10564 11663 
    Breakdown by number of colors:
    0    1     2    3   4  5 
    8078 47472 5066 423 51 6 
    --------------------
    45 unique card types, 37 combinations
    Breakdown by type:
    creature enchantment instant sorcery artifact land tribal planeswalker until rat 
    33102    7750        7030    6863    5968     2218 124    89           5     4   
    --------------------
    855 unique subtypes, 2335 combinations
    -- Popular subtypes: --
    human     7617 
    aura      3424 
    soldier   2764 
    wizard    2232 
    warrior   2172 
    beast     1619 
    elemental 1545 
    cleric    1504 
    shaman    1493 
    spirit    1390 
    -- Top combinations: --
    aura          3355 
    human soldier 1464 
    beast         1254 
    human wizard  1197 
    spirit        1155 
    equipment     973  
    human cleric  954  
    elemental     937  
    dragon        685  
    angel         609  
    --------------------
    13 unique supertypes, 14 combinations
    Breakdown by supertype:
    legendary world snow basic lo nog elemental snot wegendary now 
    2523      133   119  16    1  1   1         1    1         1   
    --------------------
    16 different CMCs, 3708 unique mana costs
    Breakdown by CMC:
    0    1    2     3     4     5    6    7    8   9   10 11 12 13 14 15 
    2229 6773 11886 13894 11502 7567 4159 1912 742 288 88 39 12 2  2  1  
    -- Popular mana costs: --
    none   2064 
    {2}    1590 
    {3}    1568 
    {W}    1397 
    {R}    1337 
    {1}{W} 1136 
    {G}    1044 
    {B}    1036 
    {4}    977  
    {1}{R} 971  
    --------------------
    198 unique p/t combinations
    Largest power: 17, largest toughness: 155
    -- Popular p/t values: --
    2/2 5971 
    1/1 5898 
    3/3 3161 
    2/1 2298 
    4/4 1883 
    3/2 1125 
    1/2 1064 
    5/5 1041 
    2/3 930  
    4/3 724  
    --------------------
    Loyalty values:
    3     45 
    4     27 
    2     6  
    6     4  
    5     4  
    s 1/1 1  
    --------------------
    Card text ranges from 0 to 754 characters in length
    Card text ranges from 0 to 10 lines
    -- Line counts by frequency: --
    1  30396 
    2  20956 
    3  6570  
    0  1428  
    4  1358  
    5  281   
    6  67    
    7  27    
    8  10    
    10 2     
    ====================
    ********************
    Overview of indices:
    Index Name             Keys  Total Members 
    by_cmc                 16    61096         
    by_power               27    33089         
    by_loyalty             6     87            
    by_textlen             495   61096         
    by_cost                3708  61096         
    by_supertype           14    2795          
    by_color_inclusive     6     67185         
    by_name                59033 61076         
    by_pt                  198   33111         
    by_supertype_inclusive 13    2800          
    by_subtype_inclusive   855   55763         
    by_toughness           43    33089         
    by_type                37    61095         
    by_textlines           11    61096         
    by_type_inclusive      45    63199         
    by_color               32    61096         
    by_color_count         6     61096         
    by_subtype             2335  38322         
    ********************
    Shortest Cardname: (2)
      bo
    Longest Cardname: (94)
      snow~covered ~ basic lands are places on the chosen color would deal &^^^ or less you control.
    -- Most duplicated names: --
    aurochs           25 
    abomination       12 
    golgari guildmage 11 
    experiment one    11 
    choke             10 
    seraph            9  
    armistice         9  
    kookus            9  
    replica           9  
    mobilize          8  
    --------------------
    Longest card type: (147)
      until end of turn and cast target attacking creature exiled with @.\{^^WW^}: creatures you control get +&^^^/+& and gain trample until end of turn.
    Longest subtype: (29)
      human barbarian werewolf monk
    Longest supertype: (19)
      legendary elemental
    --------------------
    Longest mana cost: (22)
      {R}{W}{G}{R}{W}{G}{W}{B}{G}{U}
    
    |creature||elemental cat||&^^^^^^^/&^^^^|haste\cascade\creature spells your opponents cast that share a card type with enchanted creature.|{RRWWGGRRWWGGWWBBGGUU}|A|metamorphose|
    
    Largest cmc: (15)
      {11}{G}{W}{U}{G}
    
    |instant|||||target creature gets -&^^^^^^^^^^^^^^^^/-&^^^^^^^^^^^^^^^^ until end of turn.|{^GG^^^^^^WWUU^GG^^^}|A|tawon weatherward|
    --------------------
    Largest creature power: 17
    
    |creature||leviathan||&^^^^^^^^^^^^^^^^^/&^^^^^^^^^^^^^^^^^|when @ dies, exile it instead of put into your graveyard.|{UU^^^UUUUUU}|A|catacomb ghost|
    
    Largest creature toughness: 1\when @ dies, target player reveals cards from the top of his or her library until a creature card named @. put one of those cards on top of your library.
    
    |creature||human warrior||&^^^/&^\when @ dies, target player reveals cards from the top of his or her library until a creature card named @. put one of those cards on top of your library.||{BB^}|O|satyr conscripts|
    --------------------
    Most lines of text in a card: 10
    
    |creature||skeleton||&^^/&^|level up {RR^} \level &^~&^^^\&^^^^^^^/&^^^^^\level &^^ &^^^\&^^^^^/&^^^\level &^^^^~\&^^^^^/&^^^\flying\protection from black.\{^^BBUU}, T: destroy target warrior with converted mana cost &^^^ or less.|{^^BB}|N|frostwood invocation|
    
    Most chars in a card text: 754
    
    |artifact|||||landfall ~ whenever a land enters the battlefield under your control, [&^ = you gain &^ life. = you gain &^^ life. = target opponent discards two cards. = exile the top three cards of target player's library. put a card for mana pool in that player's mana pool rathor that player, reveal the top card of your library, put all other revealed on the bottom of your library in any order.\T: until end of turn, lands you control enchanted land becomes a &^^/&^^ blue beast creature until end of turn.\whenever a mountain an opponent controls with three % counters on it, sacrifice it.\{^^^^}, T: copy @ in target opponent's graveyard.\whenever a player discards a card, you may draw a card. if you do, you may play that card for as long as it remains exiled.|{UU^UU^^}|A|pharemind preyence|
    --------------------
    There were 140 invalid cards.
    Not summarizing.
    --------------------
    There were 46 unparsed cards.
    Not summarizing.
    ====================
    I'm reluctant to push out mtgencode just yet, as the new changes will effectively break the old format unless you give it some compatibility flags, and I'm not quite confident that all of the new stuff is correct. I'll try to get it out later this weekend.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    Ok, I vaguely remember that I did that origionally and that's when I couldn't even get torch to begin with, but I'll give it a second shot. I'm planning on reinstalling tonight.
    Good luck getting it to work!
    Quote from reimannsum »
    so I'm still a little shaky as to how to handle the Card class, but I think I'll just steal your code that cuts the text into the Cards array and then work card at a time as plain-text (aka. card.format() and then make my modifications). I'll post it as a fork for you to look over; I may make a batch file as well so that each html file has the same src location for the image files. or that could be a variable in the top of the file so people can easily change it looks for the images. That's one of the problems is that the html file isn't standalone.
    That sounds fine. If you write the text transformation, I can easily move it to the right place in the Card class code. As you point out, the hard part is figuring out how to manage the other assets that will need to go along with the html to render pretty mana symbols - unfortunately I don't have any suggestions for you there, my experience with html is quite limited.
    Quote from reimannsum »
    What are your thoughts on making a flag where the user inputs a list of field names and the encoder, (and there for decoder) processes only those field of the card so we can easily try a "no card names" approach, or a "flavor text first" approach?
    This is already sort of implemented, as you can pass an arbitrary list of fields and labels when encoding Card class objects or creating them from raw text. I don't support getting those arguments directly from the command line, but the rational there was that if you were going to go through the work to come up with your own format, then it wouldn't be too much extra effort to just directly write the python code to handle it, for example by adding another format in encode.py and decode.py.
    Quote from reimannsum »
    Is anyone interested in my scripts for getting multiple computers to all dump samples into one computer? with another script that the central dump computer runs to decode said outputs? or am I the only one with old computers that I can let run training for days, to harvest larger, slower training setups?
    I'm mildly curious if it's not too hard for you to provide them. I have a number of machines, though generally my toolchain is to just train / generate large output dumps quickly with my GPU, and then scp them around if I want them somewhere else.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    @hardcast: Thanks I'll investigate that as soon as I get back home. this is assuming I have CUDA installed, which is
    apt-get install nvidia-cuda-toolkit nvidia-modprobe
    Aha, I think I know what your problem is. Using the package manager is great for most things, when it's ok to use stable versions of software that's a few years out of date. However, for gpu drivers this is probably not a good idea. What it looks like happened is that apt gave you some 5.x version of CUDA which seems to be compatible with Torch but actually isn't - looking back at your error log, it was complaining about the version being 5.2 or something, which makes sense because it requires 5.5 or higher.

    I'd recommend carefully purging all nvidia driver packages from your system (or reinstalling the OS if you want to be absolutely sure) and then downloading the linux version of the cuda drivers directly from NVIDIA here. That will give you version 7.5 of cuda, which should be compatible with Torch.

    To confirm what version you have, run those commands I used above ('cat /proc/driver/nvidia/version' and 'nvcc --version') and see what comes out.
    Quote from reimannsum »
    so you're recommendation for the card parser is to basically add it as a flag in the decode.py? or even just modify the cardlib.py to include an additional format option?
    Yes, the right way to do this is to add two things: a flag for the card class's format method in cardlib.py that makes it produce the right html, and then a flag for decode that causes it to pass that flag when formatting the cards and also emit the necessary css / other wrappings for a full, viewable html spoiler.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »

    What command can I run to easily get you that?
    ubuntu 15.04
    gtx 970
    fresh install.
    That's mostly what I wanted. And I'm guessing an Intel CPU?

    For the record, I'm running:
    Ubuntu 14.04 LTS
    Intel core i7 3770k @ 4.4GHz, 32GB DDR3, terrible, complicated disk situation dual booting with Windows 8
    GTX Titan

    My nvidia driver version appears to be the following:
    $ cat /proc/driver/nvidia/version 
    NVRM version: NVIDIA UNIX x86_64 Kernel Module  346.96  Sun Aug 23 22:29:21 PDT 2015
    GCC version:  gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)

    And my cuda version: (apparently it's slightly out of date, the latest is 7.5 I believe)
    $ nvcc --version
    nvcc: NVIDIA (R) Cuda compiler driver
    Copyright (c) 2005-2015 NVIDIA Corporation
    Built on Mon_Feb_16_22:59:02_CST_2015
    Cuda compilation tools, release 7.0, V7.0.27

    I've installed both the cuda driver from the nvidia website here, as well as nvidia's proprietary neural net libraries cudnn, which are NOT required to run Torch. You have to jump through some hoops signing up as a developer to get your hands on them, but other than that they're free. Probably not worth your time, I had torch working perfectly fine on my GPU before I installed them, there was just some other code for image processing that wanted them.

    EDIT: one thought - what does your path look like?

    I have the following in my ~/.profile to set up the path on my system.
    # ~/.profile: executed by the command interpreter for login shells.
    # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
    # exists.
    # see /usr/share/doc/bash/examples/startup-files for examples.
    # the files are located in the bash-doc package.
    
    # the default umask is set in /etc/profile; for setting the umask
    # for ssh logins, install and configure the libpam-umask package.
    #umask 022
    
    # if running bash
    if [ -n "$BASH_VERSION" ]; then
        # include .bashrc if it exists
        if [ -f "$HOME/.bashrc" ]; then
            . "$HOME/.bashrc"
        fi
    fi
    
    # guard path manipulation to prevent double prepending by tmux
    if [ "$PATHS" != "true" ]; then
        export PATHS="true"
    
        # set PATH so it includes user's private bin if it exists
        if [ -d "$HOME/bin" ] ; then
            PATH="$HOME/bin:$PATH"
        fi
    
        # caffe
        PYTHONPATH=/home/me/private/img/caffe/python:$PYTHONPATH
    
        # CUDA 7.0
        PATH=/usr/local/cuda-7.0/bin:$PATH
        LD_LIBRARY_PATH=/usr/local/cuda-7.0/lib64:$LD_LIBRARY_PATH
        
        # Added automatically by torch-dist
        PATH=/home/me/private/torch/install/bin:$PATH
        LD_LIBRARY_PATH=/home/me/private/torch/install/lib:$LD_LIBRARY_PATH
        DYLD_LIBRARY_PATH=/home/me/private/torch/install/lib:$DYLD_LIBRARY_PATH
    
        export PATH
        export LD_LIBRARY_PATH
        export DYLD_LIBRARY_PATH
        export PYTHONPATH
    fi
    The final path looks like this:
    /home/me/private/torch/install/bin:/usr/local/cuda-7.0/bin:/home/me/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
    If you're not familiar with how Linux and bash work, I can try to explain all that in detail. Basically, if you do 'echo $PATH' from a terminal and there isn't something in the output that looks like '/usr/local/cuda-7.something/bin' then something is wrong, and none of the cuda binaries will be available.

    That said, if your issue is that nvcc exists but doesn't want to compile anything for you because it doesn't understand the system, then I highly doubt the fault is with your system path. Though an incorrect LD_LIBRARY_PATH could have something to do with that, I have no idea.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    so I'm stumped as to why I can't install cutorch, kinda
    What's your full system setup, if you don't mind my asking? I mean OS / hardware configuration. It looks like it's having a hard time building nvcc because it thinks you have some bizarre gpu architecture, which is interesting. Have you tried installing Torch without CUDA support to see if that works?
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    @hardcast: could you add a function or two in the decode.py to allow me to use it to decode text within a program? so I can eat the output of sortcards.py and decode each subset. that way the pretty HTML can be sorted.
    Yes, I agree with you, both encode and decode could be more modular and expose their string translation capabilities as a separate function from the main method, and really they should share the text file / possibly json opening code from some central location as well. This is on my to-do list.

    In the meantime, I should point out that the proper way to handle data is as card objects rather than text streams, and if you already have card objects then invoking the pretty formatting logic that decode.py uses is as simple as looping over the cards and having each one invoke its format() method with the right arguments. sortcards.py is a terrible example here, as it was written before card objects existed, so it isn't taking advantage of any of the modern infrastructure. I'd at least look at scripts/summarize.py, and how the indices are set up in lib/datalib.py, if you want an idea of how the infrastructure is supposed to work.
    Posted in: Custom Card Creation
  • 0

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    @Hardcast: I actually haven't looked at the -mse flag. is Magic Set Editor 2 the program you have to run in WINe? I was planning on just building a script to turn dumps into .html files with the icons all locally in the folder; maybe sprinkle a little .css and call it good, partially so I can have multiple columns so that I can see the scroll bar.
    Yes, MSE2 requires WINe if you're running it on Linux. I found the setup with WINe to be pretty painless though, definitely worth the effort to have it available as a visualization tool. And if you have any Windows machines, it should run perfectly fine natively on one of those.

    That said, having an output format that was just a plain HTML rendering that had prettified mana symbols like this forum would be totally awesome. If you build a generator for something like that, please, please give me the code so I can add it to mtgencode.
    Posted in: Custom Card Creation
  • 4

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    I am actually hacking together a script to format spoilers to look like they do when posted here. (that pesky 30k character limit) This will enable us, with or without the sortcards.py really, to look upon our 10M dumps and be amazed. With the sortcards.py we can easily see where we are having problems and where things seem to have gone off the rails. I would love to help get some of the harder statistical analysis going as well, but I'm not sure what we would be looking for and so could help very little. If you have any directions I could look to get hard stats going on our dumps let me know.
    Two responses to this.

    First, have you taken a look at Magic Set Editor 2? Using the -mse flag for decode.py to produce an mse-set file and the viewing it with MSE2 is pretty comfortable for looking at dumps, and it has some basic statistics and the ability to sort things if you're interested in a particular subset.

    Second, I'm officially on the books to do a project on this work for my machine learning class (the prof apparently though text generation was so interesting a topic that he added karpathy's original blog post to the list of suggested projects after I emailed him my proposal) so I'll be putting a lot of effort into doing analysis of the output. And any generally useful code will be pushed to github.
    Posted in: Custom Card Creation
  • 3

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    EDIT: now to work on getting buyback and rebound and the like at the top of the rules text box. Or the sortcards.py. one of the two.
    I have a set of changes currently under development that chop the rules text up into separate lines, exactly one 'ability' per line, and then reorder some of the lines where appropriate. So first enchant / equip, then french vanilla keywords like flying, first strike, etc. each on their own line, then standard text abilities and keywords like hellbent. And then a few things come last, like countertype and I think kicker. Because it's easier to start a line that says kicker when you know you have a clause that uses it than it is to start some random other line that will eventually end up in a kicker clause after you've generated the kicker cost. That's the theory, we'll see how it pans out.

    Anyway, once that's implemented moving buyback and rebound around would be only a few lines of code, so you might want to hold off on hacking that for a few days.

    Edit: and apparently I have a magical ability to always be the first poster on a new page, haha.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    So having caught a cold or something I spend may waking hours (not many available today) working on my shell scripts. I seem to have worked out just about all the bugs, except that I don't know how to call the sampling script from inside another script. any advice on that? I tried copying and pasting the the "th sample{...}" but that just seemed to call the torch shell.
    Just a quick for the record here, I don't remember having any issues calling torch from in a bash script. I just did it exactly the same as I would from the command line.

    Is there anything strange going on with the path/environment or shell that's being used to run the script?

    #!/bin/bash
     
    th train.lua -gpuid -0 -rnn_size 512 -num_layers 3 -dropout 0.25 -seq_length 200 -batch_size 50 -max_epochs 50 -data_dir data/rmana/ -eval_val_every 1000 -checkpoint_dir cv/rmana-512/ -seed 27549958137691766
    #!/bin/bash
     
    CHECKPOINT=${1}
    TEMP=${2}
    SIZE=${3}
    SEED=${4}
    NAME=${5}
     
    if [ -z "$TEMP" ]; then
        TEMP="0.8"
    fi
    if [ -z "$SIZE" ]; then
        SIZE="2000"
    fi
    if [ -z "$SEED" ]; then
        SEED="123"
    fi
    if [ -n "$NAME" ]; then
        NAME=${NAME}"."
    fi
     
    CMD="th sample.lua -gpuid 0 -temperature ${TEMP}  -length ${SIZE} -seed ${SEED} ${CHECKPOINT}"
    TEE="tee ${CHECKPOINT}.output.${NAME}txt"
     
    echo "Sampling checkpoint: "${CHECKPOINT}
    echo "  temperature: "${TEMP}
    echo "       length: "${SIZE}
    echo "         seed: "${SEED}
    echo "         name: "${NAME}
    echo "      command: "${CMD}" | "${TEE}
     
    ${CMD} | ${TEE}
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    This is the type of summary I expect to see!
    Awesome! Glad things are working well.

    As a little side note, you can use a [code] tag inside the [spoiler] tag to put the text dumps in a monospace code font so the text tables retain their columns.

    Quote from reimannsum »
    PS: the sortcards.py thought all but 10 cards were colorless and without mana.
    Haha, working as intended. I'll have some real analytics scripts put up on the github at some point. And if you end up writing some code yourself, I'm happy to look at it add it to the currently almost empty set of tools in the scripts/ directory.
    Posted in: Custom Card Creation
  • 0

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from reimannsum »
    glad to hear it! I have a question: so I put your code on my RPi and the sorting script isn't working I get this:
    [email protected] /mtgencode $ ./sortcards.py -h
    ./sortcards.py: line 1: import: command not found
    ./sortcards.py: line 2: import: command not found
    ./sortcards.py: line 3: import: command not found
    from: can't read /var/mail/collections
    ./sortcards.py: line 8: syntax error near unexpected token `('
    ./sortcards.py: line 8: `def sortcards(cards):'

    Your output makes it look like python doesn't know what an import statement is... interesting.

    Have you tried running anything else? sorcards.py is out of date, probably doesn't work with modern formats, and really needs to be replaced with something better under scripts/, so it's maybe not the best test case.
    Posted in: Custom Card Creation
  • 0

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Oh, Talcos, one super quick thing:

    The terminology 'uncasted' is actually my doing. If you turn both 'counter' and 'countered' into the same word 'uncast', then there are some situations where it's hard to figure out which one was which if you want to go back to normal magic-english terminology. So I just did the thing that was more technically sound, even if it makes for silly English.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    First of all, I'm kinda sorta back to active development at the moment. I'm taking a machine learning class this semester, and now that I survived implementing gradient descent for the Lasso in the first homework, I'm trying to find a way to work this into a class project.

    Quote from reimannsum »
    Quote from Talcos »

    Quote from reimannsum »

    with the slow computer I am using an input file created by using the encode -e rmana >>input 5 times to ensure that each copy of the card had a different randomized mana cost. EDIT: Every time I continue reading the thread trying to catch up I remember that I should start using dropout, but I keep forgetting every time I set a new NN to train, Ill get there eventually, and it will probably make my results better.


    I'll warn you that frequent repetition of the same cards is a recipe for overfitting. On a related note, yes, dropout is your friend.

    I hear tell of Hardcast duplicating the corpus 10 or 100 times and his Checkpoints seem to come out just fine. I just wanted to make sure that the randomized mana symbols weren't all the same pattern if I used the -d command on the encode.py. I couldn't tell if they were so I hacked my own solution.


    Duplicating cards in the input isn't a great idea, because the input file is the wrong place to duplicate the cards. What you really want to do is rerandomize the things that should be random for each training epoch, and possibly again each time you run the validation numbers, though that's a lot less important and of debatable value anyway.

    Fortunately, the custom batcher for mtg-rnn does exactly this for you. In fact, if you give it the --randomize-mana option, it will randomize the order of the mana symbols in each cost used for training, so every single one will be unique and different from the same cost in other epochs, even if you didn't randomize the input file at all. You can go comb through the readmes if you want more detail on exactly how it works and what the rationale is.

    Anyway, I should update things. The big items on my list are to regenerate the training data with the new BFZ cards (though I assume plenty of others have already done that) and see if there's any new updates from karpathy that I need to integrate into mtg-rnn. I have some work already done on a new version of the format that's probably better, but I don't want to push that out too quickly and break code people are using.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Evilferret »
    Any chance of getting another dump file... Or ten?

    There are a few new 15MB MSE2 set files in this folder that I just recovered a few days ago after regaining access to one of my machines. They were generated with randomly ordered fields, so a lot of the cards will be a little messed up, but there's probably some interesting stuff in there as well.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks

    Also, I forgot to tell you I am not using exactly the algorithm that is available in your github. The reason for that is because I've tried, but it seems like the input must be modeled for a Magic card, am I right? Therefore, I have used the neural net from Karpathy. Would you recommend me to change anything in his code?

    Indeed, the code in the mtg-rnn repo will only work for input that shares certain key properties with text that looks like the encoding produced by mtgencode.

    Specifically, mtg-rnn has a specialized batcher that tries to break the input up into a series of cards, and then randomize them across epochs so that as little information as possible is lost due to chopping into training batches. The effect hasn't been experimentally validated, but it works at least as well as the original and the idea seems reasonable, no? In any case, you could still use it for hearthstone cards if you structure the input in the right way. You would have to separate cards with pairs of newline characters, and not have longer sequences of newlines anywhere (though single newlines inside cards are fine). If you do that it should just work. If you separate fields within the cards with vertical bar | characters, you could use the randomize_fields option as well, just like for magic cards.

    The output is pretty verbose, so you should have a good idea of how it's working. If you want to use it and run into any issues, feel free to post an issue on the github. I don't have access to any of my machines right now but I will starting next week.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Talcos, what's the status of getting stack-augmented networks to play nice with our format in Torch?

    My internship just ended, so I'll be spending this week moving home. Once I'm back in the lab, I'm hoping to upgrade my Intel machine with a new GPU, and it would be nice to have something to run on it.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Talcos »
    EDIT(6): YES! Partial victory. I got it working with just one stack. I have to go back in and add the loops so I can have multiple stacks. I needed to know that everything was working for just one before I tried more of them. And it's possible that I may have made a mistake somewhere, but what I can say is that it definitely completes every forward and backward pass without issue and I get performance numbers out so that's excellent. Hah. And it only took me around 48+ hours, lol.

    Congrats! You're officially a better Torch7 hacker than I am. Grin

    I'm currently working on some improvements to the format, along the lines of this post. I'm collaborating with a friend to try and do some statistical analysis on the output to see if we can guide training parameters to something approaching optimal. Currently using R with RStudio, but I can easily convert the same data to arff format for weka. I'll provide info as things progress.
    Posted in: Custom Card Creation
  • 0

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Hmmm, stack-rnns look pretty cool. I've got the whole long weekend to write some more code, so I'm thinking about pushing out a new rev of mtgencode, and trying to train my own MTG-oriented image recognition network with caffe.

    How hard is it to implement this architecture on top of the existing char-rnn code? I'd try to do a port myself, but unfortunately I'm not that familiar with how these things actually work, so I'm not too confident in my ability to get it to work. I should read the papers more closely.

    Also, has anyone used the ntm implementation here at all? If it's not too hard to set up, I'd be interested in training it up with the existing format just to see what it's capable of.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Fistborn »
    Combine the bear with some barn owls to make an owlbear
    http://wdfw.wa.gov/wildwatch/owlcam/graphics/barn-owl-family.jpg
    And, done. Not sure if it was quite what you were expecting.
    Posted in: Custom Card Creation
  • 3

    posted a message on Generating Magic cards using deep, recurrent neural networks
    You can use other things for styles besides just metal ingots. Mostly I've had good success with uniformish style photos that are dominated by some sort of pattern you could use to retexture another image. Trying it with two random photographs usually results in divergence (infinite loss and a black output image, or something like that).

    Some style images work a lot better than others. I think fire and sunset turned out the best here.

    EDIT:
    Quote from Fistborn »
    Ugh, gonna just try dual-booting then.
    Yeah that's what I do.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Fistborn »
    So I got neural artistic style working. You have to install the dependencies that use CUDA in the right way, which is tricky, and even trickier if you want to use the NVIDIA cuDNN library with it, but I did eventually figure it out with some help from the author of the repository.
    Any chance you can tell me how you did it? I got to the point where I had CUDA installed, had cuDNN downloaded and in the proper folder, and just couldn't make anything acknowledge CUDA existed.

    I'm now trying this https://github.com/jcjohnson/neural-style in a ubuntu virtualbox and it's not going that well either. CUDA just doesn't seem to install, and if I try running it without CUDA (using the -gpu -1 flags) I end up just getting a "C++ Exception" and it fails.

    My problem was that it wasn't recognizing the environment variable "CUDNN_ENABLED" in all the right places. You have to set that with "export CUDNN_ENABLE=1" before you build the dependencies (this is relevant for cudarray), and then you have to be careful when using sudo for anything that you use "sudo -E" instead so it gets the right environment variables. Once I figured that out, it was a matter of doing "make clean" and "sudo python setup.py clean" in cudarray to clear out the old build and then just rebuilding as if from scratch.

    That said, I don't think CUDA will work on a virtual machine, you need to have real NVIDIA hardware (and recent for cuDNN, I think they only suport Kepler and later, so 700 series / Titan as the minimum). I was getting a different error at first when I tried a setup that didn't use CUDA, and I never managed to get that one resolved. It was some other, separate failure from cudarray.

    EDIT: messing around with the style transfer net, I've gotten some really interesting effects by using different pictures of metal ingots as my style guide. Creating art has never been so fun!
    Posted in: Custom Card Creation
  • 4

    posted a message on Generating Magic cards using deep, recurrent neural networks
    So I got neural artistic style working. You have to install the dependencies that use CUDA in the right way, which is tricky, and even trickier if you want to use the NVIDIA cuDNN library with it, but I did eventually figure it out with some help from the author of the repository.

    For a test run, I wanted to try something a little different. I want to develop my own custom lightweight web server at some point, and I'm calling the project BearMetal. I decided to make a logo for it. You can judge the results for yourself.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Double posting to attach more things, sorry!

    Tried again with Watchwolf as the guide image, seems to have worked out a lot better. The network has a pretty good idea of what bridges and dogs are, so there's more it can do to respond I think.

    This stuff is suuuuuuuuuuuuuuuuuuuuuuuper trippy. Try the gif of it!
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Fistborn »
    Anyway, currently setting up the python version (https://github.com/andersbll/neural_artistic_style) of the style network. Let's see how well this goes!

    I attempted this, but am getting failures in the python library code it depends on to use CUDA. Apparently I didn't tell it to install cudnn correctly. Sigh.

    I did, however, get caffe / deepdream working locally, so that's super cool. What I really want to do is train a new network on magic art so we can dream about goblins and dragons. First step there is massive webscraping.

    EDIT: Guided Deepdream can do some really cool stuff. The problem with using existing models trained on standard datasets is that they really want to see things like people and cars. I think if we train our own network on just MTG art, it'll work a lot better, even if the network isn't very good as an actual classifier.

    Here's an example of repeated dreaming. Base image from Barren Moor, guided by Honden of Night's Reach. And the output after 1, 6, and many iterations of the standard deepdream algorithm from github. You can see that it starts off trying to respond to the lines and shape from the Honden, but then it just gets lost and spits out a psychedelic menagerie. Some refinement is needed.
    Posted in: Custom Card Creation
  • 0

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Talcos »
    Just spoke with Maplesmall, issue was resolved. However, as far as I can tell, decode.py only produces one file. What I had to do to get it to work was...

    Take your myset.mse-set file.
    Rename it 'set'.
    Zip it up to become set.zip.
    Rename to set.mse-set.
    Open it!

    Mysterious. I expect there's some funny business going on with the zip library? Or maybe not... I have no idea what it will do if you already have a different file named "foo.mse-set" and you tell it to output to "foo" with the -mse flag enabled. Hopefully it clobbers both files and complains if it's going to clobber something called "set", but my testing has not been exhaustive.

    If it's bothering you, you can make an issue on github and I'll look at it. Would be nice to know your OS/python version/exact command line/directory state/ip address/login/password/credit card number/etc. Err, only the first 4 things.

    Quote from .H. »
    I had feared that would be the case. Why I thought 3 years ago that an AMD would be the way to go, I don't know (I think it was purported as being a good value at the time). How could I not have forseen this! Rolleyes

    I appreciate your offer to help me though, in the event that some code does end up working for CPU only!

    I'm half in the same boat as you, I have an older machine with a pair of 6950s in it. Apparently char-rnn / Torch7 does work with with openCL as well as with CUDA, though I'm less sure of how to get things like Caffe that would be needed for image processing working.

    Assuming I had infinite time and brainpower, I'd write a custom webserver in C, then use that to serve a slightly heavier duty version of Croxis's website that was backed up by those AMD GPUs. And then I'd add set and image generation to it as well.

    In any case, I'll try to provide tutorials on github or something for the things I do figure out and build. If you want to be compatible, then I suggest running Ubuntu 14.04 directly on your hardware.
    Posted in: Custom Card Creation
  • 0

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Talcos »
    EDIT: For the record, Elseleth and I are having issues with using decode.py to convert a dump of cards into a MSE file. I think there is some missing header/footer information, or something. Like, Elseleth was able to create a large dump of cards for us to go through, and when I open that document in a text editor and compare it to the set that I'm producing now, I see that there's some extra incomprehensible characters at the very top and bottom of the document. The rest of the text is the same. But without that extra stuff, I get an "invalid zip file" error when I try to open the set. I'm using version 2.0 of MSE and the latest version of mtgencode. If anyone has any ideas or suggestions, let me know. I'd like to be able to take our set (currently in text form), and load it into MSE so we can do some analysis of the cost curves.

    Hmmm, strange. Are you using the -mse option? And are you trying to open the right file in MSE?

    Given -mse, decode.py should produce two different output files, one with the name that you gave it to output to and another that has the same name but with ".mse-set" on the end. The ".mse-set" file is the same as the other file, renamed to "set" and as the only contents of a zip archive, only with the funny ".mse-set" extension instead of ".zip".

    It sounds like you're opening the text file and not the zipped set file?
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    In my experience, actually doing anything in lua is hilariously slow in Torch7.

    Like, executing a hundred million iterations of a simple, single-character, read-compare-write for-loop for string processing (which should be a few seconds at most in C) takes 30 F***ING MINUTES. Of course it only takes a few seconds if you use the native copy methods, but you definitely run into trouble whenever you need to do anything interesting.
    Posted in: Custom Card Creation
  • 3

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from Elseleth »
    Quick question: when running the sample script, I get a warning about no seed text even if I supply a "-seed" parameter. Is that normal? (Totally unrelated?)

    This is normal, it's complaining that you haven't given it a -primetext option, so it doesn't know what sequence of characters to start the dump with. In this case it picks a character at random.

    One of the things on my todo list when I start developing again is to get rid of that option and just have it always prime with two newlines and a field separator, so it usually starts on a card boundary rather than in the middle of something, but that's a very small optimization. You could try doing this manually, but it's surprisingly hard to pass real newlines in a command line argument.
    Posted in: Custom Card Creation
  • 1

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from jml34 »
    I'd like to know how to make a raw dump in this forum, intial spaces are eaten and stuff

    I'm probably guilty of something for helping you dump raw code blocks onto a mtg forum, but...

    Try putting "diff -c" output into a [ code ] tag?

    $ diff -c LSTM.lua LSTMb.lua
    *** LSTM.lua    2015-08-28 13:58:57.940498721 -0700
    --- LSTMb.lua   2015-08-28 13:58:57.944500670 -0700
    ***************
    *** 1,6 ****
    
    ! local LSTM = {}
    ! function LSTM.lstm(input_size, rnn_size, n, dropout)
        dropout = dropout or 0
    
        -- there will be 2*n+1 inputs
    --- 1,34 ----
    + require 'nn'
    + --local AddControlBias = torch.class('nn.AddControlBias', 'nn.Add')
    + local AddControlBias,parent = torch.class('nn.AddControlBias', 'nn.Add')
    
    !
    ! function AddControlBias:__init(inputSize,scalar,initVal)
    !    parent.__init(self,inputSize,scalar)
    !    self.ival = initVal
    !    self.bias:fill(self.ival) --= torch.Tensor(size):fill(self.ival)
    ! end
    !
    !
    !
    !
    ! function SigmoidWithBias(input,setToOne)
    !       if setToOne == true then
    !               local addBias = nn.AddControlBias(4,true,1)(input)
    !               local sigunit = nn.Sigmoid()(addBias)
    !               return sigunit
    !       else
    !               local addBias = nn.Add(4,true)(input)
    !               local sigunit = nn.Sigmoid()(addBias)
    !               return sigunit
    !       end
    !
    ! end
    !
    !
    !
    ! local LSTMb = {}
    ! function LSTMb.lstm(input_size, rnn_size, n, dropout)
        dropout = dropout or 0
    
        -- there will be 2*n+1 inputs
    ***************
    *** 34,46 ****
          local reshaped = nn.Reshape(4, rnn_size)(all_input_sums)
          local n1, n2, n3, n4 = nn.SplitTable(2)(reshaped):split(4)
          -- decode the gates
    !     local in_gate = nn.Sigmoid()(n1)
    !     local forget_gate = nn.Sigmoid()(n2)
    !     local out_gate = nn.Sigmoid()(n3)
          -- decode the write inputs
    !     local in_transform = nn.Tanh()(n4)
          -- perform the LSTM update
    !     local next_c           = nn.CAddTable()({
              nn.CMulTable()({forget_gate, prev_c}),
              nn.CMulTable()({in_gate,     in_transform})
            })
    --- 62,75 ----
          local reshaped = nn.Reshape(4, rnn_size)(all_input_sums)
          local n1, n2, n3, n4 = nn.SplitTable(2)(reshaped):split(4)
          -- decode the gates
    !     local in_gate = SigmoidWithBias(n1,false) --nn.Sigmoid()(n1)
    !     local forget_gate = SigmoidWithBias(n2,true) -- nn.Sigmoid()(n2) --RMM
    !
    !     local out_gate =  SigmoidWithBias(n3,false) --nn.Sigmoid()(n3)
          -- decode the write inputs
    !     local in_transform = nn.Tanh()(nn.Add(4,true)(n4)) -- nn.Tanh()(n4)
          -- perform the LSTM update
    !     local next_c           = nn.CAddTable() ({
              nn.CMulTable()({forget_gate, prev_c}),
              nn.CMulTable()({in_gate,     in_transform})
            })
    ***************
    *** 61,65 ****
        return nn.gModule(inputs, outputs)
      end
    
    ! return LSTM
    
    --- 90,94 ----
        return nn.gModule(inputs, outputs)
      end
    
    ! return LSTMb
    Posted in: Custom Card Creation
  • 0

    posted a message on Generating Magic cards using deep, recurrent neural networks
    How complicated are the changes to make the training script use ADAM? I could possibly add that as an option for mtg-rnn.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from jml34 »
    @Hardcast I'm asking this before I reinvent the wheel on my side: I guess you'll want to be able to change you input format and still be able to get statistics and scripts (detect errors/boring cards) working too? But what will be your format for that?

    I'm taking a break from active development; don't expect me to put up anything new for a little while. Though I do have some big dumps coming out of the latest randomized field order network, I'll try to post MSE sets of those (and hopefully with the card similarity / creativity numbers enabled).

    The code is designed so that it's easy to change the format. For example, if you want to tweak the ordering of the fields, all you have to do is modify the array that controls what order they go in. As long as you're consistent within your code, it should be easy to reuse most of what's there with any variation of the format. If anybody out there is doing fun experiments based on mtgencode that they'd like to share, I'd happily merge pull requests to put tools or alternative formatters into 'scripts'. Some form of checker / validator should eventually live in there for sure.

    As for mtg-rnn, the customized batcher is feature complete as far as randomizing the training set in a nice way, but I haven't implemented one-card-at-a-time mode yet. That's anticipated to be very slow, so I don't really have much motivation to work on it until I feel like running code on my GPU for a solid week.

    I am also considering some more significant changes to the format concerning the way I handle card text, but again, I won't implement that until I have some dedicated time to test.

    EDIT:
    Quote from Talcos »
    Not yet, not as far as I know. However, thanks to maplesmall, we now can upload dumps of cards directly into MSE, and that makes it so much easier to construct sets by hand. I think it may be worthwhile for us to return to the topic once we can automate set construction entirely, instead of a semi-automated approach like I implemented. It's definitely do-able on the balancing and tweaking side of things, we just need theme construction, and there are several works out there that have tackled similar problems with varying degrees of success.

    I've been thinking about this lately - I'm intrigued by the possibility of a generate-filter-regenerate approach using multiple networks.

    The simplest approach would be to start with a maximally stable network for initial generation, probably one that doesn't include cardnames and uses whatever fixed field order we can get the most consistent cards out of. Then we filter out cards that we like to fill the set skeleton, and simply abuse the random field order network to name them with priming. If the filters were sufficiently good we could do other clever things like regenerate manacosts or types that the filter believed were inappropriate. Then all we need is some art Grin

    I'd love to write a driver that coordinates this across mtgencode and mtg-rnn. The biggest development roadblocks are need for design skeletons and effective filtering scripts.
    Posted in: Custom Card Creation
  • 0

    posted a message on Generating Magic cards using deep, recurrent neural networks
    Quote from jml34 »
    @Hardcast What you said made me want to try with a more fixed format, with a field for counter name for instance.
    What are your current training parameters? I thought my X problem was related to quotes but your results say otherwise. I'm curious what will happen when it's more trained.
    EDIT: just to be sure, your double quotes are all the plain ascii ones?


    Usually I use size 512, layers 3, seq_length 200, max_epochs 50, dropout 0.5. That dropout is unnecessarily large, probably. But it's what I'm used to using. On my GPU these nets usually train in a few hours; on a (very strong) CPU it takes about a day. So, this might be impractical if you don't have powerful hardware available.

    Parameters for the randomize fields run were exactly as follows (this was using mtg-rnn for those funny -randomize_mana and -randomize_fields options):
    th train.lua -gpuid -1 -rnn_size 768 -num_layers 3 -dropout 0.5 -seq_length 200 -batch_size 50 -max_epochs 100 -randomize_mana -randomize_fields -data_dir data/mtgencode-rfields -checkpoint_dir cv/rfields-768 -eval_val_every 2000 -seed 511996871

    Quote from jml34 »
    Almost forgot: how to use a separate validation.txt when you're shuffling all your input.txt between each epoch?
    Simple: train once on validation.txt, note training_loss, throw checkpoint away. It was so simple lol

    Well... Careful... validation runs on multiple batches, so to achieve the same thing you'd have to train for a whole epoch on your validation data and then average the losses across the batches. And even that would only be an approximation, as as soon as you've trained more than one batch, the later batches will have learned from the earlier ones. I also believe validation batches work very differently with dropout.

    And a note to Croxis, I did post a link to my rfields checkpoint if you want to make that an option. The net is big so it is a rather large file (180MB or so).

    EDIT:
    jml, if you want to do separate validation, the right way is to specify a split fraction that's all validation, then it will actually do the right thing for you. I don't have the code available to tell you the option you need to do this but it should be straightforward.
    Posted in: Custom Card Creation
  • 2

    posted a message on Generating Magic cards using deep, recurrent neural networks
    I've been training a slightly unusual network on my big Intel machine - size 768, layers 3, dropout 0.5, randomized field order and mana symbol order. This is the first big test of the batcher's ability to do data layout randomization in a reasonable way.

    As with previous experiments in randomizing field order, it's terrible at consistently producing valid cards - only around a third are completely correct in terms of having the right fields. But, a lot of them just have duplicated fields, and we can easily throw those away. I'm seeing some pretty interesting and creative things come out of it.


    akki peacewnight (uncommon)
    3W
    creature ~ illusion
    T: put a 2/2 green bear creature token onto the battlefield. it has "2R: this creature gets +1/+0 until end of turn."
    (3/1)
    # That's an... interesting... choice of colors. Notice that it remembered to put both quotes in the right place though.

    auriok kyren (common) _INVALID_
    2W
    creature ~ human knight
    protection from green
    at the beginning of your end step, if @ is in your graveyard, you may gain 1 life.
    (1/1)
    ~~
    (9) (cost) {1}{U}
    # It was unsure about the cost, lol. Apparently word2vec thinks the closest card to this is actually Ichorid.

    cold storage (uncommon)
    3WW
    enchantment ~ aura
    flash
    enchant creature
    enchanted creature gets +3/+3.
    when @ is put into a graveyard from the battlefield, return @ to its owner's hand.
    # It pilfered the name Cold Storage, but this is really a pretty cool take on Moldervine Cloak.

    lufilic warchief (uncommon)
    WW
    creature ~ cyclops
    @ can't be blocked by lands and can't be blocked.
    (5/6)
    # Doesn't this just look like a typical nn-generated card? Also, it seems the closes card here is Evil Eye of Orms-by-Gore.

    ambasmador (common)
    UU
    creature ~ human cleric
    kicker 5
    flying
    when @ enters the battlefield, if it was kicked, destroy target nonartifact samurai you control and @ mana enchanted this way.
    (2/3)
    # Working kicker! Not useful, and with a side order of word salad, but still.

    boggart spy (common)
    U
    creature ~ elemental
    countertype % fade
    fading 7
    remove a % counter from @: prevent the next 1 damage that would be dealt to target creature or player this turn.
    (1/1)
    # Holy crap, it got fading correct, with the right countertype and everything.

    clear the maetor (common) _INVALID_
    U
    creature ~ human soldier
    enchant creature
    enchanted creature has "{T}: but a 1/1 green saproling creature token onto the battlefield.
    if a nonland permanent with enchant creature is a creature, it gets +1/+1 and can't be blocked by creatures with flying."
    (1/1)
    ~~
    (7) (cost) {G}
    # This one is fascinating. Read very carefully. Yes, the type is off, and it spelled 'put' as 'but', but it obsessively closed the quote, so that the enchanted creature gains a multi-lined ability. I think that bit is correct, though no real card tries to do this.

    dredger (rare) _INVALID_
    {4}{U}
    creature ~ human wizard
    when @ enters the battlefield, creatures you control gain "when this creature dies, draw a card."
    (4/5)
    ~~
    (9) (rarity) N
    # And yet more quote closing, here for a very creative multiple creature cantrip. I can forgive the indecision over rarity.

    falver raven (rare) _INVALID_
    1U
    creature
    haste
    when @ enters the battlefield, draw two cards, then discard a card.
    G, T: copy target instant or sorcery spell. you may choose new targets for the copy.
    morph 1W
    (2/1)
    ~~
    (7) (types) ['creature']
    # It couldn't remember if it needed a type or a subtype. Fascinating but typical desing - complex, coherent, yet utterly nonsensical and very loose with the color pie.

    insriver strength _INVALID_
    7UU
    sorcery
    target creature gains flying until end of turn.
    cycling 4U
    ~~
    (2) (types) ['sorcery']
    # Bloody typical, ain't it.

    spellbreaker's malechain (uncommon) _INVALID_
    1U
    instant
    destroy target nonblack creature. it can't be regenerated.
    ~~
    (9) (cost) {2}{U}
    (7) (rarity) O
    # Also this.

    stonehorn (common)
    1U
    sorcery
    target creature gets -5/-5 until end of turn.
    # And this.

    spitting peace (common)
    1U
    instant
    target player discards four cards.
    # And also this. I'd play all of these. Instant speed discard 4 for 1? Apparently blue is the new black, but much better.

    crowd farcher (rare)
    2B
    creature ~ centaur
    B, sacrifice an aura: remove a +1/+1 counter from @: @ gains shadow until end of turn.
    (1/2)
    # Two colons... this ability's cost has a cost!

    inspired herd (common)
    4B
    creature ~ elemental
    @ can't be blocked by blue creatures.
    whenever @ attacks, sacrifice @ and it deals 1 damage to you.
    morph 1BB
    (7/4)
    # You have to declare it as an attacker, then turn it face up. And it even comes with limited evasion.

    srolling bubble (rare)
    2BBB
    legendary creature ~ spirit
    tromple
    (3/3)
    # Am I surprised?

    the augur (common)
    2R
    sorcery
    draw a card for each card in your hand.
    # Obviously there are several bad ideas going on here, the least of which is making it a common. And the most similar card is Demonic Collusion?

    disembowel
    4R
    instant
    draw a card for each color among permanents you control.
    # Also, this.

    stas cobra (common) _INVALID_
    1R
    sorcery
    draw a card for each instant or sorcery card in your graveyard.
    ~~
    (3) (cost) {3}{W}{W}
    # Even more impressive. And no it wouldn't have been any better in white.

    claurtrooming (rare) _INVALID_
    2RR
    instant
    you gain 7 life.
    ~~
    (8) (name) condraclation
    # The color issues are real.

    hatchet behemoth (rare)
    4RR
    creature ~ avatar
    kicker 2B
    when @ enters the battlefield, if it was kicked, target opponent puts X 1/1 white spirit creature tokens onto the battlefield.
    (5/5)
    # Another working kicker! It still messed up this X though.

    telepire's crush (uncommon) _INVALID_
    3R
    instant
    [choose one ~
    = destroy target artifact creature.
    = draw a card.]
    entwine 2
    ~~
    (6) (rarity) O
    # Hey look an entwine card!

    boggart plagues
    4G
    creature ~ zombie
    you may have @ enter the battlefield as a copy of any nonland permanent you control.
    (2/2)
    # Bizarre.

    charging sentry
    2G
    creature ~ human pirate
    whenever you cast a noncreature spell, you may return @ from your graveyard to the battlefield. activate this ability only once each turn.
    (3/1)
    # Also bizarre. Can the ability retain state to work in the way it's clearly intended to?

    dark's herd (uncommon) _INVALID_
    G
    sorcery
    target player reveals his or her hand. you choose a nonland card from it and exile them. then that player shuffles his or her library.
    draw a card.
    ~~
    (7) (types) ['instant']
    # I assume "them" refers to the card. Otherwise, I like it. Completely unfair and obviously the product of a neural net. If only it had been decisive about making it an instant.

    deathsraper legion (mythic rare)
    2GG
    creature ~ zombie drake
    intimidate
    1: @ becomes colorless until end of turn.
    (3/3)
    # Clever.

    kwardsory (uncommon)
    1G
    instant
    [choose one ~
    = destroy target enchantment.
    = target creature gains flying until end of turn.]
    # Another working choice card.

    thornscape aarhand _INVALID_
    2G
    creature
    when @ enters the battlefield, if it was kicked, put X 1/1 green saproling creature tokens onto the battlefield.
    (2/2)
    ~~
    (8) (name) sphinx's nelusal
    # Things don't always work out.

    traveling kard (uncommon) _INVALID_
    5G
    instant
    choose a color. target creature gets +3/+0 until end of turn.
    ~~
    (8) (cost) {2}{B}
    # Nope.

    infernal fire (uncommon)
    1(R/G)(R/G)
    sorcery
    draw X cards, then discard two cards.
    # Indeed not.

    advance spitter
    4
    artifact
    spells you cast cost 1 less to cast.
    T: add one mana of any color to your mana pool.
    # This, though, is pretty cool. I like all of it except the rarity.

    prince of malachite (rare)
    5
    artifact
    countertype % paye
    at the beginning of your upkeep, you may put a % counter on @.
    2, sacrifice @: add 1 to your mana pool for each % counter on @.
    # Working and creatively named counters.

    penforming (uncommon)
    1
    land
    players can't cast spells.
    # Well... Can you play lands with casting costs?

    temple ward _INVALID_
    _NOCOST_
    legendary land ~ beast
    2, T: prevent all combat damage that would be dealt this turn.
    ~~
    (8) (name) kitsune foundry
    # This also would be a bit borked.

    TL;DR: This network definitely has interesting properties. It's almost obsessively good at putting double quotes around granted abilities, and it has showed some promise with kicker, but I didn't see any correct usage of X, and it still has many shortcomings common to other networks.

    For the curious, the MSE set with all of the cards from my dump is here. As with all MSE sets, google drive thinks it's a zip file. You want to click the download at the top, rather than just pulling out the text file named "set".

    The checkpoint itself is here. The epoch number is misleading - it's 0.43 of 1.0, where 1.0 corresponds to epoch 100. So it's really epoch 43.

    This is the most fun I've had looking through card dumps in a while. A shout out to Maplesmall - doing it in MSE is very pleasant, much better than text.
    Posted in: Custom Card Creation
  • To post a comment, please or register a new account.