Path planning algorithms for Unmanned Aerial Vehicles (UAVs) are essential in various domains, such as search and rescue operations, agriculture, and delivery services. Nonetheless, finding optimal flight paths in complex environments with obstacles remains challenging. This paper proposes a novel path planning algorithm that uses a Nash equilibrium approach based on game theory to strike a balance between the exploitation and exploration capabilities of UAVs. The algorithm is designed in a simulated flight environment with obstacles, utilizing the self-awareness and group awareness coefficients from particle swarm optimization(PSO) as participants in the game theory model. The proposed path planning algorithm significantly improves the navigation of multiple UAVs in complex scenarios with obstacles by achieving a balance between their exploitation and exploration capabilities. Simulation experiments demonstrate that the proposed method surpasses traditional approaches, exhibiting an average improvement of 32.57%, 32.17%, and 29.33% in the algorithm convergence time, average flight distance, and average flight time, respectively. The significance of this research lies in its contribution to advancing UAV path planning algorithms. By integrating game theory and PSO, the proposed method optimizes the exploration and exploitation capabilities of UAVs, leading to improved navigation and resource utilization.