## 2 Materials and Methods
### Data Analysis
#### 2.2.2 Model Development
The variable \(\alpha_{t}(j)\) can be calculated recursively by (i) initializing \(\alpha_{1}(i)\), as in Equation (4); (ii) calculating \(\alpha_{t+1}(j)\), as in Equation (5); and (iii) calculating \(P(|\lambda)\), as in Equation (6):  
\[\alpha_{1}(i)=\pi_{i}b_{i}(1),\ 1\leq i\leq N, \tag{4}\]  
\[\alpha_{t+1}(j)=b_{j}(_{t+1})\sum_{i=1}^{N}\alpha_{t}(i)a_{ij},\ 1\leq t\leq T-1,\ 1 \leq j\leq N, \tag{5}\]  
\[P(|\lambda)=\sum_{i=1}^{N}\alpha_{T}(i) \tag{6}\]  
In addition, the backward variable \(\beta_{t}(i)\) is defined as the probability of the partial observation sequence from \(t+1\) to the final given state \(S_{i}\) at time \(t\), as well as the model \(\lambda\). The variable \(\beta_{t}(i)\) is calculated recursively by (i) initializing \(\beta_{T}(i)\), as in Equation (7); and (ii) calculating \(\beta_{t}(i)\), as in Equation (8):  
\[\beta_{T}(i)=1,\ 1\leq i\leq N, \tag{7}\]  
\[\beta_{t}(i)=\sum_{j=1}^{N}\beta_{t+1}(j)a_{ij}b_{j}(_{t+1}),\ t=T-1,T-2, \cdots,1,\ 1\leq i\leq N \tag{8}\]  
The second problem is decoding, i.e., determining the most probable path of hidden states given the sequence of observations. A common means of solving this problem is the Viterbi algorithm [39; 40], which uses a forward-backward algorithm across the trellis of hidden states to find a single best-state sequence \(\mathbb{Q}=\{q_{1}q_{2}\cdots q_{T}\}\) for a given observation sequence \(O=\{O_{1}O_{2}\cdots O_{T}\}\). To do so, the highest probability \(\delta_{t}(i)\) along a single path at time \(t\) must be defined, which accounts for the first \(t\) observations and ends in state \(S_{i}\). The probability \(\delta_{t}(i)\) is defined as in Equation (9), and is calculated recursively, as in Equation (10):  
\[\delta_{t}(i)=\underset{q_{1},q_{2},\cdots,q_{t-1}}{\max}P\Big{[}q_{1}q_{2} \cdots q_{t}=i,O_{1}O_{2}\cdots O_{t}\big{|}\lambda\Big{]}, \tag{9}\]  
\[\delta_{t+1}(j)=\Big{[}\underset{i}{max}\ \delta_{t}(i)a_{ij}\Big{]}b_{j}(_{t+1}). \tag{10}\]  
The third problem is model learning, i.e., adjusting the model parameters \(\lambda=(A,B,\pi)\) to maximize the probability \(P(|\lambda)\) given the observation sequence. Several methods can be used to estimate the model parameters, the main ones being supervised learning algorithms and unsupervised learning algorithms. A supervised learning algorithm is a maximum likelihood estimation method [41; 42] that uses observation sequences and the corresponding state sequence data, while the unsupervised learning algorithm is a forward-backward algorithm that uses observation sequences. In the present study, the model parameters of participant behavior are obtained using supervised learning. Figure 6 shows a graphical representation of the two-state ergodic hidden Markov model (HMM) used in the behavior model development. Two types of behavior models were developed in this  
study, the success model \(\lambda_{Success}\) and the failure model \(\lambda_{Fail}\), which were trained by the sequence data observed from the success and the failure of collision avoidance, respectively. The developed behavior models were validated using model distance and model performance. Model distance evaluates the dissimilarity between two models [43], while model performance measures the correct answering percentile (%) for observations generated by the model. The model distances (\(MD_{Success}\) or \(MD_{Fail}\)) between \(\lambda_{Success}\) and \(\lambda_{Fail}\) were calculated as  
\[MD_{Success}=MD(\lambda_{Fail},\;\lambda_{Success})=\frac{1}{T}[log\;P(O_{Success }|\lambda_{Fail})-log\;P(O_{Success}|\lambda_{Success})],\]  
\[MD_{Fail}=MD(\lambda_{Success},\;\lambda_{Fail})=\frac{1}{T}[log\;P(O_{Fail}| \lambda_{Success})-log\;P(O_{Fail}|\lambda_{Fail})]\]  
where \(O_{Success}\) is the sequence of observations generated by model \(\lambda_{Success}\), and \(O_{Fail}\) is the sequence of observations generated by model \(\lambda_{Fail}\).