# Using an Artificial _Physarum polycephalum_ Colony for Threshold Image Segmentation
## 4 Algorithm Steps of APPCA
### Step 2: Expansion
If the end conditions are not satisfied, the top \(S\) best solutions in the contraction algorithm will be returned to the expansion algorithm, and the process of expansion and contraction will be repeated until the end conditions are fit. Finally, an optimal segmented image \(x^{1*}(Ite)\) will be output as a solution to the threshold image segmentation. ## 5 Benchmark Tests and Comparison

In this section, to test the proposed artificial _Physarum polycephalum_ colony algorithm, we design a series of benchmark experiment tests on threshold image segmentation. Some mainstream artificial intelligence algorithms are also employed for comparison to verify the proposed APPC algorithm. ### Experiment Design

For a fair comparison, some assumptions are made as follows:

* It is assumed that the ethics, privacy, politics, race, topic, history, ecology, and complexity factors of the original images are not taken into account. * It is assumed that the differences between the binarization methods, the filters, and the color differences of the pixels are not considered. * It is assumed that the performance difference of different algorithms running on different software and hardware of personal computers is ignored. * It is assumed that the optimal parameter adjustment on determined datasets is not discussed. Although each algorithm has a lot of improved editions to obtain better performance, this is not considered here. There are many datasets for benchmark tests of image segmentation, but they cannot all be selected for our experiments. Here, the famous Pascal VOC dataset and Stanford background dataset were selected for our benchmark test, and they have always been the benchmark test dataset in the field of image segmentation. The links to the two supporting datasets are provided in the Data Availability Statement at the end of this article. The experimental platform includes an AMD Ryzen 3 4300U with Radeon Graphics 2.70 GHz CPU, 8.00 GB RAM, a 64-bit Windows 10 operating system, and Matlab R2018a simulation software. Alongside our APPCA, some mainstream swarm intelligence algorithms are employed for performance comparison, including deep learning (DL) [4; 12; 21; 38], gray wolf optimization (GWO) [5; 39], particle swarm optimization (PSO) [7; 23; 40], differential evolution algorithm (DEA) [9], ant colony optimization (ACO) [13; 33], genetic algorithm (GA) [14; 40], artificial bee colony algorithm (ABC) [15; 25], artificial fish swarm algorithm (AFSA) [36], and immune system (IS) [44]. For a fair comparison, only twenty agents (\(S=20\)) were used in the benchmark tests, the fitness function selected Equation (5), and the simulation parameters of different algorithms were kept unchanged in the whole tests. For the simulation system, the maximum number of iterations is preset to 200, and the iterative error threshold is less than 0.1%. The main simulation parameters used in our proposed algorithm are as follows. The population size of the artificial _Physarum polycephalum_ colony is \(S=20\). For the two learning factors, the social-learning probability is \(p_{\mathrm{s}}=0.9\), and the free-learning probability is set as \(p_{\mathrm{s}}=0.2\). For DL [4; 12; 21; 38], the parameters include a convolutional neural network with eight convolution cores, eight input channels (\(c_{in}=8\)), and eight output channels (\(c_{out}=8\)). The learning rate of the offset item was twice that of the weight. The extension edge was set to 0, the weight was initialized to Gaussian, and the value of the constant offset item was 0. For GWO [5; 39], the population size of the gray wolves was set to \(S=20\), the upper bound of variables was set as \(ub=[10,10]\), the lower bound of variables was set as \(lb=[-10,-10]\), and the dimension of the problem was set as \(dim=2\). For PSO [7; 23; 40], the population size of the particles was set to \(S=20\), the location limitation was 0.5, the speed limitation was \([-0.5,0.5]\), the self-learning factor was \(c1=1.5\), and the social-learning factor was \(c2=1.5\).