AI Lab 5 Manual
AI Lab 5 Manual
1. Introduction
In this lab, we will explore two fundamental search algorithms in Artificial
Intelligence:
A* Search
Hill Climbing (Faster, but may not find the best path)
Both algorithms are widely used in problem-solving, optimization, and pathfinding.
2. A* Search
2.1 Overview
A* (A-star) is an informed search algorithm that finds the optimal path from a start
node to a goal node. It uses a combination of:
● g(n): The actual cost from the start node to the current node n.
● h(n): The estimated heuristic cost from n to the goal.
● f(n) = g(n) + h(n): The total estimated cost of the path through n.
3.1 Overview
Hill Climbing is a heuristic search algorithm that continuously moves towards the
best possible state. It is an optimization algorithm that makes local changes to
improve a given solution iteratively.
c. If the new neighbor is better than the current state, move to it.