Safe Hybrid-Action Reinforcement Learning-Based Decision and Control for Discretionary Lane Change

Autonomous lane-change, a key feature of advanced driver-assistance systems, can enhance traffic efficiency and reduce the incidence of accidents. However, safe driving of autonomous vehicles remains challenging in complex environments. How to perform safe and appropriate lane change is a popular topic of research in the field of autonomous driving. Currently, few papers consider the safety of reinforcement learning in autonomous lane-change scenarios. We introduce safe hybrid-action reinforcement learning into discretionary lane change for the first time and propose Parameterized Soft Actor-Critic with PID Lagrangian (PASAC-PIDLag) algorithm. Furthermore, we conduct a comparative analysis of the Parameterized Soft Actor-Critic (PASAC), which is an unsafe version of PASAC-PIDLag. Both algorithms are employed to train the lane-change strategy of autonomous vehicles to output discrete lane-change decision and longitudinal vehicle acceleration. Our simulation results indicate that at a traffic density of 15 vehicles per kilometer (15 veh/km), the PASAC-PIDLag algorithm exhibits superior safety with a collision rate of 0%, outperforming the PASAC algorithm, which has a collision rate of 1%. The outcomes of the generalization assessments reveal that at low traffic density levels, both the PASAC-PIDLag and PASAC algorithms are proficient in attaining a 0% collision rate. Under conditions of high traffic flow density, the PASAC-PIDLag algorithm surpasses PASAC in terms of both safety and optimality.


