Page 5 of 8

Re: Project Firemind is back

PostPosted: 19 Feb 2015, 15:52
by Lodici
mike wrote:A while back i started playing around with my own AI implementation. It's not even close to finished but I was able to improve the mulligan functionally so it would consider what spells the lands in hand could actually cast and make a decision based on that. I'll have to check if it still work with the current version, if so I could make a pull request for this seperately.
Go for it.

Re: Project Firemind is back

PostPosted: 20 Feb 2015, 09:44
by muppet
I think the absolute best way to do mulligan decisions would be for the ai to play a lot of games with the deck in question with 7,6,5 etc cards at the start and then use the data and pattern analysis to determine what it should do in the future. This is probably too computer intensive to add even in a dimple form for example even doing it just for number of lands.
Second best and I hope what Mike is trying would be to integrate the websites parameters for choosing a set of cards and a number of them in opening hand which are entirely player determined. One important point no one has mentioned is the parameters should certainly be different going from 7 to 6 as from 6 to 5 cards. The 6 card hand shd be kept without anywhere near as good a fit as the first one.

Re: Project Firemind is back

PostPosted: 21 Feb 2015, 14:07
by muppet
I seem to have bugged the legality check again unless I have done something very mad. My boros deck is standard legal but its only showing 40 cards in standard card view pane and it claims some cards are illegal.

Re: Project Firemind is back

PostPosted: 21 Feb 2015, 16:31
by muppet
Also I find ae beginning cards like Aether Vial and Aetherling hard to register in decks because it uses Æther Vial as its standard format for these characters.

Re: Project Firemind is back

PostPosted: 22 Feb 2015, 00:07
by mike
I think the absolute best way to do mulligan decisions would be for the ai to play a lot of games with the deck in question with 7,6,5 etc cards at the start and then use the data and pattern analysis to determine what it should do in the future. This is probably too computer intensive to add even in a dimple form for example even doing it just for number of lands.
Second best and I hope what Mike is trying would be to integrate the websites parameters for choosing a set of cards and a number of them in opening hand which are entirely player determined. One important point no one has mentioned is the parameters should certainly be different going from 7 to 6 as from 6 to 5 cards. The 6 card hand shd be kept without anywhere near as good a fit as the first one.
I've been playing around with generating deck profiles using genetic algorithms. This has shown some success in finding distinctions between a couple of top tier modern decks I was evaluating. As you noted correctly though, doing this for every deck takes way too long. Even if I find smarter and more efficient ways than gen. algorithms. I do envision storing these profiles on firemind.ch and having the client download them if available. It would also be nice if users could generate such profiles by having their client run the deck against a predefined gauntlet of decks for the format it is meant to be played in.

The problem I have with the user defined mulligan parameters is that they would break the balance between the decks and thus ruin deck rankings. I am interested in using them to figure out smarter ways to make mulligan decisions but I can't allow users to directly influence the AI game play.

Here is my pull request for the first set of mulligan improvements if anyone is interested: https://github.com/magarena/magarena/pull/67

I seem to have bugged the legality check again unless I have done something very mad. My boros deck is standard legal but its only showing 40 cards in standard card view pane and it claims some cards are illegal.
You seem to have a talent for finding all the strange corner cases =)

Somehow the hash I use to identify a deck list no longer matched the actual content of that deck list. This meant, that every time you submitted to correct 60 card deck list it generated the hash, found the broken 40 card list and used that one instead (because it believed it already existed). As to how that broken hash came to be I have no idea. I added some code to prevent a deck list being saved with the wrong hash in the future so this shouldn't happen again. You might need to update your deck one more time though.

Also I find ae beginning cards like Aether Vial and Aetherling hard to register in decks because it uses Æther Vial as its standard format for these characters.
You should be able to register them using Ae, it will automatically rewrite it for you.

Re: Project Firemind is back

PostPosted: 16 Mar 2015, 19:25
by PalladiaMors
Hey I'm getting a pretty scary screen when trying to connect to Firemind. What happened?

Re: Project Firemind is back

PostPosted: 16 Mar 2015, 19:30
by mike
A server is currently down. I'll go into work tomorrow to fix that.

Re: Project Firemind is back

PostPosted: 17 Mar 2015, 16:11
by PalladiaMors
Thanks for taking care of that, Mike.

I've noticed that cards without groovy do not get pushed at all anymore (Pilgrim of the Fires can't possibly have any errors). Frankly, I totally oppose this 'test' thing. Every couple of months someone submits a card without code, either by accident or because people don't have the slightest idea about how coding cards works, like I used to do. This could be prevented by a warning in the submissions page: "Please don't submit cards unless you have tested that they work!". All the tests do is get in the way when I'm trying to send cards that don't require groovy. Wouldn't you guys agree that a warning is a better alternative?

Re: Project Firemind is back

PostPosted: 17 Mar 2015, 17:02
by mike
Well, Melvin told me that the system actually caught some broken scripts which means that it's not completely useless ;)

You can see the error the card generates here by the way (by going to the status page, clicking on the submission and then clicking on the duel). https://www.firemind.ch/duels/489603

The problem seems to be this: null does not have a timing hint

Re: Project Firemind is back

PostPosted: 17 Mar 2015, 17:48
by PalladiaMors
Strange, the script has the timing=main that's standard for creatures. It's gotta be some kind of bug?

And yeah, creatures like this, without abilities that can interfere in the combat phase in the turn they're cast, should probably be cast during the second main. That shouldn't interfere with the script getting through, though.

Re: Project Firemind is back

PostPosted: 18 Mar 2015, 07:25
by mike
The checking system is using the same version of magarena as the rest of firemind.ch. This means it's not always using the latest code (currently 1.59). Might that be causing the problem? If not, just try resubmitting the script.

Re: Project Firemind is back

PostPosted: 18 Mar 2015, 10:56
by ShawnieBoy
PalladiaMors wrote:And yeah, creatures like this, without abilities that can interfere in the combat phase in the turn they're cast, should probably be cast during the second main.
It's best to think of the timings as restrictions on when things are cast, not when is best to cast. If Pilgrim of the Fires had second main as a timing, it would never be cast before combat. Ever. Even if Fervor was in play.

At least give the AI a chance to find some combinations, (Using it to sacrifice for a spell during combat eg Fling)

Re: Project Firemind is back

PostPosted: 18 Mar 2015, 12:13
by melvin
PalladiaMors wrote:Strange, the script has the timing=main that's standard for creatures. It's gotta be some kind of bug?
@mike suspect it is a bug on firemind, the error message should say "Pilgrim of the Fires does not have a timing hint". Looks like both the name and timing of the card was left at the default value.

I added the script manually and it works fine.

Re: Project Firemind is back

PostPosted: 18 Mar 2015, 12:19
by mike
I'll have to make a pull request soon anyway to fix the memory leak the worker runs into constantly. While I'm at it I can merge the master of magarena with the worker code and deploy it. Hopefully that will fix the issue.

Re: Project Firemind is back

PostPosted: 18 Mar 2015, 12:32
by muppet
Does the timing thing explain why the AI is terrible with Snapcaster Mage? That has timing main and if that means it only casts it in its own main phase that would explain things.