In order to protect people’s lives and property, increasing numbers of explosive disposal robots have been developed. It is necessary for an explosive ordinance disposal (EOD) robot to quickly detect all explosives, especially when the location of the explosives is unknown. To achieve this goal, we propose a bidirectional dynamic weighted-A star (BD-A*) algorithm and a learn memory-swap sequence particle swarm optimization (LM-SSPSO) algorithm. Firstly, in the BD-A* algorithm, our aim is to obtain the shortest distance path between any two goal positions, considering computation time optimization. We optimize the computation time by introducing a bidirectional search and a dynamic OpenList cost weight strategy. Secondly, the search-adjacent nodes are extended to obtain a shorter path. Thirdly, by using the LM-SSPSO algorithm, we aim to plan the shortest distance path that traverses all goal positions. The problem is similar to the symmetric traveling salesman problem (TSP). We introduce the swap sequence strategy into the traditional PSO and optimize the whole PSO process by imitating human learning and memory behaviors. Fourthly, to verify the performance of the proposed algorithm, we begin by comparing the improved A* with traditional A* over different resolutions, weight coefficients, and nodes. The hybrid PSO algorithm is also compared with other intelligent algorithms. Finally, different environment maps are also discussed to further verify the performance of the algorithm. The simulation results demonstrate that our improved A* algorithm has superior performance by finding the shortest distance with less computational time. In the simulation results for LM-SSPSO, the convergence rate significantly improves, and the improved algorithm is more likely to obtain the optimal path.