## 3 Experiments
### Car-Following Case  
Figure 4 provides a basic illustration of a typical car-following case. Our previous introduction shows that we first modeled scenarios for specific applications. The states and actions of a testing scenario can be described based on the interaction between HV and BV. In the car-following case, we mainly focused on horizontal interactions. As the decision of BV is influenced by velocity \(v\), relative velocity \(v_{r}\), and relative distance \(d_{r}\), a state is modeled as:  
\[s=state=(v,v_{r},d_{r}). \tag{15}\]  
The action of the testing scenarios is the acceleration \(acc\) of the BV. Therefore, the testing scenario is modeled as:  
\[\mathbb{S}=(s_{0},acc_{0},acc_{1},\cdots,acc_{k-1}), \tag{16}\]  
where \(s_{0}\) is the initial state and \(acc_{0},acc_{1},\cdots,acc_{k-1}\) is the acceleration sequence of the BV. We obtained the distribution and density of these parameters after analyzing the HighDand NGSIM, as shown in Figure 5. Then, in Table 2, the value range is determined. The discrete precision of velocity, distance, and acceleration was 1 m/s, 1 m, and 0.1 m/s\({}^{2}\):  
The most extended scenario duration was designed to be 25 s, and the control frequency of the action was 1 Hz, which means that the BV selects an acceleration every second. As mentioned in the scenario modeling section, the MDPs-based modeling approach shrinks the parameter space. It is time-consuming to traverse the whole scenario to compute their \(\mathcal{ESC}\) and find challenging scenarios with violent search algorithms. This study used the Markov property, \((s_{t},a_{t})\to s_{t+1}\), to choose the next action according to the current state. According to Table 2, the size of the space of states and action is:  
\[ \begin{split} size\_H(state)&=31\times 36\times 388=4.33 \times 10^{5},\\ size\_H(action)&=53.\\ \end{split}  \tag{17}\]  
\[ \begin{split} size\_N(state)&=30\times 40\times 209=2.51 \times 10^{5},\\ size\_N(action)&=69,\\ \end{split}  \tag{18}\]  
where \(size\_H\) means the data are from HighD, and \(size\_N\) means the data are from NGSIM. Therefore, the size of the space of \(\mathcal{ESC}\) matrix is \(size(state)\) times \(size(action)\):  
\[ \begin{split} size\_H(\mathcal{ESC}\ matrix)&=2.29 \times 10^{7},\\ size\_N(\mathcal{ESC}\ matrix)&=1.73\times 10^{7}.\\ \end{split}  \tag{19}\] \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Parameter (HighD)** & **v (m/s)** & \(v_{r}\) **(m/s)** & \(d_{r}\) **(m)** & **a (m/s\({}^{2}\))** \\ \hline maximum & 50 & 17 & 391 & 2.2 \\ minimum & 20 & \(-18\) & 4 & \(-3.0\) \\ \hline
**Parameter (NGSIM)** & **v (m/s)** & \(v_{r}\) **(m/s)** & \(d_{r}\) **(m)** & **a (m/s\({}^{2}\))** \\ \hline maximum & 29 & 20 & 210 & 3.4 \\ minimum & 0 & \(-19\) & 2 & \(-3.4\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Value range of parameters in car-following case. Figure 4: An illustration of car-following case. HV denotes a host vehicle. BV denotes a background vehicle. Figure 5: An illustration to show the distribution and density of parameters in the car-following case based on the HighD and NGSIM. Through \(\mathcal{ESC}\) matrix and the threshold, pruning selection greatly reduces the search space for challenging scenarios. Based on our preprocessed data and modeling method, \(\mathcal{E}(s,a)\) of the car-following case was designed as follows:  
\[\mathcal{E}(s,a)=P(acc|s). \tag{21}\]  
The result of \(\mathcal{TTC}[(s,a)]\) can be used to calculate \(\mathit{matncal}S(s,a)\). The \(\mathit{esc}\) matrix was obtained after many iterations. Figure 6 depicts the \(\mathit{esc}\) of a state (30,3,10) using HighD. The green curve represents the esc value and the red curve represents \(P(acc|s)\). When the threshold is set to zero, the figure shows that, when selecting the next BV action to generate challenging scenarios, more attention is paid to the BV's deceleration. This implies that both the frequency of occurrence and the level of risk are taken into account.