It is currently 16 Apr 2024, 21:33
   
Text Size

Genetic algorithm to find the strongest AI decks

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

Genetic algorithm to find the strongest AI decks

Postby austinio7116 » 01 May 2018, 05:57

I've been playing around with a simple genetic algorithm to learn the best decks in Standard for the AI to play. I use the deck based card generator to create an initial population, then evaluate the fitness of the decks using an AI vs AI swiss tournament. The weaker decks are culled, and new decks generated, slightly favouring decks generated from the same key cards as the best decks from the previous generation. This process is then repeated over several generations.

My first results suggest that Mono white aggro is the strongest archetype as it took over the population after 20 generations. This was the winning decklist:

[metadata]
Name=GAS_1_Benalish Marshal - Adorned Pouncer based deck_398_6
[Main]
4 Adorned Pouncer|HOU
3 Aethersphere Harvester|AER
4 Benalish Marshal|DOM
4 Cartouche of Solidarity|AKH
1 Heart of Kiran|AER
3 History of Benalia|DOM
4 Legion's Landing|XLN
1 Plains|AKH|3
1 Plains|AKH|4
2 Plains|DOM|3
1 Plains|DOM|4
1 Plains|KLD|1
9 Plains|RIX
2 Plains|XLN|2
3 Plains|XLN|3
1 Prizefighter Construct|AER
4 Sacred Cat|AKH
4 Servo Exhibition|KLD
1 Shefet Dunes|HOU
2 Skymarcher Aspirant|RIX
3 Sram's Expertise|AER
2 Toolcraft Exemplar|KLD
[Sideboard]
4 Dauntless Bodyguard|DOM
1 Toolcraft Exemplar|KLD
User avatar
austinio7116
 
Posts: 451
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 169 times

Re: Genetic algorithm to find the strongest AI decks

Postby austinio7116 » 01 May 2018, 05:58

If you want a strong AI opponent to test decks against - give this one a try.
User avatar
austinio7116
 
Posts: 451
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 169 times

Re: Genetic algorithm to find the strongest AI decks

Postby mercazole70 » 21 Jul 2018, 17:39

Great. This deck was certainly strong.
Are there any other strong AI decks?
mercazole70
 
Posts: 7
Joined: 21 Jul 2018, 17:35
Has thanked: 5 times
Been thanked: 0 time

Re: Genetic algorithm to find the strongest AI decks

Postby mercazole70 » 31 Jul 2018, 15:22

Can you learn the best decks in Legacy for the AI ?
Because this deck is strong, I am interested in what happens if you do the same learning in Legacy.
I am not English speaker so I am sorry in immature English.
mercazole70
 
Posts: 7
Joined: 21 Jul 2018, 17:35
Has thanked: 5 times
Been thanked: 0 time

Re: Genetic algorithm to find the strongest AI decks

Postby austinio7116 » 31 Jul 2018, 17:35

mercazole70 wrote:Can you learn the best decks in Legacy for the AI ?
Because this deck is strong, I am interested in what happens if you do the same learning in Legacy.
I am not English speaker so I am sorry in immature English.
Sorry, I only posted these on discord, should have put them here too.
Attachments
GeneticAlgorithmDecks.zip
Top 25 from all formats
(61.86 KiB) Downloaded 392 times
User avatar
austinio7116
 
Posts: 451
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 169 times

Re: Genetic algorithm to find the strongest AI decks

Postby austinio7116 » 31 Jul 2018, 17:37

Basically, merfolk won in legacy
User avatar
austinio7116
 
Posts: 451
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 169 times

Re: Genetic algorithm to find the strongest AI decks

Postby austinio7116 » 31 Jul 2018, 17:39

And vintage, and soul sisters won Modern.
User avatar
austinio7116
 
Posts: 451
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 169 times

Re: Genetic algorithm to find the strongest AI decks

Postby mercazole70 » 01 Aug 2018, 05:39

Thank you very much for the very strong AI deck collection.
What does each number mean?
Can the first number be interpreted as a ranking? (1> 2> 3> ...> 25)
mercazole70
 
Posts: 7
Joined: 21 Jul 2018, 17:35
Has thanked: 5 times
Been thanked: 0 time

Re: Genetic algorithm to find the strongest AI decks

Postby austinio7116 » 01 Aug 2018, 05:54

Yes, the final numbers are just generation and deck counters that you can ignore the first is the rank in the final round tournament.
User avatar
austinio7116
 
Posts: 451
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 169 times

Re: Genetic algorithm to find the strongest AI decks

Postby AntoineLeo » 12 Aug 2018, 08:35

Your work is really interesting.

Is it possible to get access to the source code you made to get that result ?

What programming language did you use ?
AntoineLeo
 
Posts: 2
Joined: 12 Aug 2018, 08:32
Has thanked: 0 time
Been thanked: 0 time

Re: Genetic algorithm to find the strongest AI decks

Postby austinio7116 » 12 Aug 2018, 17:08

It's written in Java in my fork of the Forge git repo. I think the required classes might already be in the upstream master.
User avatar
austinio7116
 
Posts: 451
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 169 times

Re: Genetic algorithm to find the strongest AI decks

Postby austinio7116 » 12 Aug 2018, 17:10

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

Re: Genetic algorithm to find the strongest AI decks

Postby Arcanist » 15 Aug 2018, 23:05

I don't mean to nitpick, but what you are finding is not really the strongest archetype, but the one that Forge plays best.

I don't know if you are aware of this, but there is a small YouTube channel where someone discusses attempts at building decks with genetic algorithms and Forge. The quality of the videos is not great unfortunately. I am not just talking about the sound but also the lack of structure. However, there are some interesting tidbits here and there, where the commentator details the issues he has encountered, and what he did to solve them or work around them.
Arcanist
 
Posts: 83
Joined: 20 Jun 2015, 20:12
Has thanked: 9 times
Been thanked: 11 times

Re: Genetic algorithm to find the strongest AI decks

Postby friarsol » 16 Aug 2018, 00:45

Arcanist wrote:I don't mean to nitpick, but what you are finding is not really the strongest archetype, but the one that Forge plays best.
I'm not sure he really suggested that. He said `to learn the best decks in Standard for the AI to play`

The `strongest archetype` that's referenced later is clearly in this context of "Things the AI is good at"
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Genetic algorithm to find the strongest AI decks

Postby austinio7116 » 16 Aug 2018, 12:16

Arcanist wrote:I don't mean to nitpick, but what you are finding is not really the strongest archetype, but the one that Forge plays best.
- absolutely right - that is what I intended - in the absence of a strong AI I thought a low hanging fruit would be to try to optimize to some extend the decks that the AI uses to create a stronger and more consistent opponent against which to test our own decks.[/quote]
Arcanist wrote:I don't know if you are aware of this, but there is a small YouTube channel where someone discusses attempts at building decks with genetic algorithms and Forge. The quality of the videos is not great unfortunately. I am not just talking about the sound but also the lack of structure. However, there are some interesting tidbits here and there, where the commentator details the issues he has encountered, and what he did to solve them or work around them.
- thanks - yes I had seen that and as you say I found it lacking in clarity in many ways, but quite interesting nonetheless.
User avatar
austinio7116
 
Posts: 451
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 169 times

Next

Return to Forge Decks

Who is online

Users browsing this forum: No registered users and 29 guests


Who is online

In total there are 29 users online :: 0 registered, 0 hidden and 29 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 29 guests

Login Form