###### Abstract  
In order to solve the problem of poor local optimization of the Slime Mold Algorithm (SMA) in the Travelling Salesman Problem (TSPLIB), a Two-way Parallel Slime Mold Algorithm by Flow and Distance (TPSMA) is proposed in this paper. Firstly, the flow between each path point is calculated by the \"critical pipeline and critical culture\" model of SMA; then, according to the two indexes of flow and distance, the set of path points to be selected is obtained; finally, the optimization principle with a flow index is improved with two indexes of flow and distance and added random strategy. Hence, a two-way parallel optimization method is realized and the local optimal problem is solved effectively. Through the simulation of Traveling Salesman Problem Library (TSPLIB) on ulysses16, city31, eil51, gr96, and bier127, the results of TPSMA were improved by 24.56, 36.10, 41.88, 49.83, and 52.93%, respectively, compared to SMA. Furthermore, the number of path points is more and the optimization ability of TPSMA is better. At the same time, TPSMA is closer to the current optimal result than other algorithms by multiple sets of tests, and its time complexity is obviously better than others. Therefore, the superiority of TPSMA is adequately proven. S 2020 10 6180 10.3390/app10186180 10. The microorganism called slime mold [13] has an evolutionary history of 100 million years. It can eventually find a high-quality foraging path by avoiding external obstacles in a network structure. The unique and efficient foraging process provides a new inspiration for path optimization. Therefore, scientists learned from the intelligent life and obtained a new algorithm called Slime Mold Algorithm (SMA) [14]. With the unique searching ability, slime molds can efficiently find a high-quality way to the food in maze experiments. As shown in Figure 1, based on the slime mold's foraging behavior, the scientists thought of the food sources as the cities of a country. It was found that the foraging path network of slime molds is highly similar to the actual road network designed in the country [15; 16; 17; 18]. Thus, foraging behavior of slime mold has great significance to be explored for path optimization [19; 20; 21; 22; 23]. In 2000, Japanese scientist [PERSON] [14; 24; 25; 26] discovered that the slime mold can walk through the maze. The researchers placed the slime molds in a maze and dropped food at the entrance and exit of the maze in a petri dish. After a period of time, slime molds formed a feeding route. It was obtained as the solution to solve a complex maze problem. In 2007, [PERSON] [27; 28] came up with the model of \"pipeline culture,\" which mainly used Poisson Theorem and Kirchhoff's Laws to realize the pipeline mechanism of flow and conductivity. This model can be equivalent to the foraging behavior of slime molds. Afterwards, [PERSON] et al. [29; 30] applied the model to the description of networks in a cellular model. In China, Southwest University has studied the Slime Mold Algorithm combined with the pheromones of the Ant Colony Optimization to solve the classic TSP and multi-object TSP [31; 32; 33; 34]. Compared with other algorithms, SMA has high-efficiency optimization ability, especially in solving the complex path problem, which includes a large number of points and complex distribution [35; 36; 37]. The way of SMA has made a new method to solve TSP. At the same time, the convergence of SMA is fast, due to fewer iterations. However, SMA has been researched more recently than the others, and there is still a lot of room to investigate and improve [1; 27; 28; 33; 34]. In summary, the bottlenecks besides its advantages in TSP are as follows:  
* Due to the high similarity of some flow values, SMA cannot make a suitable choice. If points are selected only by flow, the ability will have a great limitation of global optimization. * SMA has no randomness and the selected points and the points to be selected have strong correlations. Therefore, SMA has low flexibility and weak robustness.