Unit 2 of 4 · BCA Sem 4

Unit 2: Advanced search techniques

Artificial Intelligence notes · PTU syllabus (UGCC2521)

3 min read5 topics10 exam questions
On this page
  1. Unit summary
  2. Uninformed (blind) search
  3. Informed (heuristic) search
  4. Adversarial search: Minimax and alpha-beta
  5. Constraint satisfaction problems
  6. Evolutionary search: genetic algorithms
  7. Key terms
  8. Quick revision
  9. Important questions

Unit summary

Search is at the heart of AI problem solving. This unit covers uninformed search (DFS, BFS, iterative deepening), informed (heuristic) search (best-first, A, AO), adversarial search for games (Minimax, alpha-beta pruning), constraint satisfaction problems with backtracking, and genetic algorithms.

After this unit you can

  • Compare uninformed search strategies
  • Apply best-first, A* and AO* using heuristics
  • Use Minimax and alpha-beta pruning for game playing
  • Solve constraint satisfaction problems and explain genetic algorithms

PTU syllabus topics

  • Uninformed search (DFS, BFS, iterative deepening)
  • informed search (Best First Search, A*, AO*)
  • adversarial search (Minimax, Alpha-Beta pruning)
  • constraint satisfaction problems and backtracking search
  • evolutionary search techniques and genetic algorithms
ClassificationSearch strategies
AI search
  • Uninformed

    BFS, DFS, iterative deepening

  • Informed

    Best-first, A*, AO*

  • Adversarial

    Minimax, alpha-beta pruning

  • Constraint satisfaction

    Backtracking

  • Evolutionary

    Genetic algorithms

1

Topic 1

Uninformed (blind) search

ComparisonUninformed search strategies
How it explores
Complete? Optimal?

BFS

Level by level using a queue

Yes; optimal for equal step costs

DFS

Deepest node first using a stack

No (may loop); not optimal

Iterative deepening

DFS with depth limits 0, 1, 2 …

Yes; optimal for equal step costs

Iterative deepening combines BFS's completeness with DFS's low memory use.

2

Topic 2

Informed (heuristic) search

A heuristic h(n) estimates the cost from node n to the goal.

  • Greedy best-first search expands the node with the smallest h(n) — fast but not optimal.
  • *A search expands the node with the smallest f(n) = g(n) + h(n)*, where g(n) is the cost so far. A is optimal if h is admissible (never overestimates).
  • *AO search works on AND-OR graphs**, where solving a node may require solving all of several subproblems (AND) or any one of them (OR).

Example

In route finding, h(n) = straight-line distance to the destination is admissible because the road distance is never shorter.

3

Topic 3

Adversarial search: Minimax and alpha-beta

In two-player games, Minimax assumes both players play optimally: MAX chooses the highest-valued move and MIN the lowest, with values backed up from the leaves of the game tree. Alpha-beta pruning skips branches that cannot affect the final decision. α is the best value MAX can guarantee; β is the best for MIN; prune when α ≥ β. With good move ordering it halves the effective depth cost, from O(bᵈ) to about O(b^(d/2)).

4

Topic 4

Constraint satisfaction problems

A CSP has variables, domains of possible values and constraints between variables. Examples: map colouring, Sudoku, N-Queens and timetabling. Backtracking search assigns values one variable at a time and backs up when a constraint is violated. Improvements: minimum remaining values (choose the most constrained variable), forward checking and constraint propagation (arc consistency).

5

Topic 5

Evolutionary search: genetic algorithms

CycleGenetic algorithm
Genetic algorithm
1Initial population
2Fitness evaluation
3Selection
4Crossover
5Mutation
  1. 1. Initial population: Random candidate solutions
  2. 2. Fitness evaluation:
  3. 3. Selection: Fitter individuals chosen
  4. 4. Crossover: Combine parents
  5. 5. Mutation: Small random changes

Genetic algorithms are used for optimisation problems where the search space is huge — scheduling, design and feature selection.

Key terms

Heuristic
An estimate of the cost to reach the goal
Admissible heuristic
A heuristic that never overestimates
Minimax
A game-playing algorithm assuming optimal opponents
Alpha-beta pruning
Skipping branches that cannot change the decision
Constraint satisfaction problem
Finding values that satisfy all constraints

Quick revision

  • BFS queue, DFS stack, IDDFS = depth-limited DFS repeated.
  • A*: f = g + h; optimal if h is admissible.
  • Minimax backs up values; alpha-beta prunes when α ≥ β.
  • CSP: variables, domains, constraints; backtracking + forward checking.
  • GA: selection, crossover, mutation.

Important exam questions

Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).

Short-answer questions

  1. Q1.Differentiate between informed and uninformed search.
  2. Q2.What is an admissible heuristic?
  3. Q3.Write the evaluation function of A*.
  4. Q4.What is alpha-beta pruning?
  5. Q5.Define a constraint satisfaction problem.
  6. Q6.Name the operators of a genetic algorithm.

Long-answer questions

  1. Q1.Compare BFS, DFS and iterative deepening search.
  2. Q2.Explain A* search with an example and state when it is optimal.
  3. Q3.Explain the Minimax algorithm and alpha-beta pruning with a game tree.
  4. Q4.Solve the 4-Queens problem as a CSP using backtracking.

Stuck on this unit?

Message SBS on WhatsApp for help with Artificial Intelligence, or to ask about studying BCA at Synetic.

WhatsApp us