Page 1 of 1

Teach the AI how to mulligan

PostPosted: 24 Mar 2015, 22:41
by mike
I just started a neural network AI class and was trying to find ways to apply the techniques to magarena (or magic problems in general). Just a small project to see if NNs might be useful for future magarena AI versions.

One somewhat isolated area of decision making is the mulligan decision. So that's my first goal: train a neural network to decide whether a hand is keepable or not.

Now if I got anything from the first couple of lessons it is that a neural network can be taught almost anything with enough data. Unfortunately, that data is currently only available to me in form of a gut feeling.

I wanted an easy way to "teach" the AI whenever I had some minutes to spare. Which is why I put up this little "game" at project firemind: https://www.firemind.ch/mulligan

It gives you sample hands from a few select decks and saves your mulligan decision. If anyone wants to help me out or just likes to make mulligan decisions I'd greatly appreciate you playing it too.

Also, if this catches on and I get a useful number of results I'll be putting the data up as a download for anyone to make their own statistical analysis on.

As always critique and suggestions are welcome.

Re: Teach the AI how to mulligan

PostPosted: 25 Mar 2015, 01:17
by PalladiaMors
Maybe I'm weird, but I actually found that quite fun :lol:

However, this is a part of my game that I really don't trust. Maybe we could get a 'pass' option for the cases we really aren't sure about?

Edit: also, maybe this is nitpicking a bit, but perhaps it would be relevant to have the information about whether we're playing first or second, because it might make a bit of difference in some cases?

Re: Teach the AI how to mulligan

PostPosted: 25 Mar 2015, 08:12
by jerichopumpkin
I've made a few tries and it's really fun, I would like to see more decks!
Unfortunately, I'm not on my usual pc, so I was not logged in (I forgot how I registered)...
I also noticed that you got to make the decision only on the first hand and do not get to see the outcome of your mulligan. I think that with a little work you can repeat the draw from the same deck and save the subsequent decision, so you will also have data on 5 cards hands

Re: Teach the AI how to mulligan

PostPosted: 25 Mar 2015, 12:45
by muppet
great might be interesting to see if some people mulligan more than others and also interesting to post hands that get as many keeps as mulligan.

Re: Teach the AI how to mulligan

PostPosted: 25 Mar 2015, 12:56
by ShawnieBoy
I have to agree - This is surprisingly fun.

Re: Teach the AI how to mulligan

PostPosted: 25 Mar 2015, 18:27
by jerichopumpkin
also a page with the decks and mulligan stat gathered for them (maybe with most keeped and most discard hands) would be very nice. And I did it again, it's incredible how fun it is. Help, I can't stop...

Re: Teach the AI how to mulligan

PostPosted: 25 Mar 2015, 20:01
by mike
Awesome how many people already played it. Thanks guys!

I just put up a new version taking into account some of your feedback:

* There is now a skip button
* If mulligan is chosen a hand from the same deck with one fewer cards is selected to make it feel more natural
* It shows you if you're on the play or on the draw
* A level bar showing the progress in percent of hands ranked
* Every time a high enough level is reached I'll be adding more decks

@jerichopumpkin: database says you're a google user ;)

Re: Teach the AI how to mulligan

PostPosted: 26 Mar 2015, 09:21
by jerichopumpkin
@mike thanks, I have way too much accounts on the net for my declining memory to store! I'll try the new version right away!

edit: even there, being unlucky strikes you hard. First hand, only 1 land, wrong color. Each subsequent mulligan I've seen no lands. Good for me it wasn't a game :D

Re: Teach the AI how to mulligan

PostPosted: 10 Jun 2015, 13:42
by jerichopumpkin
how is this project going? It's been a while since I played with it, today I've given it a run, so I decided to ask...