Localization microscopy enables imaging with resolutions that surpass the conventional optical diffraction limit. Notably, the Maximally INFormative LUminescence eXcitation (MINFLUX) method achieves super-resolution by shaping the excitation point spread function (PSF) to minimize the required photon flux for a given precision. Various beam shapes have recently been proposed to improve localization efficiency, yet their optimality remains an open question. In this work, we deploy a numerical and theoretical framework to determine optimal excitation patterns for MINFLUX. Such a computational approach allows us to search for new beam patterns in a fast and low-cost fashion and to avoid time-consuming and expensive experimental explorations. We show that the conventional donut beam is a robust optimum when the excitation beams are all constrained to the same shape. Further, our PSF engineering framework yields two pairs of half-moon beams (orthogonal to each other), which can improve the theoretical localization precision by a factor of about two.