In this paper, we study the magnetic force generated by the combination of a
solenoid and a superconducting ring insert. We have focused our study on the
uniformity of the magnetic force. We use a genetic algorithm to determine the
optimal shape of the superconducting ring. We are able to obtain uniformity
of 0.5% variance. We also study the influence of several factors on uniformity,
such as the critical current of the coil, the ring, and the size of the working area.