'uct tree search'

def play(self, board):

    color = board.color
    node = self
    path = [node]
    while True:
        pos = node.select(board)
        if (pos == PASS):
            break
        board.move(pos)
        child = node.pos_child[pos]
        if (not child):
            child = node.pos_child[pos] = UCTNode()
            child.unexplored = board.useful_moves()
            child.pos = pos
            child.parent = node
            path.append(child)
            break
        path.append(child)
        node = child
    self.random_playout(board)
    self.update_path(board, color, path)
