0% found this document useful (0 votes)
4 views12 pages

Unit1 PAI

Uploaded by

mailhiteshjha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views12 pages

Unit1 PAI

Uploaded by

mailhiteshjha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

UNIT1

Problem Solving
To build a system to solve a particular problem, we need to do 4 things:
 Define the problem precisely as state space search
 Analyze the problem
 Isolate and represent the task knowledge that is necessary to solve the
problem.
 Choose the best problem-solving technique(s) and apply them to the particular
problem

State Space Search


State space search refers to the process of navigating through a set of
possible states that represent different configurations of a problem. In
order to express the problem using state space, the following elements
must be defined:
States: Every arrangement of the 3x3 grid consisting of tiles numbered
1 through 8 and a blank area.
Initial State: A particular tile layout at the outset.
Goal State: The configuration with the blank space in the lower-right
corner and the tiles arranged in numerical order.
Actions: Up, down, left, or right movement of the empty area .
Path Cost: The uniform cost of every motion is one.
Example-
Heuristic function
A heuristic is a function which helps us to evaluate each state to guide
the search process. It gives an estimation cost of getting from node n to
goal state.
Heuristic search = informed search.
Depth First Search
The algorithm starts at the root node and examines each branch as far
as possible before backtracking
 Uninformed search technique
 Works on Last in First Out (LIFO) ,uses Stack
 Deepest node
 Incomplete technique (may get stuck in a loop/ infinite
possibilities )
 Non Optimal
 Time complexity= o(b^d)
B is branching factor and D is depth

Breadth First Search


It begins with a node, then traverse vertices level by level.
 Uniformed search technique
 Works on First in First Out (FIFO), uses Queue
 Level Search
 Complete Search
 Optimal
 Time complexity=o (b^d)
Best First Search
Best-First Search works by evaluating the cost of each possible path and
then expanding the path with the lowest cost. This process is repeated
until the goal is reached.
The algorithm uses a heuristic function to determine which path is the
most promising.
 Informed search, Heuristic search
 Gives Good solution
 May or may NOT give an OPTIMAL SOLUTION
 Worst case o(b^ d)
 Greedy method
Hill Climbing Algorithm

Hill Climbing is a local search algorithm that iteratively moves towards


the direction of increasing improvement, aiming to find a better
solution but immediately stops if no improvement is found.
 Greedy approach
 Local Search Algorithm
 No backtrack

Drawbacks
1. Local Maxima
2. Plateau
3. Ridge
Solution: Steepest-Ascent Hill Climbing is an enhanced version of
simple hill climbing. Instead of moving to the first neighboring node that
improves the state, it evaluates all neighbors and moves to the one
offering the highest improvement (steepest ascent).

ADVANTAGES
 Simplicity: Easy to understand and implement
 Memory efficiency: Maintains only the current state's data
 Rapid convergence
 Low computational power

A* Algorithm
 Informed search Technique
 Optimal Solution
 F(n)= g(n)+h(n)
 g(N) is cost of initial state to node N, h(n) is estimated cost
of N to goal state
 Time complexity= o(b^d)
AO* Algorithm
The AO* algorithm is an advanced search algorithm utilized in artificial
intelligence, particularly in problem-solving and decision-making contexts.
 Works on AND-OR graph
 Works on problem decomposition
 Informed search
 Best first search
 May or may not find optimal solution
 It does not explore further paths once it get a
solution
Means End Analysis

 For complex and large problems


 Reasoning done in both forward and backward direction
 Problem divided into parts
 Forward direction- big parts
 Backward direction small parts
 Based on evaluation of difference between current state and goal
state

Problem Reduction

 Breaking down a problem into smaller sub-problems (or sub-


goals).
 Can be represented using goal trees (or and-or trees).
 Nodes in the tree represent sub-problems.
 The root node represents the overall problem.
 Some nodes are and nodes, meaning all their children must be
solved.

You might also like