It is currently 15 Nov 2019, 18:15
   
Text Size

Random Deck Generation Ideas

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, friarsol, Blacksmith, KrazyTheFox, Agetian, CCGHQ Admins

Random Deck Generation Ideas

Postby austinio7116 » 03 May 2017, 13:13

I have been making some small improvements to the deck generation features. I wanted to create a thread to record some of the other ideas that have been suggested. So far we have:

Add a "DeckDont" DeckHint so that cards can be excluded from coloured decks (Hanmac)

Allow custom formats/sets to be selected for the card pool.

Feel free to add ideas to this thread.
User avatar
austinio7116
 
Posts: 421
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 149 times

Re: Random Deck Generation Ideas

Postby Hanmac » 03 May 2017, 20:25

An Example where i would like such a DeckDont:

Stern Judge should only added to a White deck, if the Deck does not have any Black stuff (and thats why no Swamps)

"Ability$Counters" for DeckHas and DeckHints & DeckNeeds should probably extended to specify what kind of Counters it has, (like +1/+1 or -1/-1 ones)
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Random Deck Generation Ideas

Postby austinio7116 » 07 May 2017, 16:31

I'd really like to see a neural network trained to create format legal decks - there are plenty of decks to train it on.
User avatar
austinio7116
 
Posts: 421
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 149 times

Re: Random Deck Generation Ideas

Postby austinio7116 » 08 May 2017, 09:59

I may try deeplearning4j and see how far I get when I have some time
User avatar
austinio7116
 
Posts: 421
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 149 times

Re: Random Deck Generation Ideas

Postby Xitax » 08 May 2017, 13:05

That sounds very interesting. I'd be interested in how it turns out if you do.
Xitax
 
Posts: 865
Joined: 16 May 2010, 17:19
Has thanked: 159 times
Been thanked: 117 times

Re: Random Deck Generation Ideas

Postby austinio7116 » 09 May 2017, 14:51

Got a bit sidetracked with a more heuristic approach that I had been thinking about for a while. I have built a new deck generator that takes a large set of deck lists (currently all AI playable standard deck from Aether Revolt from Agetian's deck extract) and builds a matrix of associations between cards in the set. It's a very simple loop though all the cards counting for each other card how many times it appears in decks with it. Then the deck generator uses this matrix to get a small pool of cards based on a single source card that have high associations to that card and builds a deck (using a similar model to the limited deck generator) using the pool. This generates pseudo-random decks that are generally fairly synergistic and quite similar to human generated decks.
Last edited by austinio7116 on 09 May 2017, 14:53, edited 1 time in total.
User avatar
austinio7116
 
Posts: 421
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 149 times

Re: Random Deck Generation Ideas

Postby austinio7116 » 09 May 2017, 14:52

User avatar
austinio7116
 
Posts: 421
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 149 times

Re: Random Deck Generation Ideas

Postby Hanmac » 09 May 2017, 15:14

I don't know if the AI should use my decks as inspiration for deck building, they are not that good xD
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Random Deck Generation Ideas

Postby Agetian » 09 May 2017, 19:42

Sounds very interesting! Can't wait to see this used in practice! It can help create literally infinite AI opponent decks that are better than the current "fully randomly generated" decks!

- Agetian
Agetian
Programmer
 
Posts: 3359
Joined: 14 Mar 2011, 05:58
Has thanked: 644 times
Been thanked: 499 times

Re: Random Deck Generation Ideas

Postby austinio7116 » 09 May 2017, 21:40

Just a couple of bugs to sort out, plus a bit of refactoring to avoid having to generate the distance matrix on every startup and I'll check it in so you can try it.
User avatar
austinio7116
 
Posts: 421
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 149 times

Re: Random Deck Generation Ideas

Postby austinio7116 » 11 May 2017, 20:44

I think this is ready to check in now. There are some things I can improve but it's a decent first version. I added some randomization so the decks for each card are different each time, ran a Modern format version of the training data to add to the Standard data and fixed several bugs. You can select the "seed" card by name in the deck selector and all the training data is now serialized and stored in the resources folders so no need to retrain on each app initialization.
User avatar
austinio7116
 
Posts: 421
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 149 times

Re: Random Deck Generation Ideas

Postby austinio7116 » 11 May 2017, 21:14

Checked in SVN 33988
User avatar
austinio7116
 
Posts: 421
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 149 times

Re: Random Deck Generation Ideas

Postby Agetian » 12 May 2017, 03:53

This is really awesome! :D I'll play with this today after work. Thanks a lot for the effort! :)

- Agetian
Agetian
Programmer
 
Posts: 3359
Joined: 14 Mar 2011, 05:58
Has thanked: 644 times
Been thanked: 499 times

Re: Random Deck Generation Ideas

Postby austinio7116 » 12 May 2017, 10:07

I hope you like it - make sure to get at least svn revision 33995 for the best experience.
User avatar
austinio7116
 
Posts: 421
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 149 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 8 guests


Who is online

In total there are 8 users online :: 0 registered, 0 hidden and 8 guests (based on users active over the past 10 minutes)
Most users ever online was 546 on 15 Nov 2019, 10:18

Users browsing this forum: No registered users and 8 guests

Login Form