Surrogate-Based Agents for Optimization