at a time until it finds a solution (or can’t improve on the present solution). It
CHAPTER 18
Performing Local Search
343
You can see the problems that a local search can solve as a graph of interconnected
solutions. The algorithm traverses the graph, moving from node to node looking
for the node that satisfies the task requirements. Using this perspective, a local
search takes advantage of graph exploration algorithms such as depth-first search
(DFS) or breadth-first search (BFS), both discussed in Chapter 9.
Local search provides a viable way to find acceptable solutions to NP-hard prob-
lems. However, it can’t work properly without the right heuristic. Randomization
can provide a good match with local search, and it helps by using
Do'stlaringiz bilan baham: