Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: [1] 2 3 4  All

Author Topic: Letting a computer design Dominion cards: recurrent neural network edition  (Read 3577 times)

0 Members and 1 Guest are viewing this topic.

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 10277
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
  • Respect: +10573
    • View Profile
+42

Someone gave me a fully functional old IBM server machine for free, so I thought of a great use for that computer: training useless neural networks for the lulz. And so, here we are.

For the training data, I used all the Dominion cards and a bunch of fan cards whose wordings I deemed to be good (and were available as text that I could copy and paste). In practice, those fan cards were LastFootnote's Enterprise and a few random cards from other fan designers. Lastly, in order to strongly effect the data set, particularly in a destructive way, I added the entirety of Dominion: Gunpowder.

I'm still training the network some more, but in the meantime, here are some of the cards it has designed so far:

Presumably, I can reveal a Province from the Province pile


Depending on whether or not Boons are in the game, this could be worth 0 or 24


When am I allowed to play an Att?


The useless +buy aside, this is actually not that ridiculous


Whenever I play Sentry:


At least it counters Knights


It designed a totally OP Giraffe rip-off


I mean, this is actually a fairly reasonable card, just a bit weak compared to Altar


Festival too OP pls nerf


Appropriately for a Silver+, it costs $5


Combos with Watchtower


I like to think that 2xiply is some kind of a portmanteau of 2x and multiply
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The Twitch channel where I stream DominionThe YouTube channel where I make musicDownload my band's albums for free

weesh

  • Young Witch
  • ****
  • Offline Offline
  • Posts: 130
  • MOAR MAGPIES
  • Respect: +195
    • View Profile
0

i've never got the point of these.
is there some sort of feedback that eventually gets the computer to learn and make good cards?
or is this just going to create things that don't make sense forever like robo-rosewater does for magic cards?
Logged

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3266
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2478
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #2 on: February 01, 2018, 12:44:07 am »
0

i've never got the point of these.
is there some sort of feedback that eventually gets the computer to learn and make good cards?
or is this just going to create things that don't make sense forever like robo-rosewater does for magic cards?

I think that given a huge dataset (thousand or even millions of (good) cards), this could make good cards.  However, with such a small dataset, it will probably make bad cards with the occasional okay one until it starts copying real cards.
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2023
  • Respect: +2320
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #3 on: February 01, 2018, 12:49:50 am »
+1

It's almost always just for fun, and to see what machine learning can do. Sometimes it's interesting to inspect the model after it's trained to see what it's learned to care about.

I think there was a recent paper that learned how to generate Amazon reviews with positive or negative sentiment - you can imagine how some people might find that useful...
Logged
I have a blog! It's called Sorta Insightful. Check it out?

singletee

  • Jester
  • *****
  • Offline Offline
  • Posts: 823
  • Shuffle iT Username: singletee
  • Gold, Silver, Copper, Let's Jam!
  • Respect: +1338
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #4 on: February 01, 2018, 03:45:11 am »
+7

Appropriately, Fountie interacts with Aqueduct.

LuciferousPeridot

  • Bishop
  • ****
  • Offline Offline
  • Posts: 115
  • Respect: +186
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #5 on: February 01, 2018, 04:38:46 am »
+1

Advinchapers: that's a great word for when you opponent gets annoyed post match and desperately explains that they only lost because of an incidence of bad luck on their part/good luck on yours.
Logged

Aleimon Thimble

  • Minion
  • *****
  • Offline Offline
  • Posts: 610
  • Shuffle iT Username: Aleimon Thimble
  • Respect: +611
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #6 on: February 01, 2018, 04:52:14 am »
+1

You could describe 'Detler' as a handicapped Festival, but also as a handicapped Charm.

Does Archery just double all scores? That's so profoundly useless it's hilarious.
Logged

ipofanes

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1050
  • Respect: +464
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #7 on: February 01, 2018, 04:59:52 am »
+2

Advinchapers: that's a great word for when you opponent gets annoyed post match and desperately explains that they only lost because of an incidence of bad luck on their part/good luck on yours.

