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

Module 3

The document presents a lecture on Artificial Intelligence, specifically focusing on heuristic search strategies, including Greedy best-first search and A* algorithm. It discusses the computation of f(n) in A* and provides examples such as the 8-puzzle problem and local search algorithms like Hill Climbing and Genetic Algorithms. The content is prepared by Dr. Bhat Geetalaxmi Jairam from the Department of IS&E at NIE, Mysuru.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views51 pages

Module 3

The document presents a lecture on Artificial Intelligence, specifically focusing on heuristic search strategies, including Greedy best-first search and A* algorithm. It discusses the computation of f(n) in A* and provides examples such as the 8-puzzle problem and local search algorithms like Hill Climbing and Genetic Algorithms. The content is prepared by Dr. Bhat Geetalaxmi Jairam from the Department of IS&E at NIE, Mysuru.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 51

s sor

rofe
, P
ram
iJ
a i Artificial Intelligence
xm
eta la (BIS515B )
Ge
Bha
t Textbooks:
.
Dr 1. Stuart J. Russell and Peter Norvig, Artificial
Intelligence, 3rd Edition, Pearson, 2015
Presented By,

Name: Dr. Bhat Geetalaxmi Jairam


Designation: Professor
Department: IS&E
College: NIE, Mysuru

1
s sor
rofe
, P
iram
a
m iJ
a lax
G eet
h at
r.B
D
Module-3
Heuristic Search Strategies

2
s sor
rofe
, P
iram
a
m iJ
a lax
G eet
h at
D r.B Heuristic (informed)Search Strategies
s sor
rofe
, P
iram
a
m iJ
a lax
G eet
h at
.B
D r Heuristic (informed)Search Strategies
s sor
rofe
, P
iram
a
m iJ
a lax
G eet
h at
r.B
D
Heuristic (informed)Search Strategies
Heuristic Function h(n)
or
Heuristic
rofe
s s
(informed)Search
, P
iram 1. Greedy best-search
a
m iJ
a lax
G eet
h at
r.B
D
Heuristic o r (informed)Search
ess
1. Greedy
, P ro f
best-search –example
iram
a
m iJ
a lax
G eet
h at
r.B
D
Heuristic o r (informed)Search
ess
1. Greedy
, P ro f
best-search –example
iram
a
m iJ
a lax
G eet
h at
r.B
D
or
Heuristicro(informed)Search
fes s
Strategies
, P
Uniformiram cost Search Vs Greedy best First
i Ja
la xm
eta
G e
h at
r.B
D

Based on min path cost in queue, nodes expanded.


Imp. Intuion is:It checks how far u r going from
starting node. (path-cost increases)
In another word, It will keep u closer to starting node

Based on h(n) value in queue, nodes expanded.

How far u r from goal node. Another way it keep u


closure to goal state.
or
Heuristicro(informed)Search
fes s
Strategies
, P
iram Greedy best First
i Ja
la xm
eta
G e
h at
r.B
D
s sor
Heuristic o(informed)Search Strategies
fe r
, P
ira
m Greedy best First
a
m iJ
a lax
G eet
h at
r.B
D
s sor
Heuristic o(informed)Search Strategies
fe r
, P
i
m
ra Greedy best First-Problem
a
m iJ
a lax
G eet
h at Solve following example using Greedy best search
r.B
D algorithm?
s sor
rofe
, P
iram
a
m iJ
a lax
G eet
h at
r.B
D
s sor
rofe
, P
iram
a
m iJ
a lax
G eet
h at
r.B
D
s sor
rofe
, P
iram
a
m iJ
a lax
G eet
h at
r.B
D
s sor
rofe
, P
iram
a
m iJ
a lax
G eet
h at
r.B
D
or
Heuristicro(informed)Search
fes s
Strategies
, P
iram 2. A*algorithm
i Ja
la xm
eta
G e
h at
r.B
D
or
Heuristicro(informed)Search
fes s
Strategies
, P
iram 2. A*algorithm- Example
i Ja
la xm
eta
G e
h at
r.B
D

