## 5 Adaptive Core Distribution Optimization Algorithm  
### ACTR Algorithm  
In this section, we introduce a novel topology reconfiguration algorithm: the adaptive core distribution optimization algorithm (ACTR), which incorporates a bidirectional search for topology reconfiguration and enhances it with the addition of a faulty core distribution test and a dynamic search order adjustment to improve the performance and efficiency of the algorithm. The principal innovations of this algorithm are outlined as follows:  
1. Faulty core distribution recognition mechanism: We propose an adaptive topology reconfiguration algorithm based on the location of the core distribution. The core of this algorithm is the examination and evaluation of the distribution of faulty cores. In the process of testing the distribution of faulty cores, we initially traverse the entire topological architecture to determine the position coordinates of each faulty core and their quantities. Subsequently, we calculate the core distribution factor by determining the normalized Euclidean distance between pairs of faulty cores. Finally, by establishing an appropriate threshold, we classify the distribution of faulty cores as either concentrated or dispersed, which then informs the final search order. In this paper, we consider three scenarios of faulty core distribution: 1. Faulty cores that are centrally distributed in the **upper right corner** of the network, referred to as **URC** cores. 2. Faulty cores that are centrally distributed in the **down left corner** of the network, referred to as **DLC** cores. 3. Faulty cores that are **scattered down in the corner** of the network, referred to as **SDC** cores. Therefore, by analyzing the distribution of faulty cores, we can approximate the optimal interval for successful topology reconfiguration and then determine different search orders based on the three cases (a), (b), and (c) mentioned above. 2. Sliding window search mechanism: The sliding window algorithm is an efficient algorithm for performing operations on arrays or sequences and is particularly adept at addressing problems that involve continuous subarrays or subsequences, such as identifying maximum/minimum values, sums, averages, and more. The core concept involves employing a fixed-size window that traverses the array, performing calculations within the window to avoid redundant computations, thereby enhancing algorithmic efficiency. In this paper, the sliding window is defined as a rectangular subarray containing a fixed number of cores, with the window boundaries comprising all cores that are horizontally and vertically adjacent to the window [37]. Regarding the search order, we propose a search algorithm based on a sliding window after determining the distribution location of the core. Traditional topology reconfiguration algorithms typically slide along the \(x\)-axis in a single direction. Specifically, the forward direction slides clockwise along the \(x\)-axis, while the reverse direction does the same. We introduce an additional dimension to this sliding order, namely, forward and reverse sliding in both clockwise and counterclockwise directions along the \(y\)-axis. Subsequently, based on the calculation results of the faulty core distribution algorithm, the following three scenarios can be obtained:  
1. If the faulty cores are centrally distributed in the upper right corner, the search order should be forward sliding clockwise along the \(y\)-axis and reverse sliding counterclockwise along the \(x\)-axis;
2. If the faulty cores are concentrated in the lower left corner, the search sequence should be forward sliding clockwise along the \(x\)-axis, reverse sliding counterclockwise along the \(y\)-axis;
3. If the faulty cores are scattered, the search order should be forward sliding clockwise along the \(x\)-axis and reverse sliding clockwise along the \(x\)-axis.