## 3 A Hybrid Iterated Greedy Method to Improve the Initial Solutions  
The iterative greedy (IG) methods are mainly used to solve the flowshop problem of minimizing makespan, which was first proposed in [41] and is the most effective metaheuristic method so far. The algorithm first uses a heuristic method (such as NEH) to generate an initial solution \(\Pi\), for which the initial solution is improved using a local search algorithm with the insertion neighborhood algorithm. Then, \(d\) jobs are removed from this sequence (destruction phase) and reinserted one after another to the position that minimizes the objective function value obtained after insertion (construction phase), looping this process to obtain a new sequence \(\Pi^{\prime}\). Finally, the sequence \(\Pi^{\prime\prime}\) is obtainedusing a local search method based on the insertion neighborhood of \(\Pi^{\prime\prime}\), using a probability similar to simulated annealing to decide whether to accept \(\Pi^{\prime\prime}\) and start the next iteration. The current well-known variant of the IG algorithm [42] applies a local search to both complete and partial solutions to speed up the search, applying the NEH algorithm with local search to produce an initial solution, the IG framework is shown in Algorithm 2. ```
1 input: a PFSP problem instance \(P\), the number of jobs removed \(d\), simulated annealing parameter \(T\). 2 output: The best solution found \(\Pi^{*}\). 3\(\Pi=NEH(P)\); //replaced by DRL(\(P\))
4\(\Pi=LocalSearch(\Pi)\);
5\(\Pi^{*}=\Pi\);
6 while termination criteria not met do
7 Randomly remove \(d\) jobs from \(\Pi\) (destruction);
8 (Let \(\Pi^{R}\) be the remaining sequence and \(\Pi^{D}\) be the extracted jobs);
9\(\Pi^{R^{\prime}}=LocalSearch\big{(}\Pi^{R}\big{)}\);
10\(\Pi^{\prime}=Construction\big{(}\Pi^{R^{\prime}},\Pi^{D}\big{)}\);
11\(\Pi^{\prime}=LocalSearch(\Pi^{\prime})\);
12\(\Pi=AcceptanceCriterion\big{(}\Pi^{\prime\prime},T\big{)}\);
13 if\((\Pi^{\prime})<f(\Pi^{*})\) then
14\(\Pi^{*}=\Pi^{*}\);
15 return\(\Pi^{*}\)
```  
**Algorithm 2** The IG framework with local search  
The proposed deep reinforcement learning architecture (DRL for short) can replace the combination of NEH and the insertion neighborhood local search as a high-performance initial solution generator. In the destruction and construction phase, an adaptive local search strategy is proposed, which consists of an insertion operator (LS1), a swap operator (LS2). The weights of the three operators are \(weight_{1}\) and \(weight_{2}\), respectively, and the corresponding probabilities are \(p_{1}\), \(p_{2}\). The weights of the two operators are initialized to \(1\), and the probabilities are initialized to \(1/2\). As the number of iterations grows, the probabilities of the operators that can improve the current solution more are increased. In order to improve the effectiveness of the local search, the tie-breaking mechanism is added. If the late work values obtained from multiple positions inserted or swapped by the operator are the same, then the one with the smallest idle time in the scheduling sequences obtained after the execution of the operators is taken as the final result. The \(loopSize\) of the local search is set to half the number of jobs to improve the efficiency of the search. The late work optimization objective is very sensitive to the permutation of the jobs, especially if the problem with a release date constraint, small changes can lead to a dramatic deterioration of the late work value. Therefore, the inverse operator is not used in the improved IG algorithm, which would be destructive to the current solution. The \(p_{1}\), \(p_{2}\) of the next iteration are calculated by \(weight_{1}\), \(weight_{2}\). The update and calculation method of these parameters are shown in Equations (18)-(20). \[p_{i}=\frac{weight_{i}}{weight_{1}+weight_{2}},\ i=1,2 \tag{18}\]  
\[\mu=\left\{ \begin{array}{l}1\,,\,f_{new}<f_{host}\\ 0\,,\,f_{new}\geq f_{host}\end{array} \right.