Flowchart of the GA-based CTPP primer design. At first, a random initial population is generated and then all fitness values of all chromosomes in the population are calculated by the fitness function. A judgment on termination conditions is carried out, and if the termination conditions are reached then the algorithm will be finished, or else the algorithm proceeds with the following processes. Selection, crossover and mutation operations are performed and finally the worst chromosomes are replaced by the better chromosomes. The procedure is repeated in the next iteration until the termination conditions are reached.