Update BFS to find the best roots.