Someone should create a deckbuilder around the meaning of Liff.

Fun fact: Uwe Rosenberg once dreated a play-by-mail game around "The meaning of Liff", but it didn't take off. See https://boardgamegeek.com/thread/389150/meine-ersten-gehversuche-als-spieleerfinder (in German) around the middle of section 3.
Logged

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 10277
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
  • Respect: +10573
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #8 on: February 01, 2018, 06:18:27 am »
0

i've never got the point of these.
is there some sort of feedback that eventually gets the computer to learn and make good cards?
or is this just going to create things that don't make sense forever like robo-rosewater does for magic cards?

I think that given a huge dataset (thousand or even millions of (good) cards), this could make good cards.  However, with such a small dataset, it will probably make bad cards with the occasional okay one until it starts copying real cards.

Yeah, basically. The best case scenario that I'm hoping for is that there's a point at which it only or mostly creates legible cards that do actual things, but I don't think the cards are ever going to be balanced other than by coincidence.
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The Twitch channel where I stream DominionThe YouTube channel where I make musicDownload my band's albums for free

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 10277
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
  • Respect: +10573
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #9 on: February 01, 2018, 10:31:03 am »
0

If you want to contribute to the project, you can post your (or other people's) fan cards here to increase the size of my data set: https://docs.google.com/spreadsheets/d/1lm6WXWJioGeUW5x8kt8WKc-UwW4nht_DcOF3Nbw3qk0/edit?usp=sharing

I'll go through all the cards and manually fix them if there are errors in formatting, so don't hesitate to post cards — your mistake isn't going to break the thing. However, it makes it a lot easier for me if the cards follow this format:

 - Please use the format "Name|Types|Cost|Abilities".
 - Type all the abilities on a single line even if there would be a line break in a printed card (the machine interprets a line break as the start of a new card).
 - The notation for costs is $5 for five coins, $3P1 for three coins and one potion and $0D8 for zero coins and 8 debt.
 - A horizontal dividing line is represented by a forward slash.
 - Victory cards are "worth" the amount of VP on them, even in the case of e.g. Harem where the word "worth" wouldn't be on the actual card.
 - Treasure cards aren't "worth", they give a vanilla bonus of +$ the same way that Actions do.
 - For Landmarks, just leave the cost field empty.
 - Note that you have to start the abilities field with an apostrophe character if you don't want Google Docs to interpret your vanilla bonuses as an equation (which you don't).
 - On Google Docs, the text alignment in the cost field depends on whether or not it has any non-coin costs in it. This doesn't matter on my end so you don't have to worry about it, it just looks a bit silly.

There are a couple of official cards as examples in the doc.
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The Twitch channel where I stream DominionThe YouTube channel where I make musicDownload my band's albums for free

J Reggie

  • Minion
  • *****
  • Offline Offline
  • Posts: 620
  • Shuffle iT Username: J Reggie
  • Respect: +927
    • View Profile
    • Jeff Rosenthal Music
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #10 on: February 01, 2018, 10:47:24 am »
+1

How did you notate gunpowder? Also, do you have a link to all the results?

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 10277
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
  • Respect: +10573
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #11 on: February 01, 2018, 10:58:27 am »
0

How did you notate gunpowder? Also, do you have a link to all the results?

G1 and no, respectively. I guess I could just print out a long output into a .txt file and post that if people care, but most of it isn't legible yet.
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The Twitch channel where I stream DominionThe YouTube channel where I make musicDownload my band's albums for free

crj

  • Minion
  • *****
  • Offline Offline
  • Posts: 507
  • Respect: +604
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #12 on: February 01, 2018, 12:14:40 pm »
+4

I think that given a huge dataset (thousand or even millions of (good) cards), this could make good cards.
I doubt that.

If you really wanted a computer to make good Dominion cards rather than just amusing aberrations, you'd want to train it on:
  • Good cards
  • Bad cards
  • Good things that aren't (legal/sensical) cards
  • Bad things that aren't cards
