コード例 #1
0
        public AlvaroAgent(double exploreConstant, int maxTime, string selectionAction, double scoreImportance, string treePolicy, int treeMaximumDepth,
                           string simulationPolicy, double childrenConsideredSimulating, string estimationMode, int numSimulations,

                           string HERO_HEALTH_REDUCED, string HERO_ATTACK_REDUCED, string MINION_HEALTH_REDUCED, string MINION_ATTACK_REDUCED,
                           string MINION_APPEARED, string MINION_KILLED, string SECRET_REMOVED, string MANA_REDUCED, string M_HEALTH,
                           string M_ATTACK, string M_HAS_CHARGE, string M_HAS_DEAHTRATTLE, string M_HAS_DIVINE_SHIELD, string M_HAS_INSPIRE,
                           string M_HAS_LIFE_STEAL, string M_HAS_STEALTH, string M_HAS_TAUNT, string M_HAS_WINDFURY, string M_RARITY, string M_MANA_COST,
                           string M_POISONOUS,

                           float weaponAttack, float weaponDurability, float health, float boardStats, float handSize, float deckRemaining,
                           float mana, float secret, float overload, float minionCost, float secretCost, float cardCost, float weaponCost)
        {
            EXPLORE_CONSTANT               = exploreConstant;
            MAX_TIME                       = maxTime;
            SELECTION_ACTION_METHOD        = selectionAction;
            SCORE_IMPORTANCE               = scoreImportance;
            TREE_POLICY                    = treePolicy;
            TREE_MAXIMUM_DEPTH             = treeMaximumDepth;
            SIMULATION_POLICY              = simulationPolicy;
            CHILDREN_CONSIDERED_SIMULATING = childrenConsideredSimulating;
            ESTIMATION_MODE                = estimationMode;
            NUM_SIMULATIONS                = numSimulations;

            greedyAgent = new ParametricGreedyAgent(HERO_HEALTH_REDUCED + "#" + HERO_ATTACK_REDUCED + "#" + MINION_HEALTH_REDUCED + "#" + MINION_ATTACK_REDUCED + "#" +
                                                    MINION_APPEARED + "#" + MINION_KILLED + "#" + SECRET_REMOVED + "#" + MANA_REDUCED + "#" + M_HEALTH + "#" +
                                                    M_ATTACK + "#" + M_HAS_CHARGE + "#" + M_HAS_DEAHTRATTLE + "#" + M_HAS_DIVINE_SHIELD + "#" + M_HAS_INSPIRE + "#" +
                                                    M_HAS_LIFE_STEAL + "#" + M_HAS_STEALTH + "#" + M_HAS_TAUNT + "#" + M_HAS_WINDFURY + "#" + M_RARITY + "#" + M_MANA_COST + "#" + M_POISONOUS);

            Estimator.setWeights(weaponAttack, weaponDurability, health, boardStats, handSize, deckRemaining, mana, secret, overload, minionCost, secretCost,
                                 cardCost, weaponCost, float.Parse(M_HAS_CHARGE), float.Parse(M_HAS_DEAHTRATTLE), float.Parse(M_HAS_DIVINE_SHIELD),
                                 float.Parse(M_HAS_INSPIRE), float.Parse(M_HAS_LIFE_STEAL), float.Parse(M_HAS_TAUNT), float.Parse(M_HAS_WINDFURY));
        }
コード例 #2
0
        public AlvaroAgent()
        {
            EXPLORE_CONSTANT               = 2;
            MAX_TIME                       = 1000;
            SELECTION_ACTION_METHOD        = "MaxVictoriesOverVisited";
            SCORE_IMPORTANCE               = 10;
            TREE_POLICY                    = "UCB1";
            TREE_MAXIMUM_DEPTH             = 1;
            SIMULATION_POLICY              = "GreedyPolicy";
            CHILDREN_CONSIDERED_SIMULATING = 1.0;
            ESTIMATION_MODE                = "LinearEstimation";
            NUM_SIMULATIONS                = 1;

            greedyAgent = new ParametricGreedyAgent("0.569460712743" + "#" + "0.958111820041" + "#" + "0.0689492467097" + "#" + "0.0" + "#" +
                                                    "0.843573987219" + "#" + "0.700225423688" + "#" + "0.907680353441" + "#" + "0.0" + "#" + "0.993682660717" + "#" +
                                                    "1.0" + "#" + "0.640753949511" + "#" + "0.992872512338" + "#" + "0.92870036875" + "#" + "0.168100484322" + "#" +
                                                    "0.870080107454" + "#" + "0.0" + "#" + "0.42897762808" + "#" + "1.0" + "#" + "0.0" + "#" + "0.583884736646" + "#" + "0.0");

            Estimator.setWeights(0.7f, 0.4f, 0.4f, 0.9f, 0.4f, 0.01f, 0.02f, 0.4f, 0.3f, 0.8f, 0.5f, 0.4f, 0.5f, float.Parse("0.640753949511"), float.Parse("0.992872512338"), float.Parse("0.92870036875"),
                                 float.Parse("0.168100484322"), float.Parse("0.870080107454"), float.Parse("0.42897762808"), float.Parse("1.0"));
        }