iterate(root);
iterate(root);
iterate(root);
iterate(root);
}while(System.currentTimeMillis()<endTime);
INode node = root.selectChild(config.getMoveSelectionStrategy());
config.getModel().setChosenNode(node);
// try {
// ImmutableList<INode> children = ((InnerNode) node).getChildren();
// for (INode n: children) {
// String str = " <last action> ";
// str = "" + n.getLastAction().getAction().getUnwrappedStateAfterAction().getClass();
// System.out.println("Child " + str
// + " with action " + n.getLastAction().getAction() + " with probability " +
// n.getLastAction().getProbability());
// }
// } catch (ClassCastException e) {
// System.out.println("-------------\nNO CLASS CAST\n-------------"); // do nothing
// }
SearchBotAction action = node.getLastAction().getAction();
if(logger.isInfoEnabled())
logger.info("Stopped MCTS after "+root.getNbSamples()+" samples and choosing "+action);
// to calculate efficiency of sampling algorithms
// if (tableContext.getGameState().getRound() == Round.PREFLOP)