Energy analyzers are designed specifically to distinguish electrons according to their energies. In these experimental devices, electron beam is focused on the entrance of the detector is vital for the prevention of experimental data loss. In this study, the optimum optical parameters when the electron beam is focused on the detector were obtained by the genetic algorithm, an innovative method. It was used to find the optical parameters of hemispherical deflector analyzers that provide the best focus on the detector. The results of this pilot study indicated that genetic algorithm gave a rapid solution when compared to the traditional methods such as Boundary Element (BEM) and Finite Difference Methods (FDM) for electron energy analyzers. Thanks to the genetic algorithm software prepared in this study, all parameters of the hemispherical deflector analyzer can be calculated simultaneously and in a short time.