The aberration theory of planesymmetric optical systems recently developed is applied to the merit function of extreme ultraviolet (XUV) grating instrument defined; consequently the merit function can be expressed as a function of optical parameters. This merit function of multiple parameters is optimized with the cooperative coevolutionary genetic algorithms. The optimization program is set up, which is then used to optimize a XUV flatfield spectrograph system; the ray tracing calculations to the optical system are made with the program Shadow. The imaging calculations show that the merit function is a very useful means to optimize the XUV multielement grating instruments.