Find the Optimal Algorithm for Control