IntroductionAutonomous mobile robot encompasses modules such as perception, path planning, decision-making, and control. Among these modules, path planning serves as a prerequisite for mobile robots to accomplish tasks. Enhancing path planning capability of mobile robots can effectively save costs, reduce energy consumption, and improve work efficiency. The primary slime mold algorithm (SMA) exhibits characteristics such as a reduced number of parameters, strong robustness, and a relatively high level of exploratory ability. SMA performs well in path planning for mobile robots. However, it is prone to local optimization and lacks dynamic obstacle avoidance, making it less effective in real-world settings.MethodsThis paper presents an enhanced SMA (ESMA) path-planning algorithm for mobile robots. The ESMA algorithm incorporates adaptive techniques to enhance global search capabilities and integrates an artificial potential field to improve dynamic obstacle avoidance.Results and discussionCompared to the SMA algorithm, the SMA-AGDE algorithm, which combines the Adaptive Guided Differential Evolution algorithm, and the Lévy Flight-Rotation SMA (LRSMA) algorithm, resulted in an average reduction in the minimum path length of (3.92%, 8.93%, 2.73%), along with corresponding reductions in path minimum values and processing times. Experiments show ESMA can find shortest collision-free paths for mobile robots in both static and dynamic environments.