SlideShare a Scribd company logo
1 of 22
Heuristic Search Techniques
Contents
• A framework for describing search methods is
provided and several general purpose search
techniques are discussed.
• All are varieties of Heuristic Search:
– Generate and test
– Hill Climbing
– Best First Search
– Problem Reduction
– Constraint Satisfaction
– Means-ends analysis
Generate-and-Test
• Algorithm:
1. Generate a possible solution. For some problems,
this means generating a particular point in the
problem space. For others it means generating a
path from a start state
2. Test to see if this is actually a solution by comparing
the chosen point or the endpoint of the chosen path
to the set of acceptable goal states.
3. If a solution has been found, quit, Otherwise return
to step 1.
Generate-and-Test
• It is a depth first search procedure since complete
solutions must be generated before they can be tested.
• In its most systematic form, it is simply an exhaustive
search of the problem space.
• Operate by generating solutions randomly.
• Also called as British Museum algorithm
• If a sufficient number of monkeys were placed in front of
a set of typewriters, and left alone long enough, then
they would eventually produce all the works of
shakespeare.
• Dendral: which infers the struture of organic compounds
using NMR spectrogram. It uses plan-generate-test.
Hill Climbing
• Is a variant of generate-and test in which
feedback from the test procedure is used to help
the generator decide which direction to move in
search space.
• The test function is augmented with a heuristic
function that provides an estimate of how close
a given state is to the goal state.
• Computation of heuristic function can be done
with negligible amount of computation.
• Hill climbing is often used when a good heuristic
function is available for evaluating states but
when no other useful knowledge is available.
Simple Hill Climbing
• Algorithm:
1. Evaluate the initial state. If it is also goal state, then
return it and quit. Otherwise continue with the initial
state as the current state.
2. Loop until a solution is found or until there are no new
operators left to be applied in the current state:
a. Select an operator that has not yet been applied to the current
state and apply it to produce a new state
b. Evaluate the new state
i. If it is the goal state, then return it and quit.
ii. If it is not a goal state but it is better than the current state, then
make it the current state.
iii. If it is not better than the current state, then continue in the loop.
Simple Hill Climbing
• The key difference between Simple Hill
climbing and Generate-and-test is the use
of evaluation function as a way to inject
task specific knowledge into the control
process.
• Is on state better than another ? For this
algorithm to work, precise definition of
better must be provided.
: Hill-climbing
This simple policy has three well-
known drawbacks:
1. Local Maxima: a local maximum
as opposed to global maximum.
2. Plateaus: An area of the search
space where evaluation function is
flat, thus requiring random walk.
3. Ridge: Where there are steep
slopes and the search direction is
not towards the top but towards the
side.
(a)
(b)
(c)
Figure 5.9 Local maxima, Plateaus and
ridge situation for Hill Climbing
Hill-climbing
• In each of the previous cases (local maxima, plateaus & ridge),
the algorithm reaches a point at which no progress is being
made.
• A solution is to do a random-restart hill-climbing - where
random initial states are generated, running each until it halts
or makes no discernible progress. The best result is then
chosen.
Figure 5.10 Random-restart hill-climbing (6 initial values) for 5.9(a)
Simulated Annealing
• A alternative to a random-restart hill-climbing when stuck on
a local maximum is to do a ‘reverse walk’ to escape the
local maximum.
• This is the idea of simulated annealing.
• The term simulated annealing derives from the roughly
analogous physical process of heating and then slowly
cooling a substance to obtain a strong crystalline structure.
• The simulated annealing process lowers the temperature by
slow stages until the system ``freezes" and no further
changes occur.
Simulated Annealing
Figure 5.11 Simulated Annealing Demo (http://www.taygeta.com/annealing/demo1.html)
Best First Search
• Combines the advantages of bith DFS and BFS
into a single method.
• DFS is good because it allows a solution to be
found without all competing branches having to
be expanded.
• BFS is good because it does not get branches
on dead end paths.
• One way of combining the tow is to follow a
single path at a time, but switch paths whenever
some competing path looks more promising than
the current one does.
BFS
• At each step of the BFS search process, we select the most
promising of the nodes we have generated so far.
• This is done by applying an appropriate heuristic function to each of
them.
• We then expand the chosen node by using the rules to generate its
successors
• Similar to Steepest ascent hill climbing with two exceptions:
– In hill climbing, one move is selected and all the others are rejected,
never to be reconsidered. This produces the straightline behaviour that
is characteristic of hill climbing.
– In BFS, one move is selected, but the others are kept around so that
they can be revisited later if the selected path becomes less promising.
Further, the best available state is selected in the BFS, even if that state
has a value that is lower than the value of the state that was just
explored. This contrasts with hill climbing, which will stop if there are no
successor states with better values than the current state.
OR-graph
• It is sometimes important to search graphs so that duplicate paths
will not be pursued.
• An algorithm to do this will operate by searching a directed graph in
which each node represents a point in problem space.
• Each node will contain:
– Description of problem state it represents
– Indication of how promising it is
– Parent link that points back to the best node from which it came
– List of nodes that were generated from it
• Parent link will make it possible to recover the path to the goal once
the goal is found.
• The list of successors will make it possible, if a better path is found
to an already existing node, to propagate the improvement down to
its successors.
• This is called OR-graph, since each of its branhes represents an
alternative problem solving path
Implementation of OR graphs
• We need two lists of nodes:
– OPEN – nodes that have been generated and have
had the heuristic function applied to them but which
have not yet been examined. OPEN is actually a
priority queue in which the elements with the highest
priority are those with the most promising value of the
heuristic function.
– CLOSED- nodes that have already been examined.
We need to keep these nodes in memory if we want
to search a graph rather than a tree, since whenver a
new node is generated, we need to check whether it
has been generated before.
BFS
Step 1 Step 2 Step 3
Step 4 Step 5
A A
B C D3 5 1
A
B C D3 5 1
E F4
6A
B C D3 5 1
E F4
6
G H6 5
A
B C D3 5 1
E F4
6
G H6 5
A A2 1
A* Algorithm
• BFS is a simplification of A* Algorithm
• Presented by Hart et al
• Algorithm uses:
– f’: Heuristic function that estimates the merits of each node we
generate. This is sum of two components, g and h’ and f’
represents an estimate of the cost of getting from the initial state
to a goal state along with the path that generated the current
node.
– g : The function g is a measure of the cost of getting from initial
state to the current node.
– h’ : The function h’ is an estimate of the additional cost of getting
from the current node to a goal state.
– OPEN
– CLOSED
A* Algorithm
1. Start with OPEN containing only initial node. Set that
node’s g value to 0, its h’ value to whatever it is, and its
f’ value to h’+0 or h’. Set CLOSED to empty list.
2. Until a goal node is found, repeat the following
procedure: If there are no nodes on OPEN, report
failure. Otherwise picj the node on OPEN with the
lowest f’ value. Call it BESTNODE. Remove it from
OPEN. Place it in CLOSED. See if the BESTNODE is
a goal state. If so exit and report a solution. Otherwise,
generate the successors of BESTNODE but do not set
the BESTNODE to point to them yet.
A* Algorithm ( contd)
• For each of the SUCCESSOR, do the following:
a. Set SUCCESSOR to point back to BESTNODE. These
backwards links will make it possible to recover the path once a
solution is found.
b. Compute g(SUCCESSOR) = g(BESTNODE) + the cost of getting
from BESTNODE to SUCCESSOR
c. See if SUCCESSOR is the same as any node on OPEN. If so call
the node OLD.
d. If SUCCESSOR was not on OPEN, see if it is on CLOSED. If so,
call the node on CLOSED OLD and add OLD to the list of
BESTNODE’s successors.
e. If SUCCESSOR was not already on either OPEN or CLOSED,
then put it on OPEN and add it to the list of BESTNODE’s
successors. Compute f’(SUCCESSOR) = g(SUCCESSOR) +
h’(SUCCESSOR)
Observations about A*
• Role of g function: This lets us choose
which node to expand next on the basis of
not only of how good the node itself looks,
but also on the basis of how good the path
to the node was.
• h’, the distance of a node to the goal.If h’
is a perfect estimator of h, then A* will
converge immediately to the goal with no
search.
AND-OR graphs
• AND-OR graph (or tree) is useful for representing the
solution of problems that can be solved by decomposing
them into a set of smaller problems, all of which must then
be solved.
• One AND arc may point to any number of successor
nodes, all of which must be solved in order for the arc to
point to a solution.
Goal: Acquire TV Set
Goal: Steal a TV Set Goal: Earn some money Goal: Buy TV Set
AND-OR graph examples
A
B C D5 3 4
A
B C D
F GE H I J
5 10 3 4 15 10
17 9 27
389

More Related Content

What's hot

State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniquesKirti Verma
 
Artificial Intelligence -- Search Algorithms
Artificial Intelligence-- Search Algorithms Artificial Intelligence-- Search Algorithms
Artificial Intelligence -- Search Algorithms Syed Ahmed
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptarunsingh660
 
Breadth First Search & Depth First Search
Breadth First Search & Depth First SearchBreadth First Search & Depth First Search
Breadth First Search & Depth First SearchKevin Jadiya
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AIMegha Sharma
 
Informed search (heuristics)
Informed search (heuristics)Informed search (heuristics)
Informed search (heuristics)Bablu Shofi
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agentsMegha Sharma
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search StrategiesAmey Kerkar
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AIVishal Singh
 
knowledge representation using rules
knowledge representation using rulesknowledge representation using rules
knowledge representation using rulesHarini Balamurugan
 
Local search algorithm
Local search algorithmLocal search algorithm
Local search algorithmMegha Sharma
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI Bharat Bhushan
 
Production system in ai
Production system in aiProduction system in ai
Production system in aisabin kafle
 

What's hot (20)

Informed search
Informed searchInformed search
Informed search
 
State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniques
 
Artificial Intelligence -- Search Algorithms
Artificial Intelligence-- Search Algorithms Artificial Intelligence-- Search Algorithms
Artificial Intelligence -- Search Algorithms
 
Hill climbing
Hill climbingHill climbing
Hill climbing
 
A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.ppt
 
Breadth First Search & Depth First Search
Breadth First Search & Depth First SearchBreadth First Search & Depth First Search
Breadth First Search & Depth First Search
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
Informed search (heuristics)
Informed search (heuristics)Informed search (heuristics)
Informed search (heuristics)
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search Strategies
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
 
knowledge representation using rules
knowledge representation using rulesknowledge representation using rules
knowledge representation using rules
 
Local search algorithm
Local search algorithmLocal search algorithm
Local search algorithm
 
search strategies in artificial intelligence
search strategies in artificial intelligencesearch strategies in artificial intelligence
search strategies in artificial intelligence
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
 
A* Search Algorithm
A* Search AlgorithmA* Search Algorithm
A* Search Algorithm
 
Frames
FramesFrames
Frames
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
Production system in ai
Production system in aiProduction system in ai
Production system in ai
 

Viewers also liked

Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logicAmey Kerkar
 
Bayesian networks in AI
Bayesian networks in AIBayesian networks in AI
Bayesian networks in AIByoung-Hee Kim
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligenceUmesh Meher
 
Control Strategies in AI
Control Strategies in AIControl Strategies in AI
Control Strategies in AIAmey Kerkar
 
Lecture 25 hill climbing
Lecture 25 hill climbingLecture 25 hill climbing
Lecture 25 hill climbingHema Kashyap
 
State Space Search(2)
State Space Search(2)State Space Search(2)
State Space Search(2)luzenith_g
 
Problems problem spaces and search
Problems problem spaces and searchProblems problem spaces and search
Problems problem spaces and searchAmey Kerkar
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & ReasoningSajid Marwat
 
(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 ai(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 aiRadhika Srinivasan
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logicgiki67
 
Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Yasir Khan
 
Heuristic Search
Heuristic SearchHeuristic Search
Heuristic Searchbutest
 
Bfs and dfs in data structure
Bfs and dfs in  data structure Bfs and dfs in  data structure
Bfs and dfs in data structure Ankit Kumar Singh
 
Breadth first search and depth first search
Breadth first search and  depth first searchBreadth first search and  depth first search
Breadth first search and depth first searchHossain Md Shakhawat
 
Ch2 3-informed (heuristic) search
Ch2 3-informed (heuristic) searchCh2 3-informed (heuristic) search
Ch2 3-informed (heuristic) searchchandsek666
 
Hillclimbing search algorthim #introduction
Hillclimbing search algorthim #introductionHillclimbing search algorthim #introduction
Hillclimbing search algorthim #introductionMohamed Gad
 

Viewers also liked (20)

Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
 
Bayesian networks in AI
Bayesian networks in AIBayesian networks in AI
Bayesian networks in AI
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Control Strategies in AI
Control Strategies in AIControl Strategies in AI
Control Strategies in AI
 
Lecture 25 hill climbing
Lecture 25 hill climbingLecture 25 hill climbing
Lecture 25 hill climbing
 
Chapter 2 (final)
Chapter 2 (final)Chapter 2 (final)
Chapter 2 (final)
 
State space search
State space search State space search
State space search
 
State Space Search(2)
State Space Search(2)State Space Search(2)
State Space Search(2)
 
Problems problem spaces and search
Problems problem spaces and searchProblems problem spaces and search
Problems problem spaces and search
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & Reasoning
 
(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 ai(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 ai
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence
 
Heuristic Search
Heuristic SearchHeuristic Search
Heuristic Search
 
Bfs and dfs in data structure
Bfs and dfs in  data structure Bfs and dfs in  data structure
Bfs and dfs in data structure
 
Breadth first search and depth first search
Breadth first search and  depth first searchBreadth first search and  depth first search
Breadth first search and depth first search
 
Ch2 3-informed (heuristic) search
Ch2 3-informed (heuristic) searchCh2 3-informed (heuristic) search
Ch2 3-informed (heuristic) search
 
ADA complete notes
ADA complete notesADA complete notes
ADA complete notes
 
Hillclimbing search algorthim #introduction
Hillclimbing search algorthim #introductionHillclimbing search algorthim #introduction
Hillclimbing search algorthim #introduction
 
130210107039 2130702
130210107039 2130702130210107039 2130702
130210107039 2130702
 

Similar to Heuristic Search Techniques {Artificial Intelligence}

Artificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptxArtificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptxCCBProduction
 
Heuristc Search Techniques
Heuristc Search TechniquesHeuristc Search Techniques
Heuristc Search TechniquesJismy .K.Jose
 
Informed Search Techniques new kirti L 8.pptx
Informed Search Techniques new kirti L 8.pptxInformed Search Techniques new kirti L 8.pptx
Informed Search Techniques new kirti L 8.pptxKirti Verma
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptkarthikaparthasarath
 
Heuristic or informed search
Heuristic or informed searchHeuristic or informed search
Heuristic or informed searchHamzaJaved64
 
unit-1-l3AI..........................ppt
unit-1-l3AI..........................pptunit-1-l3AI..........................ppt
unit-1-l3AI..........................pptShilpaBhatia32
 
Heuristic Searching Algorithms Artificial Intelligence.pptx
Heuristic Searching Algorithms Artificial Intelligence.pptxHeuristic Searching Algorithms Artificial Intelligence.pptx
Heuristic Searching Algorithms Artificial Intelligence.pptxSwagat Praharaj
 
Heuristic search
Heuristic searchHeuristic search
Heuristic searchNivethaS35
 
Heuristic search
Heuristic searchHeuristic search
Heuristic searchNivethaS35
 
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdfAI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdfAsst.prof M.Gokilavani
 
AI_Session 9 Hill climbing algorithm.pptx
AI_Session 9 Hill climbing algorithm.pptxAI_Session 9 Hill climbing algorithm.pptx
AI_Session 9 Hill climbing algorithm.pptxAsst.prof M.Gokilavani
 
AI3391 Session 11 Hill climbing algorithm.pptx
AI3391 Session 11 Hill climbing algorithm.pptxAI3391 Session 11 Hill climbing algorithm.pptx
AI3391 Session 11 Hill climbing algorithm.pptxAsst.prof M.Gokilavani
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligencesandeep54552
 
hill climbing algorithm.pptx
hill climbing algorithm.pptxhill climbing algorithm.pptx
hill climbing algorithm.pptxMghooolMasier
 

Similar to Heuristic Search Techniques {Artificial Intelligence} (20)

Artificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptxArtificial Intelligence_Anjali_Kumari_26900122059.pptx
Artificial Intelligence_Anjali_Kumari_26900122059.pptx
 
Heuristc Search Techniques
Heuristc Search TechniquesHeuristc Search Techniques
Heuristc Search Techniques
 
Informed Search Techniques new kirti L 8.pptx
Informed Search Techniques new kirti L 8.pptxInformed Search Techniques new kirti L 8.pptx
Informed Search Techniques new kirti L 8.pptx
 
informed search.pptx
informed search.pptxinformed search.pptx
informed search.pptx
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.ppt
 
Heuristic or informed search
Heuristic or informed searchHeuristic or informed search
Heuristic or informed search
 
unit-1-l3.ppt
unit-1-l3.pptunit-1-l3.ppt
unit-1-l3.ppt
 
unit-1-l3AI..........................ppt
unit-1-l3AI..........................pptunit-1-l3AI..........................ppt
unit-1-l3AI..........................ppt
 
Heuristic Searching Algorithms Artificial Intelligence.pptx
Heuristic Searching Algorithms Artificial Intelligence.pptxHeuristic Searching Algorithms Artificial Intelligence.pptx
Heuristic Searching Algorithms Artificial Intelligence.pptx
 
Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
Hill climbing algorithm
Hill climbing algorithmHill climbing algorithm
Hill climbing algorithm
 
Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdfAI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
 
AI_Session 9 Hill climbing algorithm.pptx
AI_Session 9 Hill climbing algorithm.pptxAI_Session 9 Hill climbing algorithm.pptx
AI_Session 9 Hill climbing algorithm.pptx
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
AI3391 Session 11 Hill climbing algorithm.pptx
AI3391 Session 11 Hill climbing algorithm.pptxAI3391 Session 11 Hill climbing algorithm.pptx
AI3391 Session 11 Hill climbing algorithm.pptx
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligence
 
hill climbing algorithm.pptx
hill climbing algorithm.pptxhill climbing algorithm.pptx
hill climbing algorithm.pptx
 
AI_ppt.pptx
AI_ppt.pptxAI_ppt.pptx
AI_ppt.pptx
 
Lec 6 bsc csit
Lec 6 bsc csitLec 6 bsc csit
Lec 6 bsc csit
 

More from FellowBuddy.com

The Internet, Intranet and Extranet
The Internet, Intranet and ExtranetThe Internet, Intranet and Extranet
The Internet, Intranet and ExtranetFellowBuddy.com
 
Database Management System
Database Management System Database Management System
Database Management System FellowBuddy.com
 
Microsoft Office PowerPoint 2007 Training
Microsoft Office PowerPoint 2007 TrainingMicrosoft Office PowerPoint 2007 Training
Microsoft Office PowerPoint 2007 TrainingFellowBuddy.com
 
Business Studies Class xii
Business Studies Class xiiBusiness Studies Class xii
Business Studies Class xiiFellowBuddy.com
 
Risk and Risk Aversion FM
Risk and Risk Aversion FMRisk and Risk Aversion FM
Risk and Risk Aversion FMFellowBuddy.com
 
Refrigeration Engineering Lecture Notes
Refrigeration Engineering Lecture NotesRefrigeration Engineering Lecture Notes
Refrigeration Engineering Lecture NotesFellowBuddy.com
 
Production and Operation Management Lecture Notes
Production and Operation Management Lecture NotesProduction and Operation Management Lecture Notes
Production and Operation Management Lecture NotesFellowBuddy.com
 
Leadership Theories {HR}
Leadership Theories {HR}Leadership Theories {HR}
Leadership Theories {HR}FellowBuddy.com
 
Interpersonal Communication Skills {HR}
Interpersonal Communication Skills {HR}Interpersonal Communication Skills {HR}
Interpersonal Communication Skills {HR}FellowBuddy.com
 
Industrial Dispute Act, 1947 {HR}
Industrial Dispute Act, 1947 {HR}Industrial Dispute Act, 1947 {HR}
Industrial Dispute Act, 1947 {HR}FellowBuddy.com
 
Factories act, 1948 {HR}
Factories act, 1948 {HR}Factories act, 1948 {HR}
Factories act, 1948 {HR}FellowBuddy.com
 
Ratio and Proportion, Indices and Logarithm Part 4
Ratio and Proportion, Indices and Logarithm Part 4Ratio and Proportion, Indices and Logarithm Part 4
Ratio and Proportion, Indices and Logarithm Part 4FellowBuddy.com
 
Ratio and Proportion, Indices and Logarithm Part 2
Ratio and Proportion, Indices and Logarithm Part 2Ratio and Proportion, Indices and Logarithm Part 2
Ratio and Proportion, Indices and Logarithm Part 2FellowBuddy.com
 
Ratio and Proportion, Indices and Logarithm Part 1
Ratio and Proportion, Indices and Logarithm Part 1Ratio and Proportion, Indices and Logarithm Part 1
Ratio and Proportion, Indices and Logarithm Part 1FellowBuddy.com
 
Limits and Continuity - Intuitive Approach part 3
Limits and Continuity - Intuitive Approach part 3Limits and Continuity - Intuitive Approach part 3
Limits and Continuity - Intuitive Approach part 3FellowBuddy.com
 
Limits and Continuity - Intuitive Approach part 2
Limits and Continuity - Intuitive Approach part 2Limits and Continuity - Intuitive Approach part 2
Limits and Continuity - Intuitive Approach part 2FellowBuddy.com
 

More from FellowBuddy.com (20)

The Internet, Intranet and Extranet
The Internet, Intranet and ExtranetThe Internet, Intranet and Extranet
The Internet, Intranet and Extranet
 
Database Management System
Database Management System Database Management System
Database Management System
 
Operating System
Operating System Operating System
Operating System
 
Microsoft Office PowerPoint 2007 Training
Microsoft Office PowerPoint 2007 TrainingMicrosoft Office PowerPoint 2007 Training
Microsoft Office PowerPoint 2007 Training
 
Social science class_x
Social science class_xSocial science class_x
Social science class_x
 
Maths class x
Maths class xMaths class x
Maths class x
 
Business Studies Class xii
Business Studies Class xiiBusiness Studies Class xii
Business Studies Class xii
 
Risk and Risk Aversion FM
Risk and Risk Aversion FMRisk and Risk Aversion FM
Risk and Risk Aversion FM
 
Refrigeration Engineering Lecture Notes
Refrigeration Engineering Lecture NotesRefrigeration Engineering Lecture Notes
Refrigeration Engineering Lecture Notes
 
Production and Operation Management Lecture Notes
Production and Operation Management Lecture NotesProduction and Operation Management Lecture Notes
Production and Operation Management Lecture Notes
 
Strategic HRM {HR}
Strategic HRM {HR}Strategic HRM {HR}
Strategic HRM {HR}
 
Leadership Theories {HR}
Leadership Theories {HR}Leadership Theories {HR}
Leadership Theories {HR}
 
Interpersonal Communication Skills {HR}
Interpersonal Communication Skills {HR}Interpersonal Communication Skills {HR}
Interpersonal Communication Skills {HR}
 
Industrial Dispute Act, 1947 {HR}
Industrial Dispute Act, 1947 {HR}Industrial Dispute Act, 1947 {HR}
Industrial Dispute Act, 1947 {HR}
 
Factories act, 1948 {HR}
Factories act, 1948 {HR}Factories act, 1948 {HR}
Factories act, 1948 {HR}
 
Ratio and Proportion, Indices and Logarithm Part 4
Ratio and Proportion, Indices and Logarithm Part 4Ratio and Proportion, Indices and Logarithm Part 4
Ratio and Proportion, Indices and Logarithm Part 4
 
Ratio and Proportion, Indices and Logarithm Part 2
Ratio and Proportion, Indices and Logarithm Part 2Ratio and Proportion, Indices and Logarithm Part 2
Ratio and Proportion, Indices and Logarithm Part 2
 
Ratio and Proportion, Indices and Logarithm Part 1
Ratio and Proportion, Indices and Logarithm Part 1Ratio and Proportion, Indices and Logarithm Part 1
Ratio and Proportion, Indices and Logarithm Part 1
 
Limits and Continuity - Intuitive Approach part 3
Limits and Continuity - Intuitive Approach part 3Limits and Continuity - Intuitive Approach part 3
Limits and Continuity - Intuitive Approach part 3
 
Limits and Continuity - Intuitive Approach part 2
Limits and Continuity - Intuitive Approach part 2Limits and Continuity - Intuitive Approach part 2
Limits and Continuity - Intuitive Approach part 2
 

Recently uploaded

ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 

Recently uploaded (20)

ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 

Heuristic Search Techniques {Artificial Intelligence}

  • 2. Contents • A framework for describing search methods is provided and several general purpose search techniques are discussed. • All are varieties of Heuristic Search: – Generate and test – Hill Climbing – Best First Search – Problem Reduction – Constraint Satisfaction – Means-ends analysis
  • 3. Generate-and-Test • Algorithm: 1. Generate a possible solution. For some problems, this means generating a particular point in the problem space. For others it means generating a path from a start state 2. Test to see if this is actually a solution by comparing the chosen point or the endpoint of the chosen path to the set of acceptable goal states. 3. If a solution has been found, quit, Otherwise return to step 1.
  • 4. Generate-and-Test • It is a depth first search procedure since complete solutions must be generated before they can be tested. • In its most systematic form, it is simply an exhaustive search of the problem space. • Operate by generating solutions randomly. • Also called as British Museum algorithm • If a sufficient number of monkeys were placed in front of a set of typewriters, and left alone long enough, then they would eventually produce all the works of shakespeare. • Dendral: which infers the struture of organic compounds using NMR spectrogram. It uses plan-generate-test.
  • 5. Hill Climbing • Is a variant of generate-and test in which feedback from the test procedure is used to help the generator decide which direction to move in search space. • The test function is augmented with a heuristic function that provides an estimate of how close a given state is to the goal state. • Computation of heuristic function can be done with negligible amount of computation. • Hill climbing is often used when a good heuristic function is available for evaluating states but when no other useful knowledge is available.
  • 6. Simple Hill Climbing • Algorithm: 1. Evaluate the initial state. If it is also goal state, then return it and quit. Otherwise continue with the initial state as the current state. 2. Loop until a solution is found or until there are no new operators left to be applied in the current state: a. Select an operator that has not yet been applied to the current state and apply it to produce a new state b. Evaluate the new state i. If it is the goal state, then return it and quit. ii. If it is not a goal state but it is better than the current state, then make it the current state. iii. If it is not better than the current state, then continue in the loop.
  • 7. Simple Hill Climbing • The key difference between Simple Hill climbing and Generate-and-test is the use of evaluation function as a way to inject task specific knowledge into the control process. • Is on state better than another ? For this algorithm to work, precise definition of better must be provided.
  • 8. : Hill-climbing This simple policy has three well- known drawbacks: 1. Local Maxima: a local maximum as opposed to global maximum. 2. Plateaus: An area of the search space where evaluation function is flat, thus requiring random walk. 3. Ridge: Where there are steep slopes and the search direction is not towards the top but towards the side. (a) (b) (c) Figure 5.9 Local maxima, Plateaus and ridge situation for Hill Climbing
  • 9. Hill-climbing • In each of the previous cases (local maxima, plateaus & ridge), the algorithm reaches a point at which no progress is being made. • A solution is to do a random-restart hill-climbing - where random initial states are generated, running each until it halts or makes no discernible progress. The best result is then chosen. Figure 5.10 Random-restart hill-climbing (6 initial values) for 5.9(a)
  • 10. Simulated Annealing • A alternative to a random-restart hill-climbing when stuck on a local maximum is to do a ‘reverse walk’ to escape the local maximum. • This is the idea of simulated annealing. • The term simulated annealing derives from the roughly analogous physical process of heating and then slowly cooling a substance to obtain a strong crystalline structure. • The simulated annealing process lowers the temperature by slow stages until the system ``freezes" and no further changes occur.
  • 11. Simulated Annealing Figure 5.11 Simulated Annealing Demo (http://www.taygeta.com/annealing/demo1.html)
  • 12. Best First Search • Combines the advantages of bith DFS and BFS into a single method. • DFS is good because it allows a solution to be found without all competing branches having to be expanded. • BFS is good because it does not get branches on dead end paths. • One way of combining the tow is to follow a single path at a time, but switch paths whenever some competing path looks more promising than the current one does.
  • 13. BFS • At each step of the BFS search process, we select the most promising of the nodes we have generated so far. • This is done by applying an appropriate heuristic function to each of them. • We then expand the chosen node by using the rules to generate its successors • Similar to Steepest ascent hill climbing with two exceptions: – In hill climbing, one move is selected and all the others are rejected, never to be reconsidered. This produces the straightline behaviour that is characteristic of hill climbing. – In BFS, one move is selected, but the others are kept around so that they can be revisited later if the selected path becomes less promising. Further, the best available state is selected in the BFS, even if that state has a value that is lower than the value of the state that was just explored. This contrasts with hill climbing, which will stop if there are no successor states with better values than the current state.
  • 14. OR-graph • It is sometimes important to search graphs so that duplicate paths will not be pursued. • An algorithm to do this will operate by searching a directed graph in which each node represents a point in problem space. • Each node will contain: – Description of problem state it represents – Indication of how promising it is – Parent link that points back to the best node from which it came – List of nodes that were generated from it • Parent link will make it possible to recover the path to the goal once the goal is found. • The list of successors will make it possible, if a better path is found to an already existing node, to propagate the improvement down to its successors. • This is called OR-graph, since each of its branhes represents an alternative problem solving path
  • 15. Implementation of OR graphs • We need two lists of nodes: – OPEN – nodes that have been generated and have had the heuristic function applied to them but which have not yet been examined. OPEN is actually a priority queue in which the elements with the highest priority are those with the most promising value of the heuristic function. – CLOSED- nodes that have already been examined. We need to keep these nodes in memory if we want to search a graph rather than a tree, since whenver a new node is generated, we need to check whether it has been generated before.
  • 16. BFS Step 1 Step 2 Step 3 Step 4 Step 5 A A B C D3 5 1 A B C D3 5 1 E F4 6A B C D3 5 1 E F4 6 G H6 5 A B C D3 5 1 E F4 6 G H6 5 A A2 1
  • 17. A* Algorithm • BFS is a simplification of A* Algorithm • Presented by Hart et al • Algorithm uses: – f’: Heuristic function that estimates the merits of each node we generate. This is sum of two components, g and h’ and f’ represents an estimate of the cost of getting from the initial state to a goal state along with the path that generated the current node. – g : The function g is a measure of the cost of getting from initial state to the current node. – h’ : The function h’ is an estimate of the additional cost of getting from the current node to a goal state. – OPEN – CLOSED
  • 18. A* Algorithm 1. Start with OPEN containing only initial node. Set that node’s g value to 0, its h’ value to whatever it is, and its f’ value to h’+0 or h’. Set CLOSED to empty list. 2. Until a goal node is found, repeat the following procedure: If there are no nodes on OPEN, report failure. Otherwise picj the node on OPEN with the lowest f’ value. Call it BESTNODE. Remove it from OPEN. Place it in CLOSED. See if the BESTNODE is a goal state. If so exit and report a solution. Otherwise, generate the successors of BESTNODE but do not set the BESTNODE to point to them yet.
  • 19. A* Algorithm ( contd) • For each of the SUCCESSOR, do the following: a. Set SUCCESSOR to point back to BESTNODE. These backwards links will make it possible to recover the path once a solution is found. b. Compute g(SUCCESSOR) = g(BESTNODE) + the cost of getting from BESTNODE to SUCCESSOR c. See if SUCCESSOR is the same as any node on OPEN. If so call the node OLD. d. If SUCCESSOR was not on OPEN, see if it is on CLOSED. If so, call the node on CLOSED OLD and add OLD to the list of BESTNODE’s successors. e. If SUCCESSOR was not already on either OPEN or CLOSED, then put it on OPEN and add it to the list of BESTNODE’s successors. Compute f’(SUCCESSOR) = g(SUCCESSOR) + h’(SUCCESSOR)
  • 20. Observations about A* • Role of g function: This lets us choose which node to expand next on the basis of not only of how good the node itself looks, but also on the basis of how good the path to the node was. • h’, the distance of a node to the goal.If h’ is a perfect estimator of h, then A* will converge immediately to the goal with no search.
  • 21. AND-OR graphs • AND-OR graph (or tree) is useful for representing the solution of problems that can be solved by decomposing them into a set of smaller problems, all of which must then be solved. • One AND arc may point to any number of successor nodes, all of which must be solved in order for the arc to point to a solution. Goal: Acquire TV Set Goal: Steal a TV Set Goal: Earn some money Goal: Buy TV Set
  • 22. AND-OR graph examples A B C D5 3 4 A B C D F GE H I J 5 10 3 4 15 10 17 9 27 389