Dominion Strategy Forum

Dominion => Dominion General Discussion => Topic started by: Awaclus on January 31, 2018, 09:41:05 pm

Title: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on January 31, 2018, 09:41:05 pm
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
(http://i8.aijaa.com/b/00191/14518014.jpg)

Depending on whether or not Boons are in the game, this could be worth 0 or 24
(http://i9.aijaa.com/b/00005/14518013.jpg)

When am I allowed to play an Att?
(http://i4.aijaa.com/b/00823/14518011.jpg)

The useless +buy aside, this is actually not that ridiculous
(http://i7.aijaa.com/b/00370/14518010.jpg)

Whenever I play Sentry:
(http://i5.aijaa.com/b/00555/14518009.jpg)

At least it counters Knights
(http://i3.aijaa.com/b/00954/14518008.jpg)

It designed a totally OP Giraffe (http://forum.dominionstrategy.com/index.php?topic=13415.msg499277#msg499277) rip-off
(http://i10.aijaa.com/b/00799/14518007.jpg)

I mean, this is actually a fairly reasonable card, just a bit weak compared to Altar
(http://i10.aijaa.com/b/00942/14518006.jpg)

Festival too OP pls nerf
(http://i1.aijaa.com/b/00787/14518005.jpg)

Appropriately for a Silver+, it costs $5
(http://i5.aijaa.com/b/00634/14518004.jpg)

Combos with Watchtower
(http://i10.aijaa.com/b/00611/14518003.jpg)

I like to think that 2xiply is some kind of a portmanteau of 2x and multiply
(http://i6.aijaa.com/b/00714/14518002.jpg)
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: weesh on January 31, 2018, 10:42:52 pm
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?
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: sudgy on February 01, 2018, 12:44:07 am
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.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Titandrake on February 01, 2018, 12:49:50 am
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...
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: singletee on February 01, 2018, 03:45:11 am
Appropriately, Fountie interacts with Aqueduct.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: LuciferousPeridot on February 01, 2018, 04:38:46 am
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.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Aleimon Thimble on February 01, 2018, 04:52:14 am
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.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: ipofanes on February 01, 2018, 04:59:52 am
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.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 01, 2018, 06:18:27 am
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.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 01, 2018, 10:31:03 am
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.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: J Reggie on February 01, 2018, 10:47:24 am
How did you notate gunpowder? Also, do you have a link to all the results?
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 01, 2018, 10:58:27 am
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.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: crj on February 01, 2018, 12:14:40 pm
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:
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.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Fuu on February 01, 2018, 01:01:25 pm
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.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 01, 2018, 03:02:09 pm
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.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: ThetaSigma12 on February 01, 2018, 03:16:02 pm
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.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Commodore Chuckles on February 01, 2018, 03:25:10 pm
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"?
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 01, 2018, 03:28:53 pm
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.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Eran of Arcadia on February 01, 2018, 03:36:00 pm
Craverrow
Action|$4
You may play it.

This one is OP.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: AJD on February 01, 2018, 03:46:24 pm
Echip
Action–Duration|$2
+e Cards.
+1 Action.

Strictly better than Laboratory
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: LuciferousPeridot on February 01, 2018, 03:53:44 pm
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)
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: GendoIkari on February 01, 2018, 04:05:38 pm
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?
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Chappy7 on February 01, 2018, 04:13:37 pm
Engelm makes all those Empty the supply puzzles a lot easier.  I think I'd open with that card
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 01, 2018, 04:40:04 pm
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.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: GendoIkari on February 01, 2018, 04:40:19 pm
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.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: GendoIkari on February 01, 2018, 04:41:13 pm
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.

It seems like after enough generations that would just end up with it creating only exact copies of existing cards; without any variance or differences at all.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Cuzz on February 01, 2018, 04:44:48 pm
Echip actually sounds like a card that an android would come up with for fun. 
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: King Leon on February 01, 2018, 04:48:48 pm
I also tried my luck. I am still training the machine. Some first results:

Ruined Square
Types: Event
Cost: $4
Once per turn: Turn your turns, but not less than $0.

Farming
Types: Action
Cost: $0*
Gain a Spoils from the top of your deck.
Setup: Put a token on that pile.

Dame Gains
Types: Action - Attack - Knight
Cost: $5
While this is in play, you may put it on top.
Reveal the top card of your deck; or gain a Duchy, putting it on top of your next turn: +1 Coin per differently named Treasure Map from your hand that is not a Treasure card from your hand.
Each other player reveals the top 2 cards of their deck, trashes one of them costing from $3 to $6, and discards the rest. If a Knight is trashed by this, trash this.

Spice Traders
Types: Action
Cost: $5
+4 Cards
When you buy or play this, each other player gains a Province card from your hand.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 01, 2018, 04:53:07 pm
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.

It seems like after enough generations that would just end up with it creating only exact copies of existing cards; without any variance or differences at all.

True.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Erick648 on February 01, 2018, 04:55:55 pm
Dame Gains
Types: Action - Attack - Knight
Cost: $5
While this is in play, you may put it on top.
Reveal the top card of your deck; or gain a Duchy, putting it on top of your next turn: +1 Coin per differently named Treasure Map from your hand that is not a Treasure card from your hand.
Each other player reveals the top 2 cards of their deck, trashes one of them costing from $3 to $6, and discards the rest. If a Knight is trashed by this, trash this.
Funny that it came up with a slang term for an actual card (Dame Natalie).  And this one is a gainer, too.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: aku_chi on February 01, 2018, 05:07:10 pm
Spice Traders
Types: Action
Cost: $5
+4 Cards
When you buy or play this, each other player gains a Province card from your hand.

This card actually has a reasonable power level.  It would have to be wordsmithed to something like: "When you buy or play this, reveal your hand.  Each other player gains a Province card if you revealed a Province.".  It makes the penalty slightly less painful, but you're pretty much never going to buy or play this with a Province in hand anyway.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: King Leon on February 01, 2018, 05:10:19 pm
I am starting to get actually weird cards.

Horse
Types: Action - Duration
Cost: <8>
Now and at the start of your next turn: Gain a Treasure.
While this is in play, when another player takes his -1 Coin token, he gains a Curse and trash this card.

Counting Market
Types: Action
Cost: $4
You may reveal an Action card from your hand. If you do, discard it or trash up to 4 cards from your hand.
+$2
+1 Buy

Ill-Gotten of Mystic
Types: Treasure
Cost: $2
Reveal your hand. -1 $ per differently named card revealed. If this is the first time you played a Fool's Gold this turn, this is worth $1, otherwise it's worth $4.


Edit: The last batch of interesting cards, before I am going to bed.

Maker
Types: Action
Cost: $4
+1 Card, +2 Actions
Discard a card.
Each player may reveal a Treasure. Discard the other cards. Play that Treasure.

Lost
Types: Action
Cost: $2
+$2
When you discard this from play, gain a Curse card per Embargo token on that pile.

Hunter
Types: Action - Attack
Cost: $4
You can't buy this if you have at least 2 Coins unspent, you may discard this. If you do, +1 Card per card in your hand. Gain a card costing up to $3 more than it.
+1 Card, +2 Actions
Each other player gains a Province. You may trash this card. If you do, gain a Duchy. Put that card into your hand.
You may trash a card from your hand other than a Rats (or reveal a hand of all Rats).


I am rejecting all cards whose names conflict with existing cards. And I got so many Markets and Mines ...
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: crj on February 01, 2018, 08:34:09 pm
+1 Coin per differently named Treasure Map from your hand that is not a Treasure card from your hand.
Although actually simpler than it sounds, that would produce so many rules questions!
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: sudgy on February 01, 2018, 10:02:26 pm
Counting Market
Types: Action
Cost: $4
You may reveal an Action card from your hand. If you do, discard it or trash up to 4 cards from your hand.
+$2
+1 Buy

This is actually an interesting concept.  You can only trash if you have an action in your hand.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Jack Rudd on February 02, 2018, 06:11:04 am
Counting Market is certainly workable as an idea, although "up to 4" is probably too strong. Trashing a card from your hand would probably be about right.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 02, 2018, 07:50:39 am
This is what I got this morning (in addition to a lot of nonsense):

Acbisur toker
(http://wiki.dominionstrategy.com/images/thumb/7/7d/Coin5.png/16px-Coin5.png) Action
Gain a Treasure.

Small Mastle
(http://wiki.dominionstrategy.com/images/thumb/5/5d/Coin0.png/16px-Coin0.png) Victory - Ruins
Worth 1 (http://wiki.dominionstrategy.com/images/thumb/9/92/VP.png/16px-VP.png)

Dimaged Lar
(http://wiki.dominionstrategy.com/images/thumb/7/7d/Coin5.png/16px-Coin5.png) Action - Attack
You may trash up to 5 cards from your hand.

Noniager
(http://wiki.dominionstrategy.com/images/thumb/b/bc/Coin7.png/16px-Coin7.png) Action
Gain a Curse.

Heralobles
(http://wiki.dominionstrategy.com/images/thumb/7/7d/Coin5.png/16px-Coin5.png) Action
+(http://wiki.dominionstrategy.com/images/thumb/3/3d/Coin2.png/16px-Coin2.png)
Reveal this onto your deck.

Rocard
Landmark
When scoring, -5(http://wiki.dominionstrategy.com/images/thumb/9/92/VP.png/16px-VP.png) per copy card in hand.

Missint
(http://wiki.dominionstrategy.com/images/thumb/7/7d/Coin5.png/16px-Coin5.png) Action - Attack
Gain a Silver. Discard the rest.
(This is not in the Supply.)

Squires
(http://wiki.dominionstrategy.com/images/thumb/3/32/Coin3.png/16px-Coin3.png) Action
Now and at the start of your next turn: +3 Cards, take 2 Copper.

Dame Trader
(http://wiki.dominionstrategy.com/images/thumb/7/7d/Coin5.png/16px-Coin5.png) Action - Hooter
+3 Cards.
+1 Action.
Name a card.
___________
When you discard this from play, you may trash hand.

Soother
(http://wiki.dominionstrategy.com/images/thumb/3/32/Coin3.png/16px-Coin3.png) Action
+1 Buy.
+(http://wiki.dominionstrategy.com/images/thumb/6/6f/Coin6.png/16px-Coin6.png)

Contrabitarin
(http://wiki.dominionstrategy.com/images/thumb/7/7d/Coin5.png/16px-Coin5.png) Action - Attack - Knight
+1 Buy.
Each other player draws a card from your hand.

Cangler
(http://wiki.dominionstrategy.com/images/thumb/2/2a/Coin4.png/16px-Coin4.png)(http://wiki.dominionstrategy.com/images/thumb/7/7a/Potion.png/9px-Potion.png)(http://wiki.dominionstrategy.com/images/thumb/7/7a/Potion.png/9px-Potion.png)(http://wiki.dominionstrategy.com/images/thumb/7/7a/Potion.png/9px-Potion.png)(http://wiki.dominionstrategy.com/images/thumb/7/7a/Potion.png/9px-Potion.png)(http://wiki.dominionstrategy.com/images/thumb/7/7a/Potion.png/9px-Potion.png)(http://wiki.dominionstrategy.com/images/thumb/7/7a/Potion.png/9px-Potion.png)(http://wiki.dominionstrategy.com/images/thumb/7/7a/Potion.png/9px-Potion.png)(http://wiki.dominionstrategy.com/images/thumb/7/7a/Potion.png/9px-Potion.png)(http://wiki.dominionstrategy.com/images/thumb/7/7a/Potion.png/9px-Potion.png)(http://wiki.dominionstrategy.com/images/thumb/7/7a/Potion.png/9px-Potion.png)(http://wiki.dominionstrategy.com/images/thumb/7/7a/Potion.png/9px-Potion.png) Action
+1 Card.
+1 Action.
Discard 2 cards.
_________
When you gain this, it.

Vagp
(http://wiki.dominionstrategy.com/images/thumb/2/2a/Coin4.png/16px-Coin4.png) Event
Gain a card from their hand onto your deck.

I also got cards named "Bleach" and "Furry", respectively, as well as a card with the pretty interesting type "Action-Attack-Knitchooser" but they were otherwise illegible cards.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: NoMoreFun on February 02, 2018, 08:47:52 am
What would the neural network pop out if you fed it all the card images (including text)
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 02, 2018, 09:35:37 am
What would the neural network pop out if you fed it all the card images (including text)

I would have to look into that. The current implementation I have running only knows what to do with text.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Chappy7 on February 02, 2018, 10:52:34 am
Action-Hooter  :o  Hahaha
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: J Reggie on February 02, 2018, 12:44:55 pm
Noniager too OP.

And that's quite the cost on Cangler.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Commodore Chuckles on February 02, 2018, 02:25:38 pm
Action-Hooter  :o  Hahaha

That must be where Dame Trader works.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: King Leon on February 03, 2018, 06:37:40 am
Acbisur toker
(http://wiki.dominionstrategy.com/images/thumb/7/7d/Coin5.png/16px-Coin5.png) Action
Gain a Treasure.

Small Mastle
(http://wiki.dominionstrategy.com/images/thumb/5/5d/Coin0.png/16px-Coin0.png) Victory - Ruins
Worth 1 (http://wiki.dominionstrategy.com/images/thumb/9/92/VP.png/16px-VP.png)

These are actually not bad. However, Small Mastle is too similar to Estate and in most cases better than Ruined Village, but still a nice Ruins. Maybe it should just give ½ VP.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 03, 2018, 06:46:57 am
Now it managed to design a card which is actually fairly interesting and balanced (by coincidence, certainly not because it has learned how to do that now):

Fambl
(http://wiki.dominionstrategy.com/images/thumb/2/2a/Coin4.png/16px-Coin4.png) Action
Draw until you have 6 cards in hand.
__________
While this is in play, cards cost (http://wiki.dominionstrategy.com/images/thumb/f/f7/Coin1.png/16px-Coin1.png) less, but not less than (http://wiki.dominionstrategy.com/images/thumb/5/5d/Coin0.png/16px-Coin0.png).
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 03, 2018, 09:20:37 am
These are actually not bad. However, Small Mastle is too similar to Estate and in most cases better than Ruined Village, but still a nice Ruins. Maybe it should just give ½ VP.

Well, all the Ruins are better than Ruined Village, and usually it's not a trivial decision whether you want to trash an Estate or a Ruins that actually does something. It's not very exciting but it would be fine, I think.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Schneau on February 03, 2018, 09:34:07 am
Squires
(http://wiki.dominionstrategy.com/images/thumb/3/32/Coin3.png/16px-Coin3.png) Action
Now and at the start of your next turn: +3 Cards, take 2 Copper.

Maybe it's just in comparison to these other cards, but this doesn't seem like a half bad idea, if you interpret the end to mean "gain 2 Coppers".
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: crj on February 03, 2018, 10:50:59 am
I pondered that.

Then I realised, even if it flooded your deck with Copper, it's still a $3-cost giving +$3 this turn and next. Buying just those and Provinces might be hard to beat!
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Philipp on February 03, 2018, 12:38:06 pm
Maybe another approach to machine learning created cards could be this: the AI understands the rules of Dominion and can play against itself, having been trained to play good. It then throws random newly designed rule cards into the mix, but making sure that rule card doesn't randomly already exist in Dominion, and then plays another million rounds with those against itself. It thus now incorporated the new card into its training data. Now we check if the new random card turns out to be bought a much higher or lesser amount of time than any other, i.e. if it is completely over or underpowered. If neither of those, it may be potentially a new interesting card. Or it may end up being boring because it's not a truly new type of rule ;)
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: crj on February 03, 2018, 01:17:50 pm
I don't think that would bring much to the table in practice.

Firstly, as we've discovered, even constructing meaningful cards is difficult. Secondly, as we've discovered, making a computer play Dominion well is difficult. It's not easy to be in a position to have a computer design cards and playtest them.

But more importantly, making cards that are legal and balanced is only part of the battle. Cards also have to be different, and interesting, and fun. Ideally, they're also thematic, and introduce entirely new game mechanics.

Without those considerations, we'd be flooded with new card ideas like "Blacksmith: Action $4. +3 Cards. Discard the top card of your deck." or "Boring Village: Action $3. +1 Card. +2 Actions. Each other player may gain a Curse." They're not existing cards but, I mean, really... (-8

There are a lot of other really disruptive skills computers are going to acquire long before one can take the rules PDF for the Dominion base set, churn for an hour and spit out something as fun, innovative and high quality as the Adventures expansion. Donald X. has rather more job security than doctors and airline pilots.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Philipp on February 03, 2018, 04:46:27 pm
Secondly, as we've discovered, making a computer play Dominion well is difficult.

That's what they said about Go too, then Google DeepMind came along ;)

In all seriousness though, self-training neural networks can be extremely effective in coming up with strategies. But as you say, and as I said in my comment also, this would not necessarily translate to interesting cards. That too will one day be possible -- just simulate a human brain digitally, and you have all the ingredients to have the neural network measure every card for how stimulating it is! -- but by that time, we're happy if our AI overlords still keep us around in the first place (if how humanity treats less intelligent species is any indicator, we better learn to be cute and cuddly, as surely we want to go the way of cats and dogs instead of pigs and cows!).
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: J Reggie on February 03, 2018, 05:01:50 pm
We should petition the Google DeepMind team to make the bot for Shuffleit!
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Kirian on February 03, 2018, 05:13:50 pm
Echip
Action–Duration|$2
+e Cards.
+1 Action.

Strictly better than Laboratory

But requires you to destroy some cards *and* make good estimates of what 0.718 of a card is.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 03, 2018, 05:49:46 pm
I don't think that would bring much to the table in practice.

Firstly, as we've discovered, even constructing meaningful cards is difficult. Secondly, as we've discovered, making a computer play Dominion well is difficult. It's not easy to be in a position to have a computer design cards and playtest them.

Well, that might not be the case. What we're doing right now is trying to construct meaningful cards from a scratch in human language, character by character, which we have known is a bad idea since day one (http://forum.dominionstrategy.com/index.php?topic=13415.msg499261#msg499261), and we have expectably discovered that it's difficult. The computer could be doing something exponentially more efficient, for example if it knew and understood the rules and mechanics of Dominion to begin with.

Making a computer play Dominion well is a very nuanced problem, because what qualifies as "playing Dominion well" highly depends on what you're trying to achieve. When you're saying that we've discovered that making a computer play Dominion well is difficult, I think you're referring to the Goko and Shuffle iT bots, and possibly things like Geronimoo's sim and Dominiate. However, both simulators and Dominion Online bots have certain very ambitious goals that our hypothetical AI doesn't need, because we're actually fine if the bot just plays a reasonably small number (a few dozen, maybe a few hundred if we're greedy) of arbitrary kingdoms really well. And we have, in fact, discovered that that's possible and successfully used that to evaluate the power level of cards (https://graphics.stanford.edu/~mdfisher/DominionAI.html#EvaluatingNewCards).

What Philipp is suggesting doesn't sound ridiculous to me. It's just that you can't simply throw a 2009 IBM server machine at the problem and expect it to solve it by itself.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: crj on February 03, 2018, 06:23:46 pm
What Philipp is suggesting doesn't sound ridiculous to me. It's just that you can't simply throw a 2009 IBM server machine at the problem and expect it to solve it by itself.
Conversely, I can easily write this Python program:
Code: [Select]
print """
Rats
Action, cost $4

+1 Card
+1 Action
Gain a Rats. Trash a card from your hand other than a Rats (or reveal a hand of all Rats).
_
When you trash this, +1 Card."""
So now I've written a computer program that produces good Dominion cards.

Right?

To put it another way, there is an important distinction between machine learning, and encapsulating human learning in a computer program. There's a grey area between the two, but it does feel more legitimate to train a neural network on example cards and non-cards, rather than hand-hold it with "the rules and mechanics of Dominion to begin with".
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 03, 2018, 09:12:21 pm
To put it another way, there is an important distinction between machine learning, and encapsulating human learning in a computer program. There's a grey area between the two, but it does feel more legitimate to train a neural network on example cards and non-cards, rather than hand-hold it with "the rules and mechanics of Dominion to begin with".

It's not human learning, it's not even on the grey area. The machine has to recognize something to begin with, otherwise there's no way it can learn anything. Right now, the thing it recognizes is individual characters in a text file. If it recognized Dominion mechanics instead, that would be the same thing except a lot less stupid.

Really, the problem with the current implementation is that the vast majority of stuff it creates is like this (actual thing it created):

Sile Gail Haons ona
(http://wiki.dominionstrategy.com/images/thumb/d/d4/Debt8.png/18px-Debt8.png) Action
Each other player reveals cards from the top of choosese. Gain a Treasure card up to 3 Duchose.

There are so many things the machine had to learn in order to come this far. It had to learn how to spell all those English words. It had to learn that cards have a name, a type, a cost, an ability, and a line break to signify that the card is over and a new card is about to start. It had to learn that (http://wiki.dominionstrategy.com/images/thumb/d/d4/Debt8.png/18px-Debt8.png) is a cost. It had to learn that "Action" is a type. It had to learn that Treasure cards can be gained, and that revealing cards from the top is something that each other player can do. However, this card is completely useless, it doesn't even mean anything. The machine doesn't even get to the point where it can combine Dominion mechanics because it still fails the point at which it's supposed to combine individual characters to spell words correctly and form coherent sentences.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: faust on February 04, 2018, 01:58:41 am
Secondly, as we've discovered, making a computer play Dominion well is difficult.

That's what they said about Go too, then Google DeepMind came along ;)

Are you suggesting that creating Google DeepMind was not a difficult task?
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: GendoIkari on February 04, 2018, 08:51:56 am
To put it another way, there is an important distinction between machine learning, and encapsulating human learning in a computer program. There's a grey area between the two, but it does feel more legitimate to train a neural network on example cards and non-cards, rather than hand-hold it with "the rules and mechanics of Dominion to begin with".

It's not human learning, it's not even on the grey area. The machine has to recognize something to begin with, otherwise there's no way it can learn anything. Right now, the thing it recognizes is individual characters in a text file. If it recognized Dominion mechanics instead, that would be the same thing except a lot less stupid.

Really, the problem with the current implementation is that the vast majority of stuff it creates is like this (actual thing it created):

Sile Gail Haons ona
(http://wiki.dominionstrategy.com/images/thumb/d/d4/Debt8.png/18px-Debt8.png) Action
Each other player reveals cards from the top of choosese. Gain a Treasure card up to 3 Duchose.

There are so many things the machine had to learn in order to come this far. It had to learn how to spell all those English words. It had to learn that cards have a name, a type, a cost, an ability, and a line break to signify that the card is over and a new card is about to start. It had to learn that (http://wiki.dominionstrategy.com/images/thumb/d/d4/Debt8.png/18px-Debt8.png) is a cost. It had to learn that "Action" is a type. It had to learn that Treasure cards can be gained, and that revealing cards from the top is something that each other player can do. However, this card is completely useless, it doesn't even mean anything. The machine doesn't even get to the point where it can combine Dominion mechanics because it still fails the point at which it's supposed to combine individual characters to spell words correctly and form coherent sentences.

Actually one of the main weaknesses with all of these cards is that the machine did not ever learn most of the things you just said. It doesn’t know that action is a type. It just knows that a lot of real cards put the word “action” on the second line of text. It doesn’t know that that icon is a cost; it just knows that some real cards put that icon on the second line. It doesn’t know that treasure cards can be gained; it just knows that “gain a treasure” is a set of words that sometimes appear together in that order. It never learned what any of those things actually mean.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 04, 2018, 09:39:37 am
To put it another way, there is an important distinction between machine learning, and encapsulating human learning in a computer program. There's a grey area between the two, but it does feel more legitimate to train a neural network on example cards and non-cards, rather than hand-hold it with "the rules and mechanics of Dominion to begin with".

It's not human learning, it's not even on the grey area. The machine has to recognize something to begin with, otherwise there's no way it can learn anything. Right now, the thing it recognizes is individual characters in a text file. If it recognized Dominion mechanics instead, that would be the same thing except a lot less stupid.

Really, the problem with the current implementation is that the vast majority of stuff it creates is like this (actual thing it created):

Sile Gail Haons ona
(http://wiki.dominionstrategy.com/images/thumb/d/d4/Debt8.png/18px-Debt8.png) Action
Each other player reveals cards from the top of choosese. Gain a Treasure card up to 3 Duchose.

There are so many things the machine had to learn in order to come this far. It had to learn how to spell all those English words. It had to learn that cards have a name, a type, a cost, an ability, and a line break to signify that the card is over and a new card is about to start. It had to learn that (http://wiki.dominionstrategy.com/images/thumb/d/d4/Debt8.png/18px-Debt8.png) is a cost. It had to learn that "Action" is a type. It had to learn that Treasure cards can be gained, and that revealing cards from the top is something that each other player can do. However, this card is completely useless, it doesn't even mean anything. The machine doesn't even get to the point where it can combine Dominion mechanics because it still fails the point at which it's supposed to combine individual characters to spell words correctly and form coherent sentences.

Actually one of the main weaknesses with all of these cards is that the machine did not ever learn most of the things you just said. It doesn’t know that action is a type. It just knows that a lot of real cards put the word “action” on the second line of text. It doesn’t know that that icon is a cost; it just knows that some real cards put that icon on the second line. It doesn’t know that treasure cards can be gained; it just knows that “gain a treasure” is a set of words that sometimes appear together in that order. It never learned what any of those things actually mean.

Well, it hasn't learned anything at all. It doesn't have any idea what it's doing, it's just a non-sentient machine. Its efforts only become "knowledge" or "learning" when we interpret them in the light of what we know and understand. If it evolves to put the characters "A", "c", "t", "i", "o" and "n" in that order in the slot where real cards have a card type, we know that it means it has designed an Action card — therefore, it has learned how to do that.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: GendoIkari on February 04, 2018, 10:09:35 am
To put it another way, there is an important distinction between machine learning, and encapsulating human learning in a computer program. There's a grey area between the two, but it does feel more legitimate to train a neural network on example cards and non-cards, rather than hand-hold it with "the rules and mechanics of Dominion to begin with".

It's not human learning, it's not even on the grey area. The machine has to recognize something to begin with, otherwise there's no way it can learn anything. Right now, the thing it recognizes is individual characters in a text file. If it recognized Dominion mechanics instead, that would be the same thing except a lot less stupid.

Really, the problem with the current implementation is that the vast majority of stuff it creates is like this (actual thing it created):

Sile Gail Haons ona
(http://wiki.dominionstrategy.com/images/thumb/d/d4/Debt8.png/18px-Debt8.png) Action
Each other player reveals cards from the top of choosese. Gain a Treasure card up to 3 Duchose.

There are so many things the machine had to learn in order to come this far. It had to learn how to spell all those English words. It had to learn that cards have a name, a type, a cost, an ability, and a line break to signify that the card is over and a new card is about to start. It had to learn that (http://wiki.dominionstrategy.com/images/thumb/d/d4/Debt8.png/18px-Debt8.png) is a cost. It had to learn that "Action" is a type. It had to learn that Treasure cards can be gained, and that revealing cards from the top is something that each other player can do. However, this card is completely useless, it doesn't even mean anything. The machine doesn't even get to the point where it can combine Dominion mechanics because it still fails the point at which it's supposed to combine individual characters to spell words correctly and form coherent sentences.

Actually one of the main weaknesses with all of these cards is that the machine did not ever learn most of the things you just said. It doesn’t know that action is a type. It just knows that a lot of real cards put the word “action” on the second line of text. It doesn’t know that that icon is a cost; it just knows that some real cards put that icon on the second line. It doesn’t know that treasure cards can be gained; it just knows that “gain a treasure” is a set of words that sometimes appear together in that order. It never learned what any of those things actually mean.

Well, it hasn't learned anything at all. It doesn't have any idea what it's doing, it's just a non-sentient machine. Its efforts only become "knowledge" or "learning" when we interpret them in the light of what we know and understand. If it evolves to put the characters "A", "c", "t", "i", "o" and "n" in that order in the slot where real cards have a card type, we know that it means it has designed an Action card — therefore, it has learned how to do that.

Right, I’m just saying that it is at least theoretically possible for a machine to design cards based not only off of similarities to existing cards, but on the rules and concepts of Dominion itself. It’s just way harder and needs a much more advanced computer.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 04, 2018, 10:20:39 am
Right, I’m just saying that it is at least theoretically possible for a machine to design cards based not only off of similarities to existing cards, but on the rules and concepts of Dominion itself. It’s just way harder and needs a much more advanced computer.

Either way it's going to need to "study" the similarities between existing cards in order to achieve anything. It's just that the smallest thing that it treats as a single unit right now is an individual character, whereas it could be a Dominion concept. It doesn't even need a more advanced computer, it only really needs a more advanced data set and an algorithm which is sufficiently advanced to parse that data set in the intended way.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Philipp on February 04, 2018, 10:27:31 am
Are you suggesting that creating Google DeepMind was not a difficult task?

Yes, it was incredibly hard to lay the foundation the first time. So was writing the first C compiler. It then becomes expontentially more easy when that foundation is released to the public in the form of libraries, which is what happens all the time in the deep learning and programming community. One machine learning open source framework is Google TensorFlow, for example. Based on that, other frameworks popped up, like the amazing Pix2pix, which can be trained with sample data to generate image sets. And if you google DeepFakes, you'll find a lot of NSFW examples of what people are doing on their home computers today with little experience... replacing faces in movies through a deep learning network! Amazing stuff where we can be dwarves on the shoulders of giants, but where our absolute height is still increasing.


There's a grey area between the two, but it does feel more legitimate to train a neural network on example cards and non-cards, rather than hand-hold it with "the rules and mechanics of Dominion to begin with".

Yes, definitely a gray area. But every approach will choose some layer of abstraction. Even AlphaGo had some form of rule-based pre-processing before it send things to the neural network. The "understanding" of a machine-learning "AlphaDominion" could be as simple as knowing the current properties & rules and having them available in text data format, it wouldn't even need an iota of strategy input. *Any other format* you deliver to the neural network too is a human-chosen abstraction of some sort, even if it was a scan of the card in pixel format (you had to settle for a certain resolution; you sneakily photographed the card from the front because you as human know that gives it more meaning; you defined what is a Dominion card and didn't photograph the bottom of the box; you had proper lighting in the shot, etc. -- these are all steps to ensure that basically the text on the card is readable, short of actually transcribing it, but that would be just another step).

Most of these abstractions (which require human knowledge) are in the strict sense just there to save computing time. If the computer was infinitely fast, then you could have it simulate the whole universe and its atoms, and tell it to evolve over billions of simulation years to come up with a planet where someone invents a card game which then gains good reviews on the simulated Amazon. And who knows, we might be the ones living in such a simulation...
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Commodore Chuckles on February 04, 2018, 12:13:54 pm
Sile Gail Haons ona

This looks very Celtic. I don't know why I felt like pointing that out, I just thought it was interesting.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Donald X. on February 04, 2018, 02:19:20 pm
Right, I’m just saying that it is at least theoretically possible for a machine to design cards based not only off of similarities to existing cards, but on the rules and concepts of Dominion itself. It’s just way harder and needs a much more advanced computer.
Maybe what you're imagining does, but it's way way easier to piece together meaningful cards using all existing Dominion concepts, than it is to write a program that "learns." It won't come up with anything novel, but then neither will the learning program.

I put work into this 20 years ago on Magic. Other people have done it since and you can go see the output of one of these programs somewhere. You just consider all of the different forms a rule can take, and all of the smallest pieces the game provides, and then randomly pick stuff. For example you need to pick an effect. One meta-effect is "Effect. Effect" - do two things. You pick that. For the first effect you pick "+N Cards." N could be a formula, any of the things you can count, but it can also just be a number, and you pick 2, to keep this paragraph short. For the second effect you pick "Gain a [card]." Then you have to pick what "[card]" is, there are all the ways you can qualify a card. We pick the choose-one meta thing and go with "[card] or [card]." For the first one we pick "costing $N" and have to pick N, and this time pick a formula, to make this paragraph longer. The formula is "number of cards in your hand." For the other "[card]" we also happen to pick costing $N, but this time N is 2, okay. So "+2 Cards. Gain a card costing $1 per card in your hand or a card costing $2."

The output is not fascinating, as you can see with the Magic cards. It's like that joke in Dirk Gently, the book, where he constrains the cacophony of notes to C and gets cacophony in C. Since we picked randomly, we got random stuff. If you look through them you can maybe find a nice one, but it isn't so much that the program produced a nice one, as it is that your brain produced it, through a slow method where you look at lots of random stuff and evaluate it. If you looked at every producible random card you'd spot all the good ones. You know? There's this logic for making the cards better that your brain knows but the program doesn't.

So then you want that logic. That was too much work 20 years ago and I don't think anyone else has done it since. I always imagined the Magic program producing things like, "Sacrifice a blue artifact: Until end of turn, creatures you control are untapped." On an Enchant Creature spell with a cost of XG. There are all these things about how Magic works that aren't just in the items you randomly pick; artifacts aren't ever blue (it's been many years and at this point a few expansions have had blue artifacts), being untapped isn't the kind of thing that can have a time period for it, an Enchant Creature should refer to the enchanted creature somehow; an X spell should use the X somewhere. But those rules are just part of it; like, if you have "Effect. Effect," well you would like that pairing to make some kind of sense, not to just be two random things, and you have to figure out, what do you mean by that, what makes sense.

There is however one basic thing you can get out of a program like this, sans the tricky logic, which is, it can help you find areas of possibilities you weren't using. You make the list of triggers for "trigger -> effect," and think of one you haven't done yet.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: crj on February 04, 2018, 02:36:22 pm
It's like that joke in Dirk Gently, the book, where he constrains the cacophony of notes to C and gets cacophony in C.
Yes! That!

(I almost mentioned it myself. Now I'm wishing I had. (-8 )
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: King Leon on February 04, 2018, 07:28:09 pm
What Donald is talking about, is a context-free grammar (CFG). A good way to generate cards with this approach would be genetic programming. You can split existing cards into their terminal and nonterminal symbols and recombine them. Then you can evaluate the balancedness of a card if you playtest it (this can be an automated cpu vs cpu game). As higher a card’s balancedness is, as higher is the probability that it is used for the next iteration of recombination (to prevent genetic extinction this chance is never zero, even for very bad or uber cards). There is also a small chance for mutations, which randomly changes a value to create new genetic material. I think this can work well.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: crj on February 05, 2018, 12:05:49 pm
It could work well except that what we started out looking for in this thread was hilarity, and what we seem to have drifted into wanting is a Donald-o-matic that can spit out new Dominion expansions for us with quality at least as good as those made by the real Donald. If the Donald-o-matic managed to work on hardware that cost less to run than the real Donald, that would suddenly move from the realms of an academic exercise to another scary step towards the technological singularity.

What I don't think anybody really wants is a computer which learns how to make balanced cards very similar to those already in the game.

A genetic algorithm running on sentences in a CFG isn't going to come up with Durations, VP tokens, coin tokens, Reserves, split piles, Debt, Night, etc. having seen only the base game.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: crj on February 05, 2018, 12:11:42 pm
Postscript:

I've just realised a genetic algorithm could potentially come up with good answers given briefs like: "This is a proposed new Night mechanic. Make some balanced cards which use it." or "This Night card costs $1 and says 'At the start of your next turn, +4 Cards. This is gained to your hand (instead of your discard pile).' It's interesting; now please make it balanced."

And that's probably the most promising line of attack for using computers to help design real Dominion cards.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: ThetaSigma12 on February 05, 2018, 12:13:59 pm
i was just here for the hilarious dominion cards and now its a debate on ai can we go back to funny cards plz
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Gazbag on February 05, 2018, 01:02:28 pm
i was just here for the hilarious dominion cards and now its a debate on ai can we go back to funny cards plz

I just got this funny Patrol variant:

Scout
Action
$4
+1 Action
Reveal the top 4 cards of your deck. Put the revealed Victory cards into your hand. Put the other cards on top of your deck in any order.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: King Leon on February 05, 2018, 03:45:42 pm
A genetic algorithm running on sentences in a CFG isn't going to come up with Durations, VP tokens, coin tokens, Reserves, split piles, Debt, Night, etc. having seen only the base game.
Potion and Dept are just mutations of money, Night is a mutation of Action, Reserve is a mutation of Island Mat, which is a mutation of trash, etc.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Commodore Chuckles on February 05, 2018, 11:06:14 pm
i was just here for the hilarious dominion cards and now its a debate on ai can we go back to funny cards plz

I just got this funny Patrol variant:

Scout
Action
$4
+1 Action
Reveal the top 4 cards of your deck. Put the revealed Victory cards into your hand. Put the other cards on top of your deck in any order.

I got a weird one too:

Bomb
Action
$1G
Trash this and a card from your hand.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: faust on February 06, 2018, 04:30:10 am
you'll find a lot of NSFW examples of what people are doing on their home computers today with little experience... replacing faces in movies through a deep learning network! Amazing stuff
I beg to differ.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Rabid on February 06, 2018, 05:05:51 am
you'll find a lot of NSFW examples of what people are doing on their home computers today with little experience... replacing faces in movies through a deep learning network! Amazing stuff
I beg to differ.
I found this Tom Scott video about this issue interesting.
https://www.youtube.com/watch?v=OCLaeBAkFAY
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Dingan on February 06, 2018, 12:19:12 pm
Echip
Action–Duration|$2
+e Cards.
+1 Action.

Strictly better than Laboratory

But requires you to destroy some cards *and* make good estimates of what 0.718 of a card is.

Toss up your thousand Echip tokens. If 718 or more of them landed heads-up, draw a card.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: sudgy on February 06, 2018, 12:49:23 pm
Echip
Action–Duration|$2
+e Cards.
+1 Action.

Strictly better than Laboratory

But requires you to destroy some cards *and* make good estimates of what 0.718 of a card is.

Toss up your thousand Echip tokens. If 718 or more of them landed heads-up, draw a card.

But...that's not e cards.  That's just 2.718 cards.

How about this: Toss up your ten Echip tokens.  If less than 7 landed heads-up, draw a card.  If exactly 7 landed heads-up, repeat this process, but with 1, then 8, then 2, then 8, and so on...
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: crj on February 06, 2018, 01:07:24 pm
Um. Unless an "Echip token" is different from a coin in some way, both these are bogus.

If you toss 1,000 coins, the chance fewer than 718 of them coming up heads isn't 0.718 . (Let alone the chance of 718 or more coming up heads.) Similarly, if you toss 10 coins, the chance of fewer than 7 of them coming up heads isn't 0.7 . (My calculator says 0.99995 or so!)

The way to do this would be to use the binary expansion of e and toss a single coin until the result is clear.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: sudgy on February 06, 2018, 01:17:17 pm
Okay, fine then, replace it with a d10.  I just said what Dingan said.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: samath on February 06, 2018, 01:25:51 pm
Echip
Action–Duration|$2
+e Cards.
+1 Action.

Strictly better than Laboratory

But requires you to destroy some cards *and* make good estimates of what 0.718 of a card is.

Toss up your thousand Echip tokens. If 718 or more of them landed heads-up, draw a card.

Yeah, as others also pointed out, that’s not even 2.718 cards, more like 2.00000000000000000000000000000000000000000000923322 cards. (It’s very unlikely that 218 out of 1000 more fair coins than expected come up heads.)

Here’s something elegant you could actually do with expected number of cards drawn of e: Keep picking uniformly random numbers between 0 and 1 until their sum exceeds 1. Draw a card for each number that takes.

You could even approximate this by spinning an object (e.g. a pen or bottle) on the table and tracing the places where it stops around in clockwise order. When those make a complete loop, stop and draw a number of cards equal to the number of spins it took.

(Proof: The probability that k numbers is not enough is the volume of the region in the first orthant of k-dimensional space such that x1 + x2 + ... + xk < 1. You can either do the integral by induction or notice that the partial sums x1 + ... + xi are also distributed uniformly and independently mod 1, and all of them are less than 1 if and only if mod 1 they are in increasing order, which happens with probability 1/k!. Then you sum this from 0 to infinity, getting e.)
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Dingan on February 06, 2018, 01:46:06 pm
It takes a big man to admin when he's wrong. Which I will not do, and instead ask: How can Echips be designed such that I wasn't wrong? I mean, there's gotta be a reason they're Echips and not just normal coins.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: singletee on February 06, 2018, 02:13:59 pm
It takes a big man to admin when he's wrong. Which I will not do, and instead ask: How can Echips be designed such that I wasn't wrong? I mean, there's gotta be a reason they're Echips and not just normal coins.

They could be biased coins with p(heads) ~= 0.72563.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: AJD on February 07, 2018, 04:53:07 pm
Hey, today's e day: 2.7.18.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 07, 2018, 06:13:57 pm
Hey, today's e day: 2.7.18.

But 2.7.18 was like 2016 years ago.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Cave-o-sapien on February 07, 2018, 06:21:07 pm
Hey, today's e day: 2.7.18.

But 2.7.18 was like 2016 years ago.

I must say, of all the date format options out there, the one used by Americans makes the least sense.
 
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: aku_chi on February 07, 2018, 07:06:54 pm
Hey, today's e day: 2.7.18.

But 2.7.18 was like 2016 years ago.

I must say, of all the date format options out there, the one used by Americans makes the least sense.

It matches how the date is spoken:
Code: [Select]
February 7th, 2018
...2.....7......18
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Dingan on February 07, 2018, 07:11:25 pm
Hey, today's e day: 2.7.18.

But 2.7.18 was like 2016 years ago.

I must say, of all the date format options out there, the one used by Americans makes the least sense.

It matches how the date is spoken:
Code: [Select]
February 7th, 2018
...2.....7......18

Right, speaking dates like that makes just as little sense. Now I wonder how they're spoken in other languages and English-speaking cultures.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Gazbag on February 07, 2018, 07:12:54 pm
Hey, today's e day: 2.7.18.

But 2.7.18 was like 2016 years ago.

I must say, of all the date format options out there, the one used by Americans makes the least sense.

It matches how the date is spoken:
Code: [Select]
February 7th, 2018
...2.....7......18

Where I live we usually say 7th February, 2018. I think people just say it the way they write it down.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: ackmondual on February 08, 2018, 12:46:22 am
How does Black score?   Boons don't go into anyone's decks, or do you keep track how many have been received?
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: sudgy on February 08, 2018, 03:14:08 am
How does Black score?   Boons don't go into anyone's decks, or do you keep track how many have been received?

It just says "per Boon".  Not "per Boons you have in your deck" or "per Boons received", just "per Boon".  That means that it's either worth 0 points if Boons aren't around, or 24 points if Boons are out.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: ipofanes on February 08, 2018, 03:22:54 am
Hey, today's e day: 2.7.18.

But 2.7.18 was like 2016 years ago.

I must say, of all the date format options out there, the one used by Americans makes the least sense.

It matches how the date is spoken:
Code: [Select]
February 7th, 2018
...2.....7......18

Right, speaking dates like that makes just as little sense. Now I wonder how they're spoken in other languages and English-speaking cultures.

Some dated method, which I like for its lack of ambiguity, is 7. II. 2018. Month as Roman numeral, year as four-digit.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 08, 2018, 07:14:38 am
YYYY-MM-DD is objectively the best though. It has all the advantages: it's not ambiguous, and it gets sorted in the correct order when sorted alphabetically.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Fuu on February 08, 2018, 09:41:15 am
YYYY-MM-DD is objectively the best though. It has all the advantages: it's not ambiguous, and it gets sorted in the correct order when sorted alphabetically.

This is true. So annoying when my digital camera downloads pictures, groups them into folder by date, but then at the turn of the new year all my folders are sorted incorrectly because it automatically used MM-DD-YYYY to name the folders.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: GendoIkari on February 08, 2018, 09:48:10 am
Hey, today's e day: 2.7.18.

Q: How does one celebrate e Day, anyway?
A: By calculating logarithms, naturally.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Eran of Arcadia on February 08, 2018, 11:07:11 am
Hey, today's e day: 2.7.18.

But 2.7.18 was like 2016 years ago.

I must say, of all the date format options out there, the one used by Americans makes the least sense.

YYYY-DD-MM is worse. It combines the worst aspects of MM-DD-(YYYY) and DD-MM-(YYYY). I've run across a thing that uses it and I just don't get it at all.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: weesh on February 08, 2018, 11:28:40 am
YYYY-MM-DD is objectively the best though. It has all the advantages: it's not ambiguous, and it gets sorted in the correct order when sorted alphabetically.

It's great for things that happened 2 or more years ago, but it's bad for things that are happening next week
You are put the most important information last when it comes to things happening soon.

For anything that will be saved for posterity, and checked later, it's clearly the best, but no one is going to say this today: "can we have a game night 2018-02-17?"
In that case, the year is just noise.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Awaclus on February 08, 2018, 11:44:33 am
For anything that will be saved for posterity, and checked later, it's clearly the best, but no one is going to say this today: "can we have a game night 2018-02-17?"
In that case, the year is just noise.

No, but you wouldn't say "02-17-2018" or "17-02-2018" either, you would just say Saturday 17th.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: AJD on February 08, 2018, 11:56:12 am
YYYY-MM-DD is objectively the best though. It has all the advantages: it's not ambiguous, and it gets sorted in the correct order when sorted alphabetically.

This is true. So annoying when my digital camera downloads pictures, groups them into folder by date, but then at the turn of the new year all my folders are sorted incorrectly because it automatically used MM-DD-YYYY to name the folders.

True story, at one point I was looking, on my university's course management system, for a file I had uploaded some time ago. So I tried to sort the display by date-of-upload and look for it that way. The resulting list was alphabetized by date of upload—April 2015, December 2013, June 2014, May 2016, etc.…
Title: Re: Let's all argue about date formats!
Post by: ThetaSigma12 on February 08, 2018, 12:57:30 pm
i was just here for the hilarious dominion cards and now its a debate on ai can we go back to funny cards plz

*sigh*
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: Eran of Arcadia on February 08, 2018, 01:02:13 pm
i was just here for the hilarious dominion cards and now its a debate on ai can we go back to funny cards plz

*sigh*

All the cool kids are arguing about date formats instead.
Title: Re: Letting a computer design Dominion cards: recurrent neural network edition
Post by: luser on February 11, 2018, 06:23:02 am
Could it generate following card?

Picard:
action - 4$
(http://i0.kym-cdn.com/entries/icons/original/000/000/554/picard-facepalm.jpg)

Toss attached needle to attached sheet until needle crosses a line. Draw a card for each toss that didn't cross line.