added MCTSAI2 for testing modifications to MCTS AI

master
melvin 2013-05-11 09:37:45 +08:00
parent 7603a3a890
commit cd1a007d7c
3 changed files with 6 additions and 1 deletions

View File

@ -8,6 +8,8 @@ function genName() {
name = "MMAB"
} else if ($0 ~ /VEGAS/) {
name = "VEGAS"
} else if ($0 ~ /MCTS2/) {
name = "MCTS2"
} else if ($0 ~ /MCTS/) {
name = "MCTS"
}

View File

@ -730,7 +730,7 @@ class MCTSGameTree implements Iterable<MCTSGameTree> {
return parent.isAI() ? sum : 1.0 - sum;
}
private double getAvg() {
public double getAvg() {
return sum / numSim;
}

View File

@ -9,6 +9,9 @@ public enum MagicAIImpl {
VEGASC("vegas (cheat)", new VegasAI(true)),
RND("random", new RandomAI()),
MMABFast("minimax (deck strength)", magic.ai.MMAB.DeckStrAI()),
MCTS2("monte carlo tree search", new MCTSAI2(false)),
MCTSC2("monte carlo tree search (cheat)", new MCTSAI2(true)),
;
private static final MagicAIImpl[] SUPPORTED_AIS = {MMAB, MMABC, MCTS, MCTSC, VEGAS, VEGASC};