Heuristic Function h(n)h(n) and Search Types (Random, Brute Force, Uninformed, Informed)

Heuristic Function h(n)h(n) and Search Types (Random, Brute Force, Uninformed, Informed)

Verified Sources
Nov 4, 2026

In AI state-space search, a [heuristic function]{def="A function h(n)h(n) estimating the cost from node nn to a goal"} h(n)h(n) guides the search by estimating how close a state is to the goal. Heuristic-guided methods are categorized as informed search methods, in contrast to uninformed search methods.

For the question “Heuristic function h(n)h(n) is used in: (i) Random Search (ii) Brute Force Search (iii) Uninformed Search (iv) Informed Search”, the correct selection is:

  • ✅ (iv) Informed Search

This is because random search and brute force typically do not rely on h(n)h(n), and uninformed search explicitly avoids heuristic guidance, while informed search uses h(n)h(n) (e.g., Greedy Best-First Search, A*).

Key related concepts:

  • [heuristic estimate]{def="A numeric guess about distance/cost to the goal from nn"}
  • [greedy best-first search]{def="Uses h(n)h(n) to expand the node that appears closest to goal"}
  • [A* algorithm]{def="Uses f(n)=g(n)+h(n)f(n)=g(n)+h(n) to balance path cost and heuristic estimate"}

Heuristic Search & A* (Conceptual overview)

A search method becomes “informed” when it uses heuristic information in its node evaluation or expansion strategy. That heuristic is formalized as h(n)h(n): an estimate of remaining cost to reach a goal from node nn.2

Typical informed strategies include:

  • greedy best-first search: expansion order depends directly on h(n)h(n).
  • A* algorithm: combines actual path cost g(n)g(n) with heuristic h(n)h(n).

In contrast:

  • uninformed search methods (e.g., BFS, DFS, uniform-cost without heuristic) do not use h(n)h(n) for ordering/selection.

Footnotes

  1. Wikipedia — Heuristic function ↩

  2. Wikipedia — Informed search ↩ ↩2

Classify each option: where does $h(n)$ get used?

  1. 1
    Step 1

    samples successors or states without heuristic ordering/selection, so h(n)h(n) is not used for guidance.

  2. 2
    Step 2

    Brute force enumerates possibilities systematically (or level-by-level) based on the search space, not on heuristic estimates h(n)h(n). Any ordering it uses is not heuristic-driven by default.

  3. 3
    Step 3

    uses only the problem definition (successor function and goal test), so it does not employ h(n)h(n).

  4. 4
    Step 4

    In informed search, node selection/priority uses h(n)h(n) to estimate distance/cost to the goal, so h(n)h(n) is used here.

Heuristic Usage Across Search Types

In practice, h(n)h(n) is a defining feature of informed search.

Exam shortcut

If the option list includes “Informed Search”, and the question mentions h(n)h(n), choose “Informed Search”. Heuristics are the defining extra knowledge in informed methods.2

Footnotes

  1. Wikipedia — Heuristic function ↩

  2. Wikipedia — Informed search ↩

Common confusion: “brute force” vs “heuristic brute force”

Sometimes practitioners describe heuristic-guided search as “brute force with heuristic ordering”, but in standard AI terminology, brute force and uninformed searches do not use h(n)h(n) for node evaluation/priority. The canonical usage of h(n)h(n) is in informed search.

Footnotes

  1. Wikipedia — Informed search ↩

Answer + rationale

Knowledge Check

Question 1 of 3
Q1Single choice

Heuristic function h(n)h(n) is used in which type of search?