public override int Rate() { if (HeroHp < 1) { return(Int32.MinValue); } if (OpHeroHp < 1) { return(Int32.MaxValue); } int result = 0; Controller player = Controller; Controller opp = player.Opponent; int heroHp = HeroHp + player.Hero.Armor; int oppHeroHp = OpHeroHp + opp.Hero.Armor; result += (heroHp - oppHeroHp) * 2 * Scale; result += player.NumCardsDrawnThisTurn * Scale; result += player.NumDiscardedThisGame * -5 * Scale; result += player.NumFriendlyMinionsThatAttackedThisTurn * Scale; result += player.NumMinionsPlayerKilledThisTurn * Scale; result += player.RemainingMana * -Scale; Minion[] minions = BoardZone.GetAll(); Minion[] oppMinions = OpBoardZone.GetAll(); result += (minions.Count() - oppMinions.Count()) * 3 * Scale; result += getTotalMinionScore(minions); result -= getTotalMinionScore(oppMinions); return(result); }
public override int Rate() { // lose if (HeroHp < 1) { return(Int32.MinValue); } // win if (OpHeroHp < 1) { return(Int32.MaxValue); } int result = 0; int scale = 1000; //if (OpBoardZone.Count == 0 && BoardZone.Count > 0) // result += 1000; //if (OpMinionTotHealthTaunt > 0) // result += OpMinionTotHealthTaunt * -1000; //result += MinionTotAtk; Controller player = Controller; Controller opp = player.Opponent; int heroHp = HeroHp + player.Hero.Armor; int oppHeroHp = OpHeroHp + opp.Hero.Armor; //result += (HeroHp - OpHeroHp) * 1000; //result += (heroHp - oppHeroHp); result += (heroHp - oppHeroHp) * scale; result += HandCnt * 3 * scale; result -= OpHandCnt * 3 * scale; Minion[] minions = BoardZone.GetAll(); result += minions.Count() * 2 * scale; foreach (Minion minion in minions) { result += getMinionScore(minion) * scale; } Minion[] oppMinions = OpBoardZone.GetAll(); result -= oppMinions.Count() * 2 * scale; foreach (Minion oppMinion in oppMinions) { result -= getMinionScore(oppMinion) * scale; } return(result); }
//private int MinionHealthDiffReward = 1000; //private int MinionAttDiffReward = 1000; //private int OpNoBoardReward = 5000; //private int HeroAttackDifReward = 1000; //45 with bot5 public override int MyRate() { Controller player = Controller; Controller opponent = player.Opponent; if (OpHp < 1) { return(Int32.MaxValue); } if (MyHp < 1) { return(Int32.MinValue); } int result = 0; result += MyHp * HealthReward; result -= OpHp * OppHealthReward; result += player.NumCardsDrawnThisTurn * DrawCountReward; result -= player.NumDiscardedThisGame * DiscartedCountReward; //result += MyBoardZone.Count * MyBoardCountReward ; //result += OpBoardZone.Count * OpBoardCountReward; Minion[] myMinions = player.BoardZone.GetAll(); Minion[] oppMinions = OpBoardZone.GetAll(); result += (myMinions.Count() - oppMinions.Count()) * MyMinionScoreReward; foreach (Minion minion in myMinions) { result += getMinionScore(minion) * MyMinionScoreReward; } foreach (Minion minion in oppMinions) { result -= getMinionScore(minion) * OppMinionScoreReward; } result += player.NumMinionsPlayerKilledThisTurn * MinionsKillCountReward; if (player.HeroClass == CardClass.SHAMAN || player.HeroClass == CardClass.ROGUE || player.HeroClass == CardClass.DRUID) { result += player.JadeGolem * JadeScaleReward; } return(result); }
public override int Rate() { if (HeroHp < 1) { return(Int32.MinValue); } if (OpHeroHp < 1) { return(Int32.MaxValue); } int result = 0; if (OpBoardZone.Count == 0 && BoardZone.Count > 0) { result += 7 * Scale; } Controller player = Controller; Controller opp = player.Opponent; result += player.AmountHeroHealedThisTurn * 5; result -= opp.AmountHeroHealedThisTurn * 5; result += player.JadeGolem * 10 * Scale; result += player.NumCardsDrawnThisTurn * Scale; result += player.NumDiscardedThisGame * -5 * Scale; result += player.NumFriendlyMinionsThatAttackedThisTurn * Scale; result += player.NumMinionsPlayerKilledThisTurn * Scale; result += player.RemainingMana * -Scale; int heroHp = HeroHp + player.Hero.Armor; int oppHeroHp = OpHeroHp + opp.Hero.Armor; result += (heroHp - oppHeroHp) * Scale; result += HandCnt * 2 * Scale; result -= OpHandCnt * 2 * Scale; Minion[] minions = BoardZone.GetAll(); Minion[] oppMinions = OpBoardZone.GetAll(); result += (minions.Count() - oppMinions.Count()) * 4 * Scale; result += getTotalMinionScore(minions); result -= getTotalMinionScore(oppMinions); if (OpMinionTotHealthTaunt > 0) { result += OpMinionTotHealthTaunt * -Scale; } return(result); }
public override int Rate() { // lose if (HeroHp < 1) { return(Int32.MinValue); } // win if (OpHeroHp < 1) { return(Int32.MaxValue); } int result = 0; int scale = 1000; Controller player = Controller; Controller opp = player.Opponent; int heroHp = HeroHp + player.Hero.Armor; int oppHeroHp = OpHeroHp + opp.Hero.Armor; // ReSharper disable once UselessBinaryOperation result = (heroHp - oppHeroHp) * scale + result; result += HandCnt * 3 * scale; result -= OpHandCnt * 3 * scale; Minion[] minions = BoardZone.GetAll(); result += minions.Count() * 2 * scale; foreach (Minion minion in minions) { result += getMinionScore(minion) * scale; } Minion[] oppMinions = OpBoardZone.GetAll(); result -= oppMinions.Count() * 2 * scale; foreach (Minion oppMinion in oppMinions) { result -= getMinionScore(oppMinion) * scale; } return(result); }
public override int Rate() { if (HeroHp < 1) { return(Int32.MinValue); } if (OpHeroHp < 1) { return(Int32.MaxValue); } int result = 0; int scale = 1000; Controller player = Controller; Controller opp = player.Opponent; int heroHp = HeroHp + player.Hero.Armor; int oppHeroHp = OpHeroHp + opp.Hero.Armor; result += (heroHp - oppHeroHp) * scale; result += HandCnt * 3 * scale; result -= OpHandCnt * 3 * scale; Minion[] minions = BoardZone.GetAll(); result += minions.Count() * 2 * scale; foreach (Minion minion in minions) { result += MinionScore(minion) * scale; } Minion[] oppMinions = OpBoardZone.GetAll(); result -= oppMinions.Count() * 2 * scale; foreach (Minion oppMinion in oppMinions) { result -= MinionScore(oppMinion) * scale; } return(result); }
public override int Rate() { if (OpHeroHp < 1) { return(Int32.MaxValue); } if (HeroHp < 1) { return(Int32.MinValue); } int result = 0; int index = Turn; if (index > 9) { index = 9; } result += BoardCoef[index, RemainingManaCoef] * RemainingMana; result += BoardCoef[index, UsedManaCoef] * UsedMana; result += BoardCoef[index, ArmerCoef] * Armer; result += BoardCoef[index, OpArmerCoef] * OpArmer; result += BoardCoef[index, BoardZoneCntCoef] * BoardZoneCnt; result += BoardCoef[index, OpBoardZoneCntCoef] * OpBoardZoneCnt; result += BoardCoef[index, HeroHpCoef] * HeroHp; result += BoardCoef[index, OpHeroHpCoef] * OpHeroHp; result += BoardCoef[index, HeroAtkCoef] * HeroAtk; result += BoardCoef[index, OpHeroAtkCoef] * OpHeroAtk; result += BoardCoef[index, HandTotCostCoef] * HandTotCost; result += BoardCoef[index, HandCntCoef] * HandCnt; result += BoardCoef[index, OpHandCntCoef] * OpHandCnt; result += BoardCoef[index, DeckCntCoef] * DeckCnt; result += BoardCoef[index, OpDeckCntCoef] * OpDeckCnt; result += BoardCoef[index, MinionTotAtkCoef] * MinionTotAtk; result += BoardCoef[index, OpMinionTotAtkCoef] * OpMinionTotAtk; result += BoardCoef[index, MinionTotHealthCoef] * MinionTotHealth; result += BoardCoef[index, OpMinionTotHealthCoef] * OpMinionTotHealth; result += BoardCoef[index, MinionTotHealthTauntCoef] * MinionTotHealthTaunt; result += BoardCoef[index, OpMinionTotHealthTauntCoef] * OpMinionTotHealthTaunt; foreach (Minion m in BoardZone.GetAll()) { if (m != null) { int cost = m.Cost; if (cost > 10) { cost = 10; } result += MinionsCoef[cost]; } } foreach (Minion m in OpBoardZone.GetAll()) { if (m != null) { int cost = m.Cost; if (cost > 10) { cost = 10; } result += OpMinionsCoef[cost]; } } return(result); }