This paper presents the application of genetic algorithm to determine optimized pulse patterns in multilevel inverters aiming to mitigate harmonics generated at the inverter output voltage while maintaining a desired modulation index. A new real representation based on a relative position approach is applied to the chromosome encoding in order to avoid the existence of infeasible solutions and a systematic diversity control of initial population is proposed based on the euclidean distance between individuals. A local search mechanism combined with an elitist selection is also considered. Fitness value frequency distribution, waveform patterns and its corresponding harmonic components are presented to illustrate the effectiveness of the proposed algorithm.