ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalCOMP2121Heuristics
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    COMP2121

    Artificial Intelligence

    Progress0 / 19 done
    Topics19
    1An Introduction to Artificial Intelligence and its applications towards Knowledge Based Systems2Introduction to Reasoning and Knowledge Representation
    3Informed searching4Uninformed searching5Heuristics in Problem Solving6Local searching algorithms7Minimax algorithm8Alpha-beta pruning9Game-playing in AI
    10General Problem Solver11ELIZA12Student13Macsyma14Learning from examples15Artificial Neural Networks (ANN)16Natural Language Processing17Recent trends and applications of AI algorithms18Python programming for AI19Implementation of AI techniques in Python
    2 min read
    Topic 5 of 19
    Topic Study Note Illustration
    05

    Heuristics in Problem Solving

    A heuristic is a technique used in informed search algorithms that provides an estimate of the cost or distance from a given state to the goal.

    📘 Problem Solving by Searching: Heuristics


    1. What is a Heuristic?

    A heuristic is a technique used in informed search algorithms that provides an estimate of the cost or distance from a given state to the goal.

    • Denoted as h(n): the estimated cost from node n to the goal.
    • Used to guide the search process more intelligently by predicting which paths are more promising.

    Think of it as a “rule of thumb” or a “best guess” that helps AI make decisions faster.


    2. Why Use Heuristics?

    • Improves efficiency by reducing the number of states explored.
    • Helps avoid blind or exhaustive searching.
    • Essential for complex or large problem spaces (e.g., games, maps, puzzles).

    3. Good Heuristic Qualities

    Property Description
    Admissibility A heuristic is admissible if it never overestimates the actual cost to reach the goal. Guarantees optimal solutions with A*.
    Consistency (Monotonicity) For every node nnn and successor n′n'n′, the heuristic satisfies:
    h(n)≤c(n,n′)+h(n′)h(n) \leq c(n, n') + h(n')h(n)≤c(n,n′)+h(n′).
    Ensures A* doesn't need to revisit nodes.
    Efficiency It should reduce the number of nodes expanded significantly.
    Accuracy The closer the heuristic is to the actual cost, the better.

    4. Common Heuristic Examples

    Problem Heuristic Explanation
    Map routing Straight-line distance (Euclidean) Distance from current location to destination
    8-puzzle Number of misplaced tiles Counts how many tiles are not in correct position
    8-puzzle Manhattan distance Total distance tiles are away from their goal positions (row + column)
    Chess Material advantage Value of current pieces vs. opponent’s

    5. Role in Informed Search Algorithms

    Algorithm Use of Heuristic
    Greedy Best-First Search Uses only h(n) (chooses node that looks closest to goal)
    A* Search Uses f(n) = g(n) + h(n) (combines path cost + heuristic estimate)

    6. Designing Heuristics

    A good heuristic should:

    • Be problem-specific.
    • Be easy to compute.
    • Be admissible (for optimal A* results).
    • Capture meaningful insights into the problem.

    ✅ Summary Table

    Term Definition
    Heuristic (h(n)) Estimated cost from node n to the goal
    Admissible Never overestimates the actual cost
    Consistent Satisfies triangle inequality: h(n)≤c(n,n′)+h(n′)h(n) \leq c(n, n') + h(n')h(n)≤c(n,n′)+h(n′)
    Role Guides search, improves efficiency

    ← Previous topic 4
    Problem Solving by Searching: Uninformed searching
    Next topic 6 →
    Local searching algorithms

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    2mremaining
    424words
    Beginnerlevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Artificial Intelligence