# Decision-Making Model for Dynamic Scenario Vehicles in Autonomous Driving Simulations
## 4 Decision-Making Model for Dynamic Scenario Vehicles  
[PERSON]'s theory states that human needs can be expressed hierarchically from a low to high level [5]. However, the motivations for driving are not identical to those in the regular pyramid of needs. Therefore, the five motivations mentioned in the previous subsection are prioritized as follows in this study.  
\[Priority:safety>order>achievement>relatedness>dominance \tag{1}\]  
For instance, the priority of safety motivation is higher than that of order motivation. Therefore, the scenario vehicle may consider order motivation only when the environment is sufficiently safe. Additionally, once a high-priority motivation appears, the scenario vehicle should discard the current motivation, despite the implemented behavior being generated from a low-priority motivation. For instance, if the safety motivation occurs when the scenario vehicle is implementing the behavior generated by the achievement motivation, the vehicle should immediately terminate this behavior and perform the behavior associated with the safety motivation.  
The study assumed that the behavior layer of the scenario vehicle determines the three main types of behaviors \(B\): changing speed (\(B_{changeSpeed}\)), changing lane (\(B_{changeLane}\)), and maintaining current motion (\(B_{idle}\)). Each behavior contains several actions. Among these, the \(B_{changeSpeed}\) set includes five actions: maintaining safe headway (\(b_{headway}^{cs}\)), emergent deceleration (\(b_{emerg}^{cs}\)), slowing down and stopping (\(b_{stop}^{cs}\)), complying with the speed limit (\(b_{limit}^{cs}\)), and giving way to others (\(b_{morality}^{cs}\)). The \(B_{changeLane}\) set includes four actions--that is, changing lanes to the target lane (\(b_{destination}^{cl}\)), changing lanes to the faster lane (\(b_{extinement}^{cl}\)), changing lanes to a random adjacent lane (\(b_{random}^{cl}\)), and aborting changing lanes (\(b_{short}^{cl}\)). The \(B_{idle}\) set includes two actions: maintaining the current speed and lane (\(b_{normal}^{cn}\)) and maintaining current speed and lane while alerting the front vehicle (\(b_{alert}^{cn}\)).  
Figure 1 depicts the overall structure of the proposed decision-making model. At the core of the behavior tree lies a selector node, comprising five child nodes representing different levels of motivation, along with a default state to ensure the tree's accuracy (Figure 1a). In this research, behavior trees were utilized to represent behavioral decisions, as they are widely employed in designing intelligent behaviors across various systems. These trees offer a hierarchical framework that facilitates the organization of smaller behavioral units, known as nodes, enabling the creation of complex and adaptable behaviors.  
The execution of a behavior tree initiates from the root, which sends periodic ticks to its child nodes. A tick serves as a triggering signal for the execution of a child node. When a node in the behavior tree becomes eligible for execution, it communicates its status to the parent node, indicating whether it is \"running\" (ongoing execution), \"success\" (goal achieved), or \"failure\" (goal not achieved).  
For this study, three control nodes (sequence, selector, and random selector) and two execution nodes (action and condition) were employed. The sequence node searches and executes the first child that has not yet succeeded. The selector node identifies and executes the first child that does not fail. The random selector node randomly selects and executes one of its child nodes. The condition node evaluates a specific condition and returns a success or failure status based on the evaluation. Finally, an action node represents a specific action or behavior that the agent or system should perform.