There's no point letting it churn out cruft like an infinite number of monkeys until it happens to reinvent Smithy; you'd want it to come up with good stuff that's not currently in Dominion and "Dominionise" it.
Logged

Fuu

  • Navigator
  • ****
  • Offline Offline
  • Posts: 76
  • Shuffle iT Username: Fuu
  • Respect: +43
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #13 on: February 01, 2018, 01:01:25 pm »
+4

I really enjoyed these cards.

Batcon produces $2 more than Woodcutter, and costs $2 less. Presumably we have to assume that the "Att" card type is sufficiently less useful than an Action; maybe you can only play it when no-one else is paying attention. Maybe you can only play it at Batcon.

I think that given a huge dataset (thousand or even millions of (good) cards), this could make good cards.
I doubt that.

If you really wanted a computer to make good Dominion cards rather than just amusing aberrations, you'd want to train it on:
  • Good cards
  • Bad cards
  • Good things that aren't (legal/sensical) cards
  • Bad things that aren't cards
There's no point letting it churn out cruft like an infinite number of monkeys until it happens to reinvent Smithy; you'd want it to come up with good stuff that's not currently in Dominion and "Dominionise" it.

Yes, very much this. Even with a huge set of good cards, you're still only training on good cards. Everything the model has seen at the moment is a positive example, it needs to be able to differentiate between good and bad, and yes probably also between cards and non-cards.
Logged

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 10277
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
  • Respect: +10573
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #14 on: February 01, 2018, 03:02:09 pm »
+8

Here's what it's doing now: https://github.com/Awaclus/dominioncards/blob/master/outputcards.txt (this may look like surprisingly nonsensical compared to the cards you've seen, but this is actually way better than the average card from when I cherry picked the ones in the OP)

Some highlights:
Gords
Action–Duration–Duration|$2
+1 Action. Look at the top 5 cards of your deck, discard two cards for +2 Cards.

Avaze
Victory|$9
Worth 2 Silvers piles.
---
When another player may stantif or morder.

Goble Castle
Start
Action–Resede;
+$1.
---
When you discard this from play, when another player plays an Action card, you may first reveal that card. You play an Action card; discards the revealed.

Craverrow
Action|$4
You may play it.

Fernayman
Action|$2
+1 Buy.
+$3.
---
When you discard this from play, it, and it to gain a Silver.

Cablang Village
Event|$2
+1 Card.
+2 Actions.
---
At the start of your next turn:.

Engelm
Action|$4
+1 Action.
Choose one; you get the Supply.)

Echip
Action–Duration|$2
+e Cards.
+1 Action.

