*2.1. Genetic Programming*

Genetic programming (GP) is an evolutionary computing algorithm [39], which simulates natural selection and biological evolution and automatically generates the best computer program based on the problem in the search space [40]. In GP, the individual represents the candidate's solution to the problem. In the process of evolution, GP evaluates individual fitness, simulates the survival principle of survival of the fittest, and guides the population to carry out genetic operations (replication, crossover, and mutation) to renew the population. The goal of the GP algorithm is to gradually make some individuals in the population have better performance through several generations of evolution.

Figure 1 shows the flow chart to develop GP. First, a predetermined number of individuals are created as an initial population by randomly combining different elements of the function set and terminator set according to the program structure. Fitness values are then given to every individual. The fitness value reflects the ability of the individual to solve problems where the higher the value, the better the individual's performance. After that, individuals are selected based on fitness values, and those with higher fitness are more likely to be selected. Genetic evolution of selected individuals is used to generate the next generation's population. Individuals in the new population are repeatedly evaluated, selected, replicated, crossed, and mutated to complete genetic evolution. This stops when the maximum number of evolutions is reached or a certain condition is met. The best solution to the problem is the individual with the best fitness value.

**Figure 1.** The flowchart of GP.
