Implement bestValue in root_search.