Optimization by n-homogeneous polynomial perturbations