# Population Dynamics in Genetic Programming for Dynamic Symbolic Regression
## 2 Materials and Methods
### Benchmark Data  
To investigate the performance of various algorithms, we provide different benchmark instances. These synthetic benchmarks not only serve as a means of evaluation but also provide the base for a detailed analysis of the algorithmic behavior in dynamic scenarios. In this paper, we use five different problem instances drawn from two sources. In all cases, the distributions for the independent variables remain fixed, and the generating function comprises various terms of these independent variables. Depending on the hidden-state variable, certain terms are consistently present, while others may be gradually or abruptly enabled and disabled over time. The first three benchmark instances are adapted from the work of [PERSON] et al. [41] to suit a dynamic optimization environment. These instances are defined as follows:  
\[W1(x,h) =x_{1}(hx_{2}+(1-h)x_{3}), \tag{3}\] \[W2(x,h) =\alpha_{2}(x_{1}x_{2}+x_{3}x_{4})+\beta_{2}(hx_{5}x_{6}+(1-h)x_{ 7}x_{8})\text{ and }\] (4) \[W3(x,h) =\alpha_{3}(x_{1}x_{2}x_{3}+x_{4}x_{5}x_{6})+\beta_{3}(hx_{7}x_{8 }+(h-1)x_{9}x_{10}), \tag{5}\]  
where \(\alpha\) and \(\beta\) scale the respective terms to have equal variance. All input variables \(x_{1}\ldots x_{10}\) are drawn from a uniform distribution \(\mathcal{U}\) between \(1\) and \(10\). To enable gradual transitions between states, as outlined in the original paper, we employ a substantial number of epochs, progressively adjusting the hidden-state variable \(h\) in each epoch. The state changes unfold over multiple epochs, featuring abrupt, fast, and slow transitions from zero to one, and vice versa. This dynamic evolution is precisely defined by the following sequence:  
\[[1]_{100}\;[1\!\!\rightarrow\!\!0]_{10}\;[0]_{100}\;[1]_{100}\;[1\!\!\rightarrow\! \!0]_{50}\;[0]_{100}\;[0\!\!\rightarrow\!\!1]_{20}\;[1]_{50}\;[0]_{100}\;[0 \!\!\rightarrow\!\!1]_{10}\;[1]_{10}\]  
Here, \([a]_{n}\) denotes a constant value of \(a\) for a duration of \(n\) epochs, while \([a\!\!\rightarrow\!\!b]_{n}\) indicates linearly spaced values between \(a\) and \(b\) over the course of \(n\) epochs. The visual representation of this progress is depicted in Figure 4.  
The next two benchmark instances draw inspiration from the benchmark generation procedure proposed by [PERSON] (1986), adapted for dynamic optimization. Unlike the single hidden state employed in the previous benchmarks, the Friedman-based benchmarks involve three states \((h_{t,a},h_{t,b},h_{t,c})=h_{t}\in[0,1]^{3}\), each independently controlling specific terms. The data for each term \(i\) are generated independently using the random function generator described by [PERSON] (1986), denoted as \(X_{i}\) and \(F_{i}^{*}(X_{i})\), representing the calculated target by the generator. The final target is derived as the weighted sum of the term targets, with their state factors incorporated:  
\[y=F(X,h)=\sum_{i=1}^{i<3}(F_{i}^{*}(X)h_{i}-\mu_{i})/\sigma_{i}, \tag{6}\]  
where \(i\) represents the terms, and the mean \(\mu_{i}\) and standard deviation \(\sigma_{i}\) of the generated targets for each term are utilized to normalize the generated targets before summation. The inputs per term are concatenated, and the variable names are assigned according to the term, with a letter and a number denoting the nth variable of the term (e.g., \(\mathtt{a}_{1},\mathtt{a}_{2},\ldots,\mathtt{b}_{1},\ldots\)), resulting in the total training inputs. The Friedman benchmark-generating procedure enables the control of the number of input features per term and the amount of noise. A higher number of features increases the instance's difficulty due to the increased size of each term. For this paper, we omitted the use of any noise, setting the noise parameter to 0.0. In the case of Friedman-based benchmarks, we only implement abrupt state changes with a limited number of epochs. This deliberate choice ensures a slower epoch clock, allowing ample time for evolution before each epoch change. The progression unfolds as follows:  
\[