public void printTree(int depth){
    if (depth > 5) return;
    for (int i = 0; i < depth; i++)
        System.out.print(" ");
    if (this.parent != null) {
        System.out.println(totalVisits + " " + totalScore + " " + getUCB(1.0, this.parent.totalVisits));
    } else {
        System.out.println(totalVisits + " " + totalScore + " " + getUCB(1.0, 0));
    }
    if (!isLeaf()) {
        for (MCTSNode son : sons)
            son.printTree(depth + 1);
    }
}

public void printTree() {
    printTree(0);
}