New trainer that uses an evaluation function to train an optimization algorithm until it stops improving for some number of iterations