forked from External/mage
AI: fixed MCTS (Monte Carlo) errors in some simulations (#10154);
This commit is contained in:
parent
c8b5c1fa35
commit
72cf60085c
2 changed files with 76 additions and 3 deletions
|
|
@ -94,8 +94,10 @@ public class ComputerPlayerMCTS extends ComputerPlayer {
|
|||
root = new MCTSNode(playerId, sim);
|
||||
}
|
||||
applyMCTS(game, action);
|
||||
root = root.bestChild();
|
||||
root.emancipate();
|
||||
if (root != null && root.bestChild() != null) {
|
||||
root = root.bestChild();
|
||||
root.emancipate();
|
||||
}
|
||||
}
|
||||
|
||||
protected void getNextAction(Game game, NextAction nextAction) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue