In this paper, we propose to apply a technique of optimization of the convergence of the auxiliary sources method (MAS) for the problems of electromagnetic diffusion by a perfectly conducting and infinite obstacle. This technique is based on the use of the genetic algorithm (GA). Previous studies have shown that the convergence of the MAS solution depends on many parameters such as the number of auxiliary sources and the auxiliary distance between the real surface of the cylinder and the fictitious surface, and so on. The solution is obtained for a good choice of these parameters. In this article, the genetic algorithm is chosen to facilitate the choice of MAS parameters.