h(n)
s sor
rofe
, P
iram
a
m iJ
a lax
G eet
h at
r.B
D
o r
1.How f(n) is computed
fes s anf queue is filled in A* algo
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D

GS
s sor
rofe
P ,
m
a1.How f(n) is computed in A* algo
ira
i J
m
a lax
G eet
h at
r.B
D
r
so is computed in A* algo
1.Howfesf(n)
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D
s sor A* problems
rofe
, P 8- puzzle problem
iram
a
m iJ
a lax
G eet
h at
r.B
D
s sor
rofe
, P
iram 8- puzzle problem
a
m iJ
a lax
G eet
h at
r.B
D
s sor
rofe
, P
iram 3 possibilities – 7 up, 6 down 5-left
a
m iJ
a lax
G eet
h at
r.B
D
s sor
rofe
, P
iram 6 again cant go up, only 3 possibilities
a
m iJ
a lax
G eet
h at
r.B
D
s sor
rofe
, P
a m
a ir 2, can’t take to left , already there , so 1- take up

m iJ
a lax
G eet
h at
r.B
D

1, down can’t.
already
s sor
rofe
, P
iram 8- puzzle problem
a
m iJ
a lax
G eet
h at
r.B
D
s sor
rofe
P ,
a m
a ir
i J
• Solution-A* - Always gives optimal solution
m
•ax AO* - Always will give optimal solution, no guarantee-does not expore
a l
G eet all path once it gets solution
h at
r.B
D
s sor
rofe
, P
iram
a
m iJ
a lax
G eet
h at
r.B
D
s sor
rofe
, P
iram
a
m iJ
a lax
G eet
h at
r.B
D
s sor
rofe
, P
iram
a
m iJ
a lax
G eet
h at
r.B
D

Goal State
s sor
rofe
, P
iram
a
m iJ
a lax
G eet
h at
r.B
D

1+2 1+3

1+3+4
1+2+5
1+3+2

1+3+2+1
r
so is computed in A* algo
1.Howfesf(n)
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D
r
o& Optimization: Hill Climbing
Local Search
fes s
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D

Initial state-no Final state- no queen attack


queen ather queen
s sor
rofe
, P
iram
a
m iJ
a lax
G eet
h at
r.B
D
s sor
8-Queens
ra m
P,
rofe
problem
Jai
m i
a lax
G eet
h at
r.B
D
s sor Local Search
rofe
, P
iram
a
m iJ
a lax
G eet
h at
r.B
D

Examples of Local Search Algo.


s sor

a m , P r Local Search
ofe

Jair
m i
a lax
eet Define Local search?
a tG
h
r. B Local search algorithms operate using a single
D
current node (rather than multiple paths) and
generally move only to neighbors of that node.
Typically, the paths followed by the search are not
retained.
Two key advantages of local search :
(1) they use very little memory—usually a
constant amount

(2) they can often find reasonable solutions in


large or infinite (continuous) state spaces for which
systematic algorithms are unsuitable.
r o –climbing Search
Hill
fes s
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D
r o –climbing Search
Hill
fes s
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D
r o –climbing Search
Hill
fes s
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D
o r
Hill –climbing
fes s Search Algorithm
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D
or
Genetic
fes s Algorithms (GA)
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D
or
Genetic
fes s Algorithms (GA)
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D
or
Genetic
fes s Algorithms (GA)
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D
or
Genetic
fes s Algorithms (GA)
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D
or
Genetic
fes s Algorithms (GA)
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D
or
Genetic
fes s Algorithms (GA)
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D
or
Genetic
fes s Algorithms (GA)
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D
or
Genetic
fes s Algorithms (GA)
P ro
,
iram
a
m iJ
a lax
G eet
h at
r.B
D

You might also like