Quote from ryuhimora »Quote from Talcos »Was there something specific that you were hoping to see?
I was asking under the assumption that the network meant "if you win the game" I didn't even consider the Clash mechanic. Since that's the case, could you seed it with "If you win the game" instead?
Aha, I see. Here are some results:
Dungeon Shade
Creature - Shade Wizard (Uncommon)
Flying
Pay 4 life: Draw a card.
If you win the game, return Dungeon Shade to its owner's hand.
2/2
#Errata: Cards that you control but do not own become yours at the end of the game if you win. Dungeon Shade is an exception to the rule.
Angelic Savage
Creature - Human Barbarian Warrior
If you win the game, Angelic Savage can't be countered.
Level up
Level 3 (4/3): : target player draws a card for each tapped artifact creature you control.
2/2
#Also true. If the game state doesn't exist, it's impossible for Angelic Savage to be countered. Or played, for that matter, but that's besides the point.
Mistform Serpent
Creature - Serpent
Mistform Serpent can't attack unless defending player controls an Island.
If you win the game, destroy all permanents you control.
4/5
#Sweep the board clean! The game is over.
Down of Damnation
Enchantment (Rare)
At the beginning of your upkeep, if there are two or more instant and/or sorcery cards in your graveyard, you may search your library for a white card, reveal that card, and put it into your hand.
If you lose the game, Down of Damnation deals damage equal to its power to itself.
Soratami Crag
Land (Uncommon)
Sunburst (This enters the battlefield with a charge counter on it for each color of mana spent to cast it.)
At the beginning of each player's upkeep, Soratami Crag deals X damage to that player, where X is the number of charge counters on Soratami Crag.
If you lose the game, take an extra turn after the Bastlepie.
#No idea there. Interesting design though. Pity that it's slapped on a land, where does nothing.
Skirk Preventer
Creature - Human Soldier (Uncommon)
Skirk Preventer gets +1/+1 for each aura attached to it.
If you would lose the game, you may gain 1 life instead.
2/3
#Seems perfectly fair.
---
By the way, caffe seems to dislike me. All I wanted was a simple, feed-forward network, but it wants to stymie me for unusual reasons. There's a bit of a learning curve it seems. But I'll get past it.
EDIT: Solved the problem that I was having. The error message was just very cryptic.
EDIT: Training error is.. NaN. But hey, data is coming in and data is going out, so that's something. I'm getting closer.
2
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.
4
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.
2
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.
1
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.
6
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.
3
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.
1
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.
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.
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.
1
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.
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.
1
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:
And my cuda version: (apparently it's slightly out of date, the latest is 7.5 I believe)
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.
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.
1