# Dynamic Path Planning for Vehicles Based on Causal State-Masking Deep Reinforcement Learning
## 1 Introduction  
Path-planning technology aims to generate safe and efficient routes for vehicles, enabling them to reach target locations without collisions. Achieving optimal paths is crucial for ensuring that vehicles complete tasks accurately and swiftly [1, 2, 3]. Path planning includes two mainstream strategies: global and reactive planning. Global planning adopts an offline approach utilizing predefined environmental maps, typically represented by grid or graph structures, and determines the most effective path through search algorithms such as breadth-first search [4] and rapidly exploring random trees (RRTs) [5]. These methods are referred to as global planning because they consider the entire environment when planning the path, formulating a comprehensive route from the starting point to the destination. Reactive planning, on the other hand, is applied in online scenarios, dynamically navigating by continuously processing real-time data from sensors, emphasizing local path planning, and focusing on immediate obstacle avoidance and adaptation to environmental changes. Common reactive planning methods include the vector field histogram (VFH) [6], dynamic window approach (DWA) [7], simultaneous localization and mapping [8], andmodel predictive control [9]. These techniques enable vehicles to make rapid decisions based on current sensor inputs, achieving excellent performance in unpredictable and dynamic environments. In recent years, machine learning has played a significant role in global and reactive path planning, substantially enhancing the intelligence level of vehicle navigation [10; 11; 12]. In addition to traditional supervised learning algorithms, such as support vector machines (SVMs) [13] and decision trees, used for predicting optimal paths based on labeled data, reinforcement learning (RL) [14; 15], a key branch of machine learning, is rapidly becoming a research hotspot in the field of path planning. RL autonomously optimizes decision-making strategies by interacting with the environment and utilizing reward mechanisms, enabling vehicles to achieve adaptive navigation in dynamic and complex environments. Common RL algorithms include Q-learning, deep Q-networks (DQNs) [16], policy gradient methods, and proximal policy optimization [17]. These methods not only improve the efficiency and flexibility of path planning but also reduce the dependence on large amounts of labeled data. Deep RL (DRL) [18], because of its excellent performance in handling high-dimensional state spaces and complex decision-making tasks, has become a valuable method in the field of motion planning. However, traditional DRL methods are prone to capturing task-irrelevant features during the training process. These spurious correlations often arise from environmental noise, sensor errors, or dynamic obstacles, leading to a significant decline in the model's generalization ability and robustness in new environments. To address this challenge in path planning, this study proposes an innovative Causal State-Masking Twin-Delayed Deep Deterministic Policy Gradient (CSM-TD3) method. This method, based on the twin-delayed deep deterministic (TD3) policy gradient algorithm, integrates a causal inference mechanism by introducing state masks and intervention mechanisms to effectively filter out features irrelevant to decision making. CSM-TD3 generates dynamic state masks to ensure that the policy network relies solely on state features with genuine causal relationships. The main contributions of this study are summarized as follows:  
* Enhanced model robustness and transferability: By combining the causal consistency loss term and dynamic state masks, the policy network is compelled to rely solely on state features with genuine causal relationships for decision making. This addresses the issue of DRL models capturing spurious correlations during training.