# Constrained Multi-Objective Optimization of Simulated Tree Pruning with Heterogeneous Criteria
## 2 Materials and Methods
### Optimization Method
The mating pool is also used by MOEA/D-EAM [27], but its selection scheme combines random selection with a neighborhood-based one. During crossover, special consideration is necessary when recombining parent vectors of different sizes. In such cases, the surplus genes of the longer parent vector are distributed uniformly between the two child vectors (Figure 5). Mutation of a child vector is performed in two steps. First, a randomly selected cut is relocated to a different valid position from \(\mathcal{I}_{\text{cut}}(\mathcal{T})\) with probability \(P_{\text{move}}\), removed from pruning with probability \(P_{\text{remove}}\), or added to pruning with probability \(P_{\text{add}}\). Cut addition and removal are possible only if the size of the resulting pruning vector remains within the range \([d_{\text{min}},d_{\text{max}}]\). In the second phase, all of the other cuts are replaced by randomly selected alternatives with small probability \(Mr\). The complete implementation of crossover and mutation is shown in Algorithm 2. The exploration/exploitation behavior of the search is regulated through meta-parameters \(Cr,Mr,\) and \(\boldsymbol{P}\). Sufficient exploration can usually be achieved even with small values of crossover and mutation rates, because local changes of a genotype (i.e., pruning vector) can result in significantly different phenotypes (i.e., pruned tree models). Figure 5: During crossover, the child vector components are uniformly sampled from the matching parts of parent vectors (shown in green), and the extra components of the longer parent (shown in red) are assigned independently and randomly to the offspring. ```
Input: parent vectors \(\mathbf{x_{1}}\) and \(\mathbf{x_{2}}\), crossover rate \(Cr\), mutation rate \(Mr\), change probability distribution \(\mathbf{P}=\langle P_{\text{move}},P_{\text{add}},P_{\text{remove}}\rangle\), vector length constraints \(d_{\text{min}}\) and \(d_{\text{max}}\)

Output: offspring vector \(\mathbf{y}\)
```
1:procedureGenerate_child(\(\mathbf{x_{1}},\mathbf{x_{2}},Cr,Mr,\mathbf{P},d_{\text{min}},d_{\text{max}}\))
2:if rand() < \(Cr\)then
3:\(l_{1}\leftarrow\text{length}(\mathbf{x_{1}})\), \(l_{2}\leftarrow\text{length}(\mathbf{x_{2}})\)
4:for\(i=1\ldots\text{min}(l_{1},l_{2})\)do
5:\(\mathbf{y}[i]\leftarrow\left\{ \begin{array}{ll}\mathbf{x_{1}}[i]&\text{if}\ rand()<0.5\\ \mathbf{x_{2}}[i]&\text{otherwise}\end{array} \right.\)
6:for\(i=\text{min}(l_{1},l_{2})+1\ldots\text{max}(l_{1},l_{2})\)do
7:if rand() < 0.5 then
8:\(\mathbf{y}[\text{length}(\mathbf{y})+1]\leftarrow\left\{ \begin{array}{ll}\mathbf{x_{1} }[i]&\text{if}\ l_{1}>l_{2}\\ \mathbf{x_{2}}[i]&\text{otherwise}\end{array} \right.\)
9:else
10:\(\mathbf{y}\leftarrow\left\{ \begin{array}{ll}\mathbf{x_{1}}&\text{if}\ rand()<0.5\\ \mathbf{x_{2}}&\text{otherwise}\end{array} \right.\)
11:\(l\leftarrow\text{length}(\mathbf{y})\)
12:if\(l=d_{\text{min}}\)then
13:\(P_{\text{remove}}\gets 0\)
14:elseif\(l=d_{\text{max}}\)then
15:\(P_{\text{add}}\gets 0\)
16: re-normalize \(\mathbf{P}\), \(r\leftarrow\text{rand}(1,l)\)
17:if\(r<P_{\text{remove}}\)then
18: remove \(\mathbf{y}[\text{rand}(1,l)]\) from \(\mathbf{y}\)
19:elseif\(r<P_{\text{remove}}+P_{\text{add}}\)then
20:\(\mathbf{y}[l+1]\leftarrow\mathcal{I}_{\text{cut}}[\text{rand}(1,|\mathcal{I}_{ \text{cut}}|)]\)
21:else
22:\(j\leftarrow\text{rand}(1,l)\)
23:\(\mathbf{y}[j]\leftarrow\mathcal{I}_{\text{cut}}[\text{rand}(1,|\mathcal{I}_{\text {cut}}|)]\)
24:for\(i=1\ldots l,i\
eq j\)do
25:if rand() < \(Mr\)then
26:\(\mathbf{y}[i]\leftarrow\mathcal{I}_{\text{cut}}[\text{rand}(1,|\mathcal{I}_{\text {cut}}|)]\)
27:return\(\mathbf{y}\) ```  
**Algorithm 2** Implementation of crossover and mutation.