✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
The pseudocode below is provided for Iterated Local Search solving a minimisation problem. Which line of the code is problematic, and why?
1 s*= GenerateInitialSolution()
2 Repeat
3 s' = applyLocalSearch(s*) // apply hill climbing
4 s' = perturbSolution(s' ) // make a random move
5 accept = moveAcceptance(s*, s', memory); // remember best solution found so far
6 if (f(s') < f(s*)) s* = s'; // else reject new solution s'
7 Until (termination conditions are satisfied)
8 return s*