forked from External/mage
Fixes in MAD ai.
This commit is contained in:
parent
4cb00a5712
commit
58b959ff65
6 changed files with 28 additions and 9 deletions
|
|
@ -234,11 +234,15 @@ public class ComputerPlayer6 extends ComputerPlayer<ComputerPlayer6> implements
|
|||
root = root.children.get(0);
|
||||
//GameStateEvaluator2.evaluate(playerId, root.getGame());
|
||||
int bestScore = root.getScore();
|
||||
if (bestScore > currentScore) {
|
||||
//if (bestScore > currentScore) {
|
||||
actions = new LinkedList<Ability>(root.abilities);
|
||||
combat = root.combat;
|
||||
}
|
||||
}
|
||||
//} else {
|
||||
//System.out.println("[" + game.getPlayer(playerId).getName() + "] Action: not better score");
|
||||
//}
|
||||
} else {
|
||||
System.out.println("[" + game.getPlayer(playerId).getName() + "] Action: skip");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -157,11 +157,15 @@ public class ComputerPlayer7 extends ComputerPlayer6 implements Player {
|
|||
if (root.children.size() > 0) {
|
||||
root = root.children.get(0);
|
||||
int bestScore = root.getScore();
|
||||
if (bestScore > currentScore || allowBadMoves) {
|
||||
//if (bestScore > currentScore || allowBadMoves) {
|
||||
actions = new LinkedList<Ability>(root.abilities);
|
||||
combat = root.combat;
|
||||
}
|
||||
}
|
||||
//} else {
|
||||
//System.out.println("[" + game.getPlayer(playerId).getName() + "][pre] Action: not better score");
|
||||
//}
|
||||
} else {
|
||||
System.out.println("[" + game.getPlayer(playerId).getName() + "][pre] Action: skip");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -177,11 +181,15 @@ public class ComputerPlayer7 extends ComputerPlayer6 implements Player {
|
|||
if (root.children.size() > 0) {
|
||||
root = root.children.get(0);
|
||||
int bestScore = root.getScore();
|
||||
if (bestScore > currentScore || allowBadMoves) {
|
||||
//if (bestScore > currentScore || allowBadMoves) {
|
||||
actions = new LinkedList<Ability>(root.abilities);
|
||||
combat = root.combat;
|
||||
}
|
||||
}
|
||||
//} else {
|
||||
//System.out.println("[" + game.getPlayer(playerId).getName() + "][post] Action: not better score");
|
||||
//}
|
||||
} else {
|
||||
System.out.println("[" + game.getPlayer(playerId).getName() + "][post] Action: skip");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -199,6 +199,12 @@ public class SimulatedPlayer2 extends ComputerPlayer<SimulatedPlayer2> {
|
|||
filtered.add(option);
|
||||
return filtered;
|
||||
} else {
|
||||
Card target = game.getCard(option.getFirstTarget());
|
||||
if (target != null && target.getName().equals(name)) {
|
||||
System.out.println("matched(option): " + s);
|
||||
filtered.add(option);
|
||||
return filtered;
|
||||
}
|
||||
System.out.println("not equal UUID for target, player=" + player);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ public class ArtificialScoringSystem {
|
|||
public static int getVariablePermanentScore(final Game game, final Permanent permanent) {
|
||||
|
||||
int score = permanent.getCounters().getCount(CounterType.CHARGE) * 30;
|
||||
score -= permanent.getDamage() * 2;
|
||||
if (!canTap(permanent)) {
|
||||
score += getTappedScore(permanent);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue