It is currently 19 Apr 2024, 09:23
   
Text Size

Project Firemind is back

Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins

Re: Project Firemind is back

Postby mike » 25 Nov 2014, 15:41

The deck ratings changed because I'm using stronger AI settings ( MCTS 8 ) to see if that makes a difference.

In my opinion the site is not ready to be used by anyone else than magarena hobbyists. The current deck rankings are in no way close to real world ratings. Someone who's looking for more or less accurate placement of their decks would be turned away by this.

I agree with you on the confusing part. I released the deck list update before I had solved the archetype problem because it was rather important for me in order to continue developing features. Sorry about that. I'm hoping to make it less confusing in the future by improving the UI and adding more archetypes.
User avatar
mike
Programmer
 
Posts: 128
Joined: 05 Jul 2013, 17:00
Has thanked: 0 time
Been thanked: 29 times

Re: Project Firemind is back

Postby muppet » 14 Feb 2015, 16:31

Am I right in thinking if I copy a deck off firemind and run it against a deck I have I shd get exactly the same results as if I load my deck to firemind and run a duel? This assumes I am using MCTS8 aswell obviously.

Or does the muligann choice code make a massive difference. Because basically I get totally different results. I am even using the old 1.56 version of magearena to check the version makes no difference.

I haven't enabled cheating in case you have.
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Project Firemind is back

Postby mike » 14 Feb 2015, 16:46

Am I right in thinking if I copy a deck off firemind and run it against a deck I have I shd get exactly the same results as if I load my deck to firemind and run a duel? This assumes I am using MCTS8 aswell obviously.
There are some other factors like number of cpu cores and average load of the machine that can influence the results but otherwise you should get more or less the same results.

In what way do your results differ?

Or does the muligann choice code make a massive difference. Because basically I get totally different results. I am even using the old 1.56 version of magearena to check the version makes no difference.
Which mulligan choice code? Pretty sure I have not deployed my experiments on the AI to the live servers.

I'll try and update firemind.ch to the new magarena version and add the FRF cards later today. Maybe try it again after that is done?

I haven't enabled cheating in case you have.
Cheating is not enabled. Now that I have more time for this project again, one of the things I want to improve is to display the AI parameters used for every duel next to it so it is more transparent to the people who want to reproduce it.
User avatar
mike
Programmer
 
Posts: 128
Joined: 05 Jul 2013, 17:00
Has thanked: 0 time
Been thanked: 29 times

Re: Project Firemind is back

Postby muppet » 14 Feb 2015, 16:56

By mulligan choice code I mean the assign playable hand feature.

By different results if I take muppet red deck and play the abzhan midrange deck I get about 80% win but on firemind about 20% win.

Sure I'll try again after the new cards are added. I am happy to test things in general if you need someone to try out things you want to add.
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Project Firemind is back

Postby muppet » 15 Feb 2015, 12:13

The deck legality seems a bit bugged it says not legal so you click the button and then it says legal but doesn't update the legality to legal.

for an example see my Vintage pyromancer. It may be the new cards you added of course not sure.

Also if you click card view you get some funny cards but presumably that is just because you haven't got all the pictures.

Ok that seems to have been resolved thanks if you fixed it
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Project Firemind is back

Postby mike » 15 Feb 2015, 15:04

Thanks for reporting those.

Both were pretty strange bugs that I was able to fix now. The "wrong image" thing might pop up for other sets though so if anyone notices before me please post the card link here so I can fix it.
User avatar
mike
Programmer
 
Posts: 128
Joined: 05 Jul 2013, 17:00
Has thanked: 0 time
Been thanked: 29 times

Re: Project Firemind is back

Postby muppet » 16 Feb 2015, 09:19

How exactly does the assign playable hand work. Does it only apply to the first mulligan for example, because the criteria for that is very different to subsequent ones.
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Project Firemind is back

Postby mike » 16 Feb 2015, 10:16

Took me a moment to realize what you're talking about. The "playable hand" feature is just a little bit of statistics for deck creation. It tells you how likely you are to have x cards from group y (for example min 2 lands) in your opening hand. It has no influence on the ai whatsoever. Of course it would be nice to add that in the future but for now I'm using the AI that is released with magarena.
User avatar
mike
Programmer
 
Posts: 128
Joined: 05 Jul 2013, 17:00
Has thanked: 0 time
Been thanked: 29 times

Re: Project Firemind is back

Postby muppet » 16 Feb 2015, 10:34

OK thanks I was about to say I didn't think it was working :-)
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Project Firemind is back

Postby muppet » 19 Feb 2015, 11:48

Given we have no control over the mulligan decision do you happen to know what rule it uses?

Then we can always add the right amount of land to minimise mulligans.
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Project Firemind is back

Postby mike » 19 Feb 2015, 13:05

The code reaponsible for this is in src/magic/model/choice/MagicMulliganChoice.java
User avatar
mike
Programmer
 
Posts: 128
Joined: 05 Jul 2013, 17:00
Has thanked: 0 time
Been thanked: 29 times

Re: Project Firemind is back

Postby muppet » 19 Feb 2015, 13:56

thanks not done any coding since basic was a language but I think I can sort of understand it and that explains why it mulligans too much once I have checked I do understand it I'll post what I think it means in English so people can see.
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Project Firemind is back

Postby muppet » 19 Feb 2015, 14:31

Ok so assuming I do understand whats going on which might be a big assumption at the minute, all decks with no cards of 4+ mana cost and with no mana accelerators should always play 25 land as this is the number that minimises the ai mulliganing. This is because even if you have all zero or 1 mana cost cards in your deck the code ignores this completely and just mulls till he finds lands.
muppet
Tester
 
Posts: 590
Joined: 03 Aug 2011, 14:37
Has thanked: 33 times
Been thanked: 30 times

Re: Project Firemind is back

Postby Lodici » 19 Feb 2015, 14:49

I've been staring at the code for a while...
getArtificialChoiceResults | Open
Code: Select all
    @Override
    public List<Object[]> getArtificialChoiceResults(
            final MagicGame game,
            final MagicEvent event,
            final MagicPlayer player,
            final MagicSource source) {
        int minLands = (game.getTurnPlayer() == player) ? 3 : 2;
        final int maxLands = 4;
        int lands = 0;
        int high = 0;
        int nonLandManaSources = 0;

        if (player.getHandSize() <= 5) {
            return NO_CHOICE_LIST;
        }

        for (final MagicCard card : player.getHand()) {
            final MagicCardDefinition cardDefinition = card.getCardDefinition();
            if (cardDefinition.isLand()) {
                lands++;
            } else {
                if (!cardDefinition.getManaActivations().isEmpty()) {
                    nonLandManaSources++;
                }
                if (cardDefinition.getConvertedCost()>4) {
                    high++;
                }
            }
        }

        if (nonLandManaSources >= 1) {
            minLands--;
        }
        if (lands >= minLands && lands <= maxLands && high <= 2) {
            return NO_CHOICE_LIST;
        }

        return YES_CHOICE_LIST;
    }
... and the only thing I can say with certainty is that it will NOT take a mulligan (returns NO_CHOICE_LIST) if the number of cards in hand is less than 6. If it does decide to take a mulligan (return YES_CHOICE_LIST) then it generates a new hand with one less card and calls this method again and again, until it returns NO_CHOICE_LIST.

edit
I think this more or less covers the rules used (except nonLandManaSources adjustment of minLands - I am not sure why/what that is doing or how to express as a simple rule)...
Code: Select all
take mulligan if cards in hand is greater than 5 AND...
- #lands > 4
- or if playing first and #lands < 3
- or if playing second and #lands < 2
- or if there are 3 or more cards each with CMC > 4
Last edited by Lodici on 19 Feb 2015, 15:55, edited 5 times in total.
User avatar
Lodici
Programmer
 
Posts: 399
Joined: 13 Oct 2013, 09:44
Has thanked: 29 times
Been thanked: 71 times

Re: Project Firemind is back

Postby mike » 19 Feb 2015, 15:21

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.
User avatar
mike
Programmer
 
Posts: 128
Joined: 05 Jul 2013, 17:00
Has thanked: 0 time
Been thanked: 29 times

PreviousNext

Return to Magarena

Who is online

Users browsing this forum: No registered users and 32 guests


Who is online

In total there are 32 users online :: 0 registered, 0 hidden and 32 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 32 guests

Login Form