Optimal control without solving the Bellman equation