AIML

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 27

UNINFORMED SEARCH

• Breadth-first Search
• Depth-first Search
• Depth-limited Search
• Iterative deepening depth-first search
• Uniform cost search
• Bidirectional Search
INFORMED SEARCH
• Greedy best-first search
• A* search
• Memory-bounded heuristic search
Heuristics function
• Used in Informed Search.
• Finds the most promising path.
• It guaranteed to find a good solution in
reasonable time.
• It is represented by h(n)
• The cost of an optimal path between the pair
of states.
• The value of the heuristic function is always
positive.
Heuristic value
• A heuristic is consistent if for every node n,
every successor n' of n generated by any
action a,
• h(n) ≤ c(n,a,n') + h(n')
Admissible heuristics
E.g., for the 8-puzzle:

h1(n) = number of misplaced tiles


h2(n) = total Manhattan distance
(i.e., no. of squares from desired location of each tile)

h1(S) = 8
h2(S) = 3+1+2+2+2+3+3+2 = 18
Pure Heuristic Search

• simplest form of heuristic search


algorithms.
• It expands nodes based on their heuristic
value h(n).
• It maintains two lists:
– In the CLOSED list, it places those nodes which
have already expanded
– in the OPEN list, it places nodes which have yet
not been expanded.
Greedy best-first search(Contd...)
f(n)=h(n)
• h(n) = estimated cost from n to goal
• f(n) = estimated total cost of path
through n to goal
Greedy best-first search(Contd...)

Fig. :Romania with step costs in km


Greedy best-first search(Contd...)
Greedy best-first search(Contd...)
A search
*

• Evaluation function f(n) = g(n) + h(n)


g(n) = cost so far to reach n
A* search(Contd...)

Fig. :Romania with step costs in km


A* search(Contd...)
A* search(Contd...)
A* search(Contd...)
Memory-bounded heuristic search
SMA*:
• Similar to A* but has memory limitation.
• if there is no space ;
– node with highest f cost -dropped.
SMA*(Contd...)

Fig. :Romania with step costs in km


SMA* :Memory bound =3

Arad

Timisora Sibiu Zerind


LOCAL SEARCH &
OPTIMIZATION PROBLEMS
• LOCAL SEARCH:
-Memory effecient
-no need to worry - path
-need to acheive - goal.
Local Search
• Hill Climbing
• Simulated Annealing
• Local Beam Search
• Genetic Algorithm
Hill Climbing/Greedy Local search
- Keywords
• Global maximum
• Local Maximum
• Shoulder
-uphill
• Flat local maximum
-downhill
Hill Climbing (contd...)
Hill Climbing - Types
• Iterated - select no.of statrting points.
– Local Maxima & Ridge
• Choose the wrong one as the best.
• Stochastic - Allow to reach the probability
– Flat local maxima/Plateua
• flat values for some duration.
Simulated Annealing
• i/p: problem and schedule
• Escape from local maxima
• allow downhill
• start with random state
Local Beam Search
• store k no. of nodes
• K >1
• choose k random nodes
– if k==2 then
Genetic Algorithm
• population-k randomly generated states
Genetic Algorithm(Contd...)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy