Local Searches
- A heuristic approach for finding solutions to optimization problems.
- Works by iteratively improving a candidate solution.
- Explores the "neighbourhood" of the current solution.
- Aims to find better solutions nearby.
Core Components
Candidate Solution
- The current "guess" for the best solution.
Neighbourhood
- The set of possible solutions that are "close" to the current solution.
- "Close" is defined based on the problem.
Objective Function
- A function that evaluates the "quality" of a solution.
- We want to maximize or minimize this function.
- Example: The height of a mountain in an optimization problem.
Neighbourhood Exploration
- The strategy for selecting which neighbour to examine next.
How Local Search Works
Algorithm Steps
- Start with a random candidate solution.
- Define a neighbourhood of possible solutions.
- Explore the neighbourhood of the current solution.
- If a better neighbour is found, update the current solution.
- Repeat steps 3 and 4 until a stopping criterion is met:
- Maximum iterations reached.
- No better neighbours found.
Key Characteristics
- Iterative Improvement
-
Repeatedly refines the current solution.
-
Neighbourhood Exploration
-
Focuses on exploring solutions similar to the current one.
-
Heuristic Nature
- Does not guarantee finding the global optimum.
-
Aims for a good solution (local optimum) in a reasonable time.
-
Problem-Specific
- The definition of "neighbourhood" and the evaluation function depend on the problem.