});
}
private void visitNode(INode node, final TreeItem previous) {
InnerNode parent = node.getParent();
final Round round = parent==null?startRound:parent.gameState.getRound();
final ProbabilityAction action = node.getLastAction();
final String actor = action.getAction().actor.equals(botId)?"Bot":"Player "+action.getAction().actor;
final TreeItemHolder holder = new TreeItemHolder();
final int nbSamples = node.getNbSamples();
final double average = node.getEV();
String stddev;
try {
stddev = ""+Util.parseDollars(node.getStdDev());
} catch (UnsupportedOperationException e) {
stddev = "?";
}
final String stddevf = stddev;
String nbSamplesInMean;
try {
nbSamplesInMean = node.getNbSamplesInMean()+"";
} catch (UnsupportedOperationException e) {
nbSamplesInMean = "?";
}
final String nbSamplesInMeanf = nbSamplesInMean;
final double evStadDev = node.getEVStdDev();
display.syncExec(new Runnable(){
@Override
public void run() {
TreeItem newItem = previous==null? new TreeItem(tree, SWT.NONE):new TreeItem(previous, SWT.NONE);
holder.item = newItem;
newItem.setText(new String[] { actor,
action.getAction().toString(),
round.getName(),
Math.round(100 * action.getProbability()) + "%",
""+nbSamples,
""+Util.parseDollars(average - relStackSize),
stddevf,
nbSamplesInMeanf,