## 4 Creation of Two-Head Self-Adaptive Metaheuristic Algorithms
```
Step 1: Set parameters Step 1-1: Set two strategies, \(s_{1}\) and \(s_{2}\) Step 1-2: Set learning period \(LP\), probability \(f_{p}\)\(=0.5\) and crossover probability \(cr\)\(=0.5\) Step 1-3: Set population size \(NP\) and the number of generations \(G\) Step 2: Generate a population randomly and evaluate fitness function


```
Step 3-4: Update the success counter or failure counter \(H_{1}(\overline{u}_{gi})\geq H_{1}(z_{gi})\) \(z_{(g+1)i}=u_{gi}\) \(L\gets L\cup\{cr_{i}\}\) \(S_{s}=S_{s}+1\) Else \(U_{s}=U_{s}+1\) End If End For Step 3-5: Update the probability \(f_{p}\) and the crossover probability \(cr\)  If \(g\)MOD\(LP=0\) \(w_{1}=\frac{S_{s_{1}}}{(S_{s_{1}}+U_{s_{1}})}\) \(w_{2}=\frac{S_{2}}{(S_{s_{2}}+U_{s_{2}})}\) \(f_{p}=\frac{w_{1}}{w_{1}+w_{2}}\) \(c\!r=\frac{c(1+\frac{1}{2}-|L|)}{|L|}\) End If End For
```

**Algorithm 1****Cont. **

## 5 Results

The goal of this study is to validate whether the old saying \"Two heads are better than one\" holds for the two-head self-adaptive differential evolution algorithms created to solve the DGRP. That is, each two-head self-adaptive differential evolution algorithm is better than the corresponding two single-head differential evolution algorithms for solving the DGRP. In this study, it is assumed that the two distinct strategies used to create a two-head self-adaptive differential evolution algorithm are arbitrarily selected from the four DE mutation strategies defined in Table 3. Therefore, we can generate 6(=4!/(2!2!)) two-head self-adaptive metaheuristic algorithms. A series of experiments were designed to validate the aforementioned statement that the above saying holds for the two-head self-adaptive differential evolution algorithms created to solve the DGRP. To describe the experiments conducted in this study, let \(S\) = {1,2,3,4} denote the set of four mutation strategies defined in Table 3. Let us refer to the two-head self-adaptive metaheuristic algorithm created based on strategies \(s_{1}\) and \(s_{2}\) as \(SaNSDE(s_{1},s_{2})\), where \(s_{1}\in S\), \(s_{2}\in S\) and \(s_{1}\
eq s_{2}\). To validate that the above saying holds, we must show that the performance of \(SaNSDE(s_{1},s_{2})\) is better than those of \(DE(s_{1})\) and \(DE(s_{2})\). We conducted the experiments by applying \(SaNSDE(s_{1},s_{2})\), \(DE(s_{1})\) and \(DE(s_{2})\) to solve the same set of test cases. Table 4 lists all the experiments conducted in this study. In the first experiment, we compared \(SaNSDE(1,2)\) with \(DE\) (1) and \(DE\) (2). In the second experiment, we compared \(SaNSDE(1,3)\) with \(DE\) (1) and \(DE\) (3). In the third experiment, we compared \(SaNSDE(1,4)\) with \(DE\) (1) and \(DE\) (4). Similarly, we compared \(SaNSDE(2,3)\) with \(DE\) (2) and \(DE\) (3) in the fourth experiment and compared \(SaNSDE(2,4)\) with \(DE\) (2) and \(DE\) (4) in the fifth experiment. Finally, we compared \(SaNSDE(3,4)\) with \(DE\) (3) and \(DE\) (4). We introduce preparation of the data and the parameters used by the algorithms in the experiments as follows. The data of the test cases used in the experiments were generated randomly in a region in Taiwan. The method to generate data for test cases is general and can be applied to generate test cases for other regions in the world. The locations corresponding to the randomly generated data will be restricted to the specified region. A large region represents a large geographic area whereas a small region representsa small geographic area. Data generated with a large region are suitable for simulating long-distance ride sharing whereas data generated with a small region are suitable for short-distance sharing. The input data of each test case include the itineraries of drivers and the itineraries of passengers. An itinerary of a passenger includes an identification number, the location to pick up the passenger, the location to drop the passenger off, the original transport cost, the number of seats requested, the earliest departure time and the latest arrival time.