ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Artificial Intelligence
    COMP2121
    Progress0 / 19 topics
    Topics
    1. An Introduction to Artificial Intelligence and its applications towards Knowledge Based Systems2. Introduction to Reasoning and Knowledge Representation3. Problem Solving by Searching: Informed searching4. Problem Solving by Searching: Uninformed searching5. Heuristics in Problem Solving6. Local searching algorithms7. Minimax algorithm8. Alpha-beta pruning9. Game-playing in AI10. Case Study: General Problem Solver11. Case Study: ELIZA12. Case Study: Student13. Case Study: Macsyma14. Learning from examples15. Artificial Neural Networks (ANN)16. Natural Language Processing17. Recent trends and applications of AI algorithms18. Python programming for AI19. Implementation of AI techniques in Python
    COMP2121›Local searching algorithms
    Artificial IntelligenceTopic 6 of 19Regular Notes

    Local searching algorithms

    2 minread
    368words
    Beginnerlevel

    📘 Problem Solving by Searching: Local Search


    1. What is Local Search?

    Local search algorithms focus on finding solutions by moving through the search space locally, usually from one state to a neighboring state.

    They don’t build or explore a full search tree. Instead, they keep a single current state and move to a better neighbor.


    2. Key Features of Local Search

    • Uses limited memory — only tracks the current state.
    • Suitable for large or infinite state spaces.
    • Can get stuck in local optima (not necessarily the best overall solution).

    3. Local Search Problems

    Best used for optimization problems, where the goal is to maximize or minimize some objective function.

    Examples:

    • N-Queens Problem
    • Traveling Salesman Problem (TSP)
    • Job Scheduling
    • Neural Network training

    4. Common Local Search Algorithms

    Algorithm Description Pros Cons
    Hill Climbing Moves to the neighbor with the highest value (best improvement) Simple, fast Can get stuck in local maxima, plateaus, or ridges
    Simulated Annealing Sometimes accepts worse moves to escape local optima, gradually reduces randomness Can escape local optima Slower than hill climbing
    Local Beam Search Keeps k states instead of one, and picks the best k successors More diverse search Still may converge to local optima
    Genetic Algorithms Population-based search using selection, crossover, and mutation Very effective for complex spaces Requires tuning and is stochastic

    5. Hill Climbing (Example)

    • Start with an initial state.
    • Evaluate its neighbors.
    • Move to the neighbor with the highest score.
    • Repeat until no better neighbors are found.

    🧠 Analogy: Climbing a hill in fog. You can see around you but not the entire mountain. You stop when no neighbor is higher — even if you're not at the highest peak (global maximum).


    6. Limitations of Local Search

    • Local Maxima: A peak that is not the highest overall point.
    • Plateau: Flat area where all neighbors have the same value.
    • Ridges: Narrow paths that require a sequence of moves to climb.

    ✅ Summary

    Concept Meaning
    Local Search Searches from one state to its neighbors
    Goal Optimize a function (not just find a path)
    Memory Efficient Only stores current state
    Useful for Large or infinite state spaces
    Risk Getting stuck in local optima

    Previous topic 5
    Heuristics in Problem Solving
    Next topic 7
    Minimax algorithm

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time2 min
      Word count368
      Code examples0
      DifficultyBeginner