# Non-Vertical Well Trajectory Design Based on Multi-Objective Optimization
## 4 Information Entropy Guided Multi-Reference Vector NSGA-III Optimization Algorithm
### Multi-Granularity Adaptive Reference Vector Generation  
The traditional NSGA-III uses a uniformly distributed reference vector. In the face of a nonlinear, irregular, or locally dense target space, it is difficult to achieve effective coverage and accurate approximation, and it is prone to problems such as slow convergence and the uneven distribution of solution sets. To this end, this paper designs a reference vector generation mechanism combining coarse-grained and fine-grained vectors: coarse-grained reference vectors are used to cover the macro structure of the target space and are suitable for low-density regions; the fine-grained reference vector focuses on the high-density region to improve the local search accuracy, so as to realize the fine modeling and dynamic optimization of the entire target space. Specifically, coarse-grained vectors are generated from a uniformly distributed unit vector set with a step size of 0.1, ensuring the coverage of low-density areas. Fine-grained vectors are encrypted around high-density cluster centers with a step size of 0.02 to enhance local search precision. In the iterative process of the algorithm, the proportion of coarse and fine granularity reference vectors is dynamically adjusted according to the current population distribution state. Suppose the number of current iterations is t and the maximum number of iterations is T; then, the coarse-grained reference vector ratio \(\lambda t\) is defined as follows:  
\[\lambda t=\text{max}\bigg{(}0.3,1-0.6\cdot\frac{t}{T}\bigg{)}. \tag{35}\]  
The fine-grained reference vector ratio is \(1-\lambda t\). This strategy ensures the early exploration of coarse-grained areas (when \(t\to 0\), \(\lambda t\approx 1\), later gradually increase the fine-grained search intensity (when \(t\to T\), \(\lambda t\to 0.3\)), so as to balance the contradiction between global exploration and local development). In order to identify the high/low density regions of the target space, the algorithm constructs the density map of the target space through kernel density estimation (KDE) and K-means clustering analysis. The KDE adopts a Gaussian kernel with a bandwidth of 0.05, and K-means clustering runs for a maximum of 50 iterations with a convergence threshold of 1 \(\times\) 10\({}^{-4}\) to stably partition density regions. The specific steps are as follows: Firstly, for the normalized target value matrix \(F_{norm}\in R^{N*m}\) (N is the population size, m is the number of targets), the local density of each individual i is calculated:  
\[d_{i}=\frac{1}{\sum\limits_{j=1}^{k}|F_{norm}(i)-F_{norm}(j)|}. \tag{36}\]  
Among the variables is the number of nearest neighbors, usually \(\min(20,N-1)\). The formula quantifies the local density by calculating the sum of the reciprocal of the distance  
Figure 7: Algorithm comparison diagram. between the individual and its nearest neighbor. Subsequently, K-means clustering is used to divide the target space into \(c\) regions, \(c=\min(5,N/5)\). Each cluster center corresponds to a density region, and the high-density and low-density regions are distinguished by comparing the average density values of the clusters. For example, the cluster centers in high-density regions usually correspond to the Pareto front with a dense population distribution, while the low-density regions correspond to the regions with a sparse population distribution. The reference vector allocation strategy based on regional density is as follows: low-density regions generate coarse-grained reference vectors to cover the macro distribution, and high-density regions generate fine-grained reference vectors to enhance the local search. For the region center \(C\in R^{m}\), the formula for generating the reference vector \(w\in R^{m}\) is  
\[w=\alpha\mu+(1-\alpha)C. \tag{37}\]  
\(u\) is the uniform reference vector, and \(\alpha\in[0,1]\) is the mixing coefficient, which is dynamically adjusted according to the regional density.