Based on the adaptive genetic algorithm,the optimized design of phase plates for shaping partially coherent beams is performed. Taking the Gaussian Schell-mode beam as an example,the analytical expression for the far-field intensity is derived and the phase plate capable of transforming GSM beams to flat-topped ones is optimized. The effect of spatial coherence on the beam shaping is illustrated by a numerial example. Comparison of the results with the previous work shows the advantages of the adaptive genetic algorithm in shaping partially coherenct beams.