1. An apparatus for creating a program by genetic programming, the apparatus comprising: a memory configured to store a plurality of partial programs, which are constituent elements of an image recognizing program that detects a position of a template image on an input image; and a processor coupled to the memory, configured to: perform an individual creation process to create a plurality of individual programs each being a combination of at least two of the plurality of partial programs, calculate a similarity map that associates similarity with the template image with each pixel of the input image by using each of the plurality of individual programs, perform a fitness calculation process to calculate fitness for each of the plurality of individual programs, based on a distribution of the similarity map, select an individual program for which the fitness is equal to or greater than a prescribed threshold, from among the plurality of individual programs, and output the selected individual program as the image recognizing program.