Introduction
In recent years, with the continuous development of technology, the research and development of Advanced Driver-Assistance Systems (ADAS) have been dedicated to improving traffic safety levels by reducing the impact of human errors.According to data from the World Health Organization (WHO), road traffic accidents cause nearly 1.3 million deaths and approximately 50 million injuries worldwide each year.Extrapolating from this trend, road traffic accidents could result in approximately 13 million deaths and 500 million injuries over the next decade [1].
With the rapid advancement of autonomous driving technology, there has been a gradual enhancement in driving comfort, safety, and user experience.Nowadays, lane change is a challenging task that necessitates precise maneuvers to ensure it is conducted safely, comfortably, and swiftly.The lane change includes both mandatory and discretionary changes [2]: (1) Mandatory lane change refers to the motion planning of lane change in situations where it is imperative to do so.Scenarios for mandatory lane change include merging from entrance ramps and changing lanes in the presence of obstacles ahead [3].
(2) Discretionary lane change are decision made by a vehicle to change lanes when it is not demanded due to road conditions, but rather motivated by factors such as speed optimization, driving efficiency, or driver preference.Unlike mandatory lane change, which occur because of immediate necessities such as road obstructions, construction, or merging, discretionary lane change offer an additional layer of complexity to autonomous vehicle algorithms.
(1) Rule-based decision models use a set of predefined, hand-crafted rules to simulate the decision-making process of drivers.These rules may include adherence to traffic regulations, such as stopping at red lights and proceeding at green lights.The model is highly interpretable because the rules are clear and straightforward, making them easy to understand and maintain.However, rule-based models may lack flexibility when dealing with complex driving environments and unknown situations because hand-crafted rules may not easily adapt to such complexities and uncertainties [4,7].
(2) On the other hand, learning-based decision models rely on data-driven approaches and training models on large-scale driving data to autonomously learn and adapt to different driving conditions.These methods employ deep learning techniques that utilize neural networks and machine learning algorithms to address complex driving decision problems.Although this approach excels in adapting to varied driving scenarios, it has relatively poor interpretability, and there is no guarantee of safety during the training process.Most current learning-based articles are dedicated to using deep reinforcement learning techniques for discretionary autonomous lane-change control of self-driving vehicles [10][11][12][13][14][15].
In [10], the author proposes a framework that integrates deep reinforcement learning with Q-masking to enhance the efficiency of autonomous vehicle lane-change.In [9], the author enhanced the efficiency of the deep Q-learning [16] algorithm and applied it to the scenario of autonomous lane change.In [11], the author introduces an automated lane change method based on reinforcement learning, designing a Q-function approximator with a closed-form greedy policy capable of achieving smooth and efficient driving strategies in various and unpredictable scenarios.In [12], the author develops a deep reinforcement learning agent capable of robustly executing automated lane-change in dynamic and uncertain highway environments, demonstrating superior performance over traditional heuristic-based methods through training in diverse, uncertain, and noisy traffic scenes.In [13], the author applies deep reinforcement learning to address the challenge of successful merging or lane change for autonomous vehicles in high-density traffic, establishing a benchmark for driving in high-density traffic conditions.
The majority of the literature currently employs discrete reinforcement learning for implementing autonomous lane change [9][10][11][12][13][14][15], where the high-level control outputs lane change decision using discrete reinforcement learning, and low-level control uses carfollowing models such as the Intelligent Driver Model (IDM) [17] to output vehicle acceleration.The decision making and motion planning modules, as two closely adjacent and important functional modules of autonomous vehicles, are highly interrelated in terms of functionality and ultimate performance.Therefore, the design of the decision-making process should take into account the feasibility of motion planning.Likewise, motion planning should be formulated based on the decision made [18].Therefore, in our work, we have adopted a hybrid action space to simultaneously address discrete lane change decision and continuous longitudinal acceleration control.
To apply deep reinforcement learning to autonomous lane change in real vehicles, ensuring the safety of decision-making is essential.There is a paucity of literature considering the safety aspects of autonomous lane change.Given the absence of research using safe reinforcement learning to ensure the safety of autonomous lane change, our paper uses the PID-Lagrangian based safe reinforcement learning approach [19] to implement autonomous lane change.In [20], the author proposes a decision-making framework for autonomous vehicles in lane-change scenarios based on deep reinforcement learning with risk awareness.In [21], the author uses a human driving lane-change decision model combined with regret theory to improve the safety and efficiency of autonomous vehicles in mixed traffic.However, neither of these studies uses the method of safe reinforcement learning.In [22], the author introduced a safe reinforcement learning algorithm into the field of autonomous driving, combining the Proximal Policy Optimization (PPO) algorithm [23] with a PID-Lagrangian approach to enhance the traffic compliance of motion planners for self-driving vehicles.
Safe reinforcement learning [24] is a type of reinforcement learning that incorporates the concepts of safety or risk.Specifically, safe reinforcement learning emphasizes not only pursuing long-term maximum returns during the learning and implementation phases but also adhering to established safety constraints while ensuring reasonable system performance.Compared to Constrained Policy Optimization (CPO) algorithms [25] and safety reinforcement learning algorithms based on Lyapunov functions [26], the Lagrangianbased safe reinforcement learning algorithm is simpler.Moreover, the Lagrangian-based safe reinforcement learning algorithm performed equally well or even better in tests within the Safety Gym environment [27], despite the oscillations and overshooting observed during the learning process which can lead to constraint violations by the agent when applied in practice.Therefore, we used a PID-based Lagrangian method [19].From a control perspective, traditional Lagrange multiplier updates behave as integral control, whereas the PID-based approach introduces proportional and differential control to stabilize the learning process of the agent.
To the best of our knowledge, there are no existing studies that apply safe hybrid action space algorithms in the domain of autonomous lane change.To bridge this gap, we introduce a methodology that aims to augment the safety and reliability of autonomous systems.The contribution of this paper includes the introduction of a novel safe hybrid action reinforcement learning algorithm, PASAC-PIDLag, and its application to the autonomous lane-change scenarios.We conducted a comprehensive and quantitative comparison between PASAC-PIDLag and PASAC, demonstrating that PASAC-PIDLag outperforms PASAC in terms of both safety and optimality.
Regarding the structure of the paper, Section 2 presents the PASAC-PIDLag and PASAC algorithms, Section 3 discusses the application of the algorithms in lane-change scenarios, Section 4 addresses the experiments and results, and Section 5 presents the conclusions.