Plonager
Action|$4
Reveal the top card of your deck (instead; you may reveal a Copper from your hand and discard them or first discard your turn, they gain a Supply pile. Each other player discards differing the mat.

Corpermom
Action|$5
+1 Card.
+1 Action.
You may discard an Action card.
This is the top half of the Settlers/Bustling Cistomels.

Peanate
Event|$7
Gain a card costing up to $3; your Capter.

Tradind
Action–Attack|$5
Turn your deck and discard the rest.

Spocitifper
Action|$3
+1 Action.
+1 Buy.
+$1.
---
This is gained onto your hand.

Smagrmithress
Action–Attack–Knight–Duration|$3
+1 Action.
+1 Buy.
Trash a card from your hand, and deck.
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The Twitch channel where I stream DominionThe YouTube channel where I make musicDownload my band's albums for free

ThetaSigma12

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1476
  • Shuffle iT Username: ThetaSigma12
  • Respect: +1481
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #15 on: February 01, 2018, 03:16:02 pm »
0

It seems like the results could be improved if it had a spell checker and it didn't output any words that are misspelt or nonsense.
Logged
If you have a fan card you want to be created, just post about it here! I'd love to take a look at it.

Commodore Chuckles

  • Moneylender
  • ****
  • Offline Offline
  • Posts: 173
  • Shuffle iT Username: Commodore Chuckles
  • Respect: +357
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #16 on: February 01, 2018, 03:25:10 pm »
+3

Cablang Village
Event|$2
+1 Card.
+2 Actions.
---
At the start of your next turn:.

Interesting. Is this the machine realizing that villages usually say "+1 card, +2 actions"?
Logged

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 10277
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
  • Respect: +10573
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #17 on: February 01, 2018, 03:28:53 pm »
+3

Cablang Village
Event|$2
+1 Card.
+2 Actions.
---
At the start of your next turn:.

Interesting. Is this the machine realizing that villages usually say "+1 card, +2 actions"?

Possibly, but I think it should realize that they aren't Events first. It already figured out that Landmarks often say "When scoring" though.
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The Twitch channel where I stream DominionThe YouTube channel where I make musicDownload my band's albums for free

Eran of Arcadia

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 235
  • Respect: +411
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #18 on: February 01, 2018, 03:36:00 pm »
0

Craverrow
Action|$4
You may play it.

This one is OP.
Logged

AJD

  • Margrave
  • *****
  • Online Online
  • Posts: 2815
  • Shuffle iT Username: AJD
  • Respect: +3372
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #19 on: February 01, 2018, 03:46:24 pm »
+14

Echip
Action–Duration|$2
+e Cards.
+1 Action.

Strictly better than Laboratory
Logged

LuciferousPeridot

  • Bishop
  • ****
  • Offline Offline
  • Posts: 115
  • Respect: +186
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #20 on: February 01, 2018, 03:53:44 pm »
+5

It seems like the results could be improved if it had a spell checker and it didn't output any words that are misspelt or nonsense.

No way! That's my favourite part: Engelm (to wipe your nose on your sleeve) and Plonager (a seller of bad French wine to non-natives)
Logged

GendoIkari

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6557
  • Respect: +7234
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #21 on: February 01, 2018, 04:05:38 pm »
0

So my very limited knowledge of neural networks tells me that each generation has some sort of criteria for determining if it's good or not. Like, MarI/O looks at how far horizontally it reached; and the farther, the better.

What sort of criteria is this using to determine how "good" a particular random card is?
Logged
Check out my F.DS extension for Chrome! Card links; Dominion icons, and maybe more! http://forum.dominionstrategy.com/index.php?topic=13363.0

Thread for Firefox version:
http://forum.dominionstrategy.com/index.php?topic=16305.0

Chappy7

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 204
  • Shuffle iT Username: Chappy7
  • Respect: +257
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #22 on: February 01, 2018, 04:13:37 pm »
+6

Engelm makes all those Empty the supply puzzles a lot easier.  I think I'd open with that card
Logged

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 10277
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
  • Respect: +10573
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #23 on: February 01, 2018, 04:40:04 pm »
+1

So my very limited knowledge of neural networks tells me that each generation has some sort of criteria for determining if it's good or not. Like, MarI/O looks at how far horizontally it reached; and the farther, the better.

What sort of criteria is this using to determine how "good" a particular random card is?

To my understanding, what it does is it uses 90% of the data set as the learning set and 10% as the validation set. Then it tries to predict the values in the validation set based on the learning set, and measures the inconsistency between the predicted values and the actual values and tries to minimize that. When I'm having it generate these cards, it does it by trying to predict things from nothingness, although I could give it an initial string and have it try to predict how it continues.
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The Twitch channel where I stream DominionThe YouTube channel where I make musicDownload my band's albums for free

GendoIkari

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6557
  • Respect: +7234
    • View Profile
Re: Letting a computer design Dominion cards: recurrent neural network edition
« Reply #24 on: February 01, 2018, 04:40:19 pm »
+4

Engelm makes all those Empty the supply puzzles a lot easier.  I think I'd open with that card

Nah. By itself that takes 3 turns to empty the supply... we're way beyond that now.
Logged
Check out my F.DS extension for Chrome! Card links; Dominion icons, and maybe more! http://forum.dominionstrategy.com/index.php?topic=13363.0

Thread for Firefox version:
http://forum.dominionstrategy.com/index.php?topic=16305.0
Pages: [1] 2 3 4  All
 

Page created in 0.124 seconds with 20 queries.