Fixed avg-optimal, moved to OptimalGenerator.