Reinforcement Learning Preliminaries
Reinforcement learning is a computational approach for learning from interaction.In this paradigm, an agent takes actions based on the current state of the environment at each time step.As a result, the environment transitions to another state on the next time step, and the agent receives a reward based on the action taken.Both the actions taken by the agent and the rewards provided by the environment are probabilistic.The goal of an RL algorithm is to maximize the expected discounted cumulative reward over each episode.
The formalism used to model the environment and the agent's interactions within it in RL is the Markov Decision Process (MDP).An MDP is defined as a tuple (S, A, R, P, γ), where S is a finite set of states of the environment.A is a finite set of actions that the agent can choose from.P is the state transition probability matrix, with P(s ′ |s, a) representing the probability of transitioning from state s to state s ′ after the agent takes action a. R is a reward function, with R(s, a) representing the immediate reward the agent receives after taking action a in state s.γ is the discount factor, typically within the range 0 ≤ γ ≤ 1, which determines the present value of future rewards.
The agent's objective is to discover a policy π, which is a mapping from states to the probabilities of selecting each possible action, π : S → A, that maximizes the expected sum of discounted rewards.The optimal policy π * can be formally defined as: RL algorithms, such as Q-learning [28], double Q-learning [29] and proximal policy optimization, are employed to estimate π * by leveraging the dynamics defined by the MDP.

Soft Actor-Critic
The Soft Actor-Critic (SAC) algorithm [30] is an off-policy, actor-critic reinforcement learning algorithm that incorporates the principles of entropy maximization to balance exploration and exploitation.SAC employs two types of neural networks: soft Q-networks that approximate the soft Q-functions, and policy networks that generate probabilities distribution over actions.The policy network is trained to maximize the expected reward and entropy, leading to robust and efficient learning.The SAC algorithm optimizes the following entropy-augmented objective function: where π is the policy, θ are the parameters of the policy, r(s t , a t ) is the immediate reward for action a t in state s t , ρ π is the distribution over states and actions under policy π, H is the policy entropy, and α is the entropy coefficient.SAC uses two Q-networks, Q ϕ 1 and Q ϕ 2 to evaluate the policy.The objective of the Q-network, J Q (ϕ i ), is defined as the expected squared error between the current Q-function and the target: where ã′ is action sampled from the current policy.
The policy update gradient is: To stabilize learning, SAC employs soft target updates to slowly update the target network parameters ϕ ′ i : where τ is a small number close to 0, indicating the rate at which the target network parameters are updated.

Parameterized Soft Actor-Critic
In the SAC algorithm, actions are selected according to a stochastic policy.This policy is typically parameterized as a Gaussian distribution, allowing the model to capture a range of possible actions.Action at each timestep t is sampled from this distribution, which is conditioned on the current state s t : where µ θ (s t ) and Σ θ (s t ) are the mean and covariance of the policy's Gaussian distribution, respectively, and are functions of the current state s t parameterized by θ.This stochastic policy approach allows exploration of the action space, which is an essential aspect of effective reinforcement learning.Building upon the conventional SAC algorithm, we introduce the Parameterized Soft Actor-Critic (PASAC) algorithm, which is designed to operate within environments that have both discrete and continuous action spaces.In the PASAC algorithm, the policy's output consists of a continuous action along with the probability of discrete actions.Let A d = {a 1 , a 2 , . . ., a k }, where each action a i ∈ A d is associated with a set of continuous parameters p a i = {p a1 , p a2 , . . ., p ak } ⊆ R k .Therefore, the action space is represented as A = {a continue , a 1 , a 2 , . . ., a k }, including continuous and discrete actions.

Parameterized Soft Actor-Critic with PID Lagrangian
The Constrained Markov Decision Process (CMDP) [31] extends the MDP framework by augmenting it with constraints restricting the set of feasible policies.A CMDP is characterized by the expanded tuple (S, A, R, P, γ, c, d), where c the cost function, and d the corresponding cost limit.
The objective of a CMDP is to optimize policy π, yielding the highest expected sum of discounted rewards over trajectories, while keeping the expected sum of discounted costs within certain bounds.Formally, in a CMDP formulation, the RL problem finds the optimal policy π * that solves: where J R (π) represents the expected reward for the policy π, while J C (π) denotes the cost associated with the policy π.
In this study, we address the constrained problem by employing the Lagrangian method, which allows us to convert a constrained problem into an unconstrained optimization problem.Lagrangian techniques are a well-established approach for tackling optimization problems that include constraints.Given a CMDP, the unconstrained problem can be written as: where L is the Lagrangian and λ ≥ 0 is the Lagrangian multiplier (a penalty coefficient).
In the traditional Lagrangian multiplier method, updates consider only integral control, which is related to the accumulation of constraint violations.Such updates can be conducted within the framework of the Lagrangian method by solving the dual problem, in which the multipliers are adjusted over time to satisfy the constraints.
The Lagrangian multiplier update formula (traditional integral control) can be represented as: where α λ is the learning rate of λ In the PID method, the dual update rule is enhanced by adding proportional (P) and derivative (D) controls to the existing integral (I) term, with the goal of reducing oscillations in system output and providing a quicker response to safety constraint violations.This PID Lagrangian approach is designed to overcome the limitations of previous methods by modifying the update rule to include P and D terms that are directly related to the constraint function.The new PID Lagrangian update rule is expressed as: where e(t) = J C (π θ ) − d is the constraint violation at time t, with d being the target value for the constraint.K p , K i , and K d are the proportional, integral, and derivative gains, respectively.The proportional term K p e(t) accounts for the current magnitude of the constraint violation, the integral term K i e(t) dt considers the accumulated error over time, and the derivative term K d d dt e(t) takes into account the rate of change of the error.This combination helps to satisfy the constraints more quickly and smoothly during the learning process.The pseudocode of the PASAC-PIDLag algorithm is shown in Algorithm 1.
Algorithm 1 Parameterized Soft Actor-Critic with PID Lagrangian 1: Algorithm: for each gradient step do 12: {s, a cont , a disc , r, c, s ′ } ∼ D ▷ Sample batch 13: ▷ Update policy parameters 15: end for 22: end for

Lane Change Environment
The lane change environment is created in the Simulation of Urban Mobility (SUMO) [32] driving simulator.We use a two-lane road with a length of 1 km as our training road, and subsequently, testing is conducted on the same road.In this paper, the perception range of the vehicles is a circle with a radius of 200 m, and we assume that our vehicle can accurately perceive the status of all vehicles within its perception range, including itself.The other vehicles on the road have an initial speed of 8.33 m/s and a maximum speed of 16.67 m/s, and they use the IDM [17] model for longitudinal control, and the SL2015 [33] model for lateral control.In this study, we train with a traffic flow density of 15 veh/km.As shown in Figure 1, the red vehicle represents the ego vehicle, and the green vehicles represent other vehicles.

Environment State
In this paper, the state is characterized by ten variables: the distance d F 0 between the ego vehicle and the vehicle in front, the distance d R 0 between the ego vehicle and the vehicle behind, the distance d F 1 between the ego vehicle and the vehicle in front on the target lane, and the distance d R 1 between the ego vehicle and the vehicle behind on the target lane, as well as the speeds v F 0 , v F 1 , v R 0 , v R 1 of these four vehicles, and the speed v ego and acceleration a ego of the ego vehicle.

Control Action
In this study, the continuous action of the control output is acceleration, and the discrete action is the lane-change decision.Vehicle dynamics and latency are not considered; hence, the vehicle instantaneously executes upon receiving an acceleration command or a lane-change decision.The update of the vehicle's velocity and position occurs with a time step of 0.1 seconds, while the lane-change decision is output every 1 second.Moreover, accounting for the actual vehicle's limits, the interval for continuous actions, is defined as [a min , a max ] = [−9.8,5.0] m/s 2 , where a min and a max represent the minimum and maximum acceleration, respectively.
The action space is defined as a tuple A = (a continuous , a discrete ), where: a continuous represents the continuous control of the vehicle's acceleration, bounded by a ∈ [−a max , a max ]. a discrete is the discrete lane-change decision, where a discrete = 1 indicates a lane change to another lane, and a discrete = 0 signifies maintaining the current lane.

Reward and Cost
In the context of autonomous vehicle control, reward and cost functions are designed to promote safe, efficient, and comfortable driving behaviors.These functions are itemized as follows: Reward: • r lc :The penalty r lc is for unnecessary lane change, which discourages erratic maneuvers.• r spd : The reward r spd is for maintaining a target speed range and the penalty for deviations enforces speed limits.• r dis : The penalty r dis is for not maintaining safe following distances, which encourages the vehicle to maintain a safe distance from others.• r collision :The heavy penalty r collision is for collisions, which prioritizes safety.• r jerk :The penalty r jerk is for sudden changes in acceleration, which ensures ride comfort.

Cost:
• Time-To-Collision (TTC): Increases the cost when the potential for a collision is detected within a specified timeframe, promoting proactive collision avoidance.
The rewards and cost described above are included at each time step: (1) This reward function aims to reduce meaningless lane change caused by the ego vehicle.(2) To ensure that the ego vehicle maintains a speed within a specified range, and to facilitate its rapid approach to the destination when there are no vehicles ahead, we devised the following reward function.Here, d safe represents the safe following distance from the vehicle ahead in the same lane, which is set to 25m in this study.v limit denotes the minimum speed limit for the lane when the distance to the vehicle ahead exceeds the safe distance.
(3) To facilitate the ego vehicle's acquisition of car-following behaviors and to mitigate the risk of collisions, we devised the following reward function predicated on the vehicleto-vehicle distance metric: In the formula, d R0 represents the distance to the rear vehicle in the same lane, and d F0 denotes the distance to the forward vehicle in the same lane.
(4) To instruct the ego vehicle to autonomously navigate lane change while mitigating collision occurrences, a penalty of r collision = −200 is incurred following each collision event.
(5) To reduce the jerk during the ego vehicle's motion, we defined the following reward function: The term a t represents the acceleration of the ego vehicle at the current time step, and a t−1 represents the acceleration of the ego vehicle at the previous time step.(6) For safe reinforcement learning, we employ TTC as a cost metric.TTC is expressed as: Where v ego represents the velocity of the ego vehicle, v other denotes the velocity of other vehicles, and d relative indicates the relative distance between the ego vehicle and other vehicles.When the TTC between the ego vehicle and either the leading or following vehicle is less than 2.7 seconds but greater than 0, the cost is incremented by 1; if the TTC is equal to or greater than 2.7 seconds or TTC is not calculable (due to no vehicle being present), the cost remains at 0. For the PASAC algorithm, the total reward at each timestep is given by: r total = r lc + r spd + r dis + r jerk + r collision (18) For the PASAC-PIDLag algorithm, the total reward and cost at each timestep is given by:

Experiments and Results
In this section, we present the training results of the two algorithms under a traffic density of 15 veh/km, while also comparing the safety and optimality of the two algorithms under traffic densities of 10 veh/km, 15 veh/km, and 18 veh/km.

Training
Our training setup consisted of an NVIDIA RTX 3060 GPU and an Intel i7-12700F CPU, with each training session running for approximately 5 hours and covering 400,000 timesteps.The timestep interval was set at 0.1 seconds to better reflect real-world scenarios.Additionally, we initialized vehicles on the main road within a 50-meter buffer zone at the start of each episode.
The hyperparameter configurations for the PASAC-PIDLag and PASAC algorithms are listed in Table 1. Figure 2 illustrates the training curves for both algorithms.It is important to note that, unlike PASAC-PIDLag, the PASAC algorithm does not incorporate cost in its gradient updates.From the training curves, we can discern that regardless of whether we consider reward or cost, the PASAC-PIDLag algorithm demonstrates superior performance.

Testing
In our experiments, we evaluated the performance of the trained policy over 400 episodes under a traffic density of 15 veh/km, encompassing approximately 300,000 timesteps.At the onset of each episode, the initial velocity of the ego vehicle was set to 8.33 m/s (equivalent to 30 km/h).Moreover, to assess the generalizability of our approach, we also conducted tests on the aforementioned strategy at traffic densities of 10 veh/km and 18 veh/km.

Comparison and Analysis
Based on the results obtained from the dataset of 400 test episodes, as shown in Table 2, it is evident that the PASAC-PIDLag algorithm outperforms the PASAC algorithm on multiple evaluation metrics.The PASAC-PIDLag algorithm exhibits a notably lower collision rate, indicating a safer driving policy adept at mitigating the risk of accidents more effectively.In addition, this algorithm necessitates fewer lane-change maneuvers, suggesting a more stable and efficient driving behavior with the potential to diminish disruptive actions within the traffic flow.In terms of velocity, the PASAC-PIDLag algorithm achieves a higher average speed, which is a pivotal factor in enhancing the rate of transport.Moreover, the metric of jerk is significantly reduced for the PASAC-PIDLag algorithm.A lower jerk signifies a smoother driving experience, which translates to increased comfort for the occupants.Upon comprehensive consideration of these performance indicators, the PASAC-PIDLag algorithm surpasses the PASAC algorithm in terms of both optimality and safety.Figure 3 provides an analysis of a lane-changing episode under the PASAC-PIDLag algorithm.Subsequent to this lane-change event, there is an immediate and discernible change in the distance to the preceding vehicle, indicative of the completion of the lane change.The graph detailing relative distance demonstrates that the vehicle initiates the lane change maneuver when it is at a safe following distance of approximately 25 meters.Moreover, the velocity graph depicts a modest escalation in the ego vehicle's speed following the lane change, which is shortly followed by a decrease.Figure 4 presents an example of a successful lane change maneuver executed by the PASAC-PIDLag algorithm.Figure 7 illustrates another scenario in which a collision occurs under the PASAC algorithm, where the ego vehicle collides during the car-following process.The data and the figure reveal that the ego vehicle approaches the lead vehicle at a constant speed; however, due to the presence of a vehicle on the adjacent lane, the ego vehicle is unable to change lanes, resulting in a collision.Figure 8 presents an example of a collision involving an ego vehicle trained using the PASAC algorithm in a car-following scenario.A comparison of lane-changing decision between PASAC and PASAC-PIDLag demonstrates that the strategy derived from the PASAC algorithm is sometimes incapable of effectively balancing the decision related to lane changing and car following under certain conditions.

Generalization Analysis
To evaluate the generalizability of the proposed algorithm, we conducted tests under a traffic density of 10 veh/km, and the results are presented in Table 3.The data presented in Table 3 reveal that at such a reduced vehicular density, both algorithms demonstrated the ability to maintain a collision rate of zero.Notwithstanding this equivalence in safety, the PASAC-PIDLag algorithm surpassed its counterpart PASAC by securing a greater average reward, attaining a higher mean velocity, and exhibiting a lower jerk metric.These findings imply that PASAC-PIDLag not only meets safety benchmarks but also excels in performance, offering an enhanced level of optimality over the PASAC algorithm.Our final series of tests were conducted at a traffic flow density of 18 veh/km, the results outlined in Table 4 reveal that at this higher density, the collision rate of the PASAC-PIDLag algorithm remained lower than that of PASAC.Furthermore, the PASAC-PIDLag algorithm demonstrated superiority in all measured metrics, including average reward, average speed, and average jerk.

Conclusion
In this paper, we introduce PASAC-PIDLag, a hybrid action space safe reinforcement learning algorithm, specifically applied to the scenario of autonomous lane-change.This method represents a novel approach that aims to enhance both safety and optimality in the application of reinforcement learning in the autonomous driving domain.We also compare it with its unsafe version PASAC.Both algorithms were trained and tested under traffic flow density scenarios of 0.15veh/km and underwent generalization tests at densities of 0.10veh/km and 0.18veh/km.The results indicate that in the absence of modeling errors, at a density of 15 veh/km, the strategy trained by the PASAC-PIDLag algorithm managed to maintain zero collisions.However, the collision rate for the PASAC algorithm was observed to be 1%.The PASAC algorithm was observed to encounter two types of collisions at a density of 15 veh/km.Because the reward structure in this study involves both lane changing and car following, it inherently presents a multi-objective optimization problem, which may lead to collisions arising from unsuccessful lane changing or car following maneuvers.Both algorithms achieved zero collisions at a traffic flow density of 10 veh/km.At a higher density of 18 veh/km, the collision rate of the PASAC-PIDLag algorithm was lower than that of the PASAC algorithm.Across the three traffic densities, the PASAC-PIDLag algorithm consistently achieved higher average speeds, lower average jerk, and greater average rewards.Overall, the PASAC-PIDLag algorithm shows superior performance with respect to safety and optimality.In future work, we aim to advance the application of safe reinforcement learning in actual vehicles by conducting hardware-inthe-loop simulation experiments.

Figure 1 .
Figure 1.Lane change environment created using SUMO, with the ego vehicle depicted in red and other traffic participants in green.

r lc = − 4 ,
if d front < 25 meters and lane change is decided −20, if d front ≥ 25 meters and lane change is decided(13)

Figure 2 .
Figure 2. The training progress of the PASAC-PIDLag algorithm compared to the PASAC algorithm.

Figure 3 .
Figure 3.The vehicle's velocity, acceleration, and distance of the leader vehicle under the regulation of PASAC-PIDLag algorithmic controls.A black dashed line traverses the graphs, symbolizing the execution of a successful lane change by the ego vehicle.

Figure 4 .
Figure 4.The figure illustrates a successful lane change maneuver executed by a vehicle under the control of the PASAC-PIDLag algorithm, where the red vehicle is denoted as the ego car, and the green vehicles represent the surrounding traffic.

Figure 5
Figure 5 depicts an episode of collision occurrence within the PASAC algorithm framework, in which the ego vehicle collides after executing a lane change.The data presented in the figure reveal that the ego vehicle was steadily closing in on the vehicle ahead until the following distance diminished to 19m, which triggered a decision to change lanes.At this juncture, the presence of another vehicle on the target lane led to a collision.Figure 6 displays an instance of a lane change maneuver resulting in a collision, as directed by the PASAC algorithm.

Figure 6
Figure 5 depicts an episode of collision occurrence within the PASAC algorithm framework, in which the ego vehicle collides after executing a lane change.The data presented in the figure reveal that the ego vehicle was steadily closing in on the vehicle ahead until the following distance diminished to 19m, which triggered a decision to change lanes.At this juncture, the presence of another vehicle on the target lane led to a collision.Figure 6 displays an instance of a lane change maneuver resulting in a collision, as directed by the PASAC algorithm.

Figure 5 .
Figure 5.The velocity, acceleration, and lead vehicle distance during a collision event due to lane changing under the PASAC algorithm.

Figure 6 .
Figure 6.A collision incident during a lane change maneuver controlled by the PASAC algorithm, where the red vehicle represents the ego car and the green vehicle represents other traffic participant.

Figure 7 .
Figure 7.The velocity, acceleration, and lead vehicle distance during a collision event due to accelerating under the PASAC algorithm.

Figure 8 .
Figure 8.A collision incident during a car-following scenario controlled by the PASAC algorithm, where the red vehicle represents the ego car, and the green vehicle represents another traffic participant.

Table 1 .
The hyperparameter values for the PASAC-PIDLag and the PASAC algorithms.

Table 2 .
The results under a traffic flow density of 15 veh/km.

Table 3 .
The generalization results under a traffic flow density of 10 veh/km.

Table 4 .
The generalization results under a traffic flow density of 18 veh/km.