The objective of this study was to develop a method to optimize the selection and mating decisions based on genotypic information with overlapping generations by applying mate selection algorithm. In this study, differential evolution algorithm was used to optimize numbers of mating between genotypes and the optimal numbers of males and females selected from each genotype over planning horizon. This method assumed a single biallelic QTL (Q and q) and was applied to a simple situation in a herd of pigs as an example. Four dominance degrees of gene: recessive, additive, complete-dominance and over-dominance were considered. For all dominance degrees, the frequency of the favourable allele in males selected for replacement increased rapidly. In contrast, the frequency of favourable allele in females selected for replacement increased more gradually. The superiorities in cumulative discounted performance (CDP) when the initial allele frequency was 0.5 over a case when the frequency was 0.05 over the planning horizon were greatly affected by dominance degrees. The CDP superiorities ranged from 24% for an over-dominant QTL to 91% for a recessive QTL.