SlideShare a Scribd company logo
Seminar
on
Heuristic Search Techniques
Submitted to:
Mr.Chetan Gupta
POST GRADUATE GOVERNMENT COLLEGE SECTOR 11
CHANDIGARH
Department of Professional Studies
Submitted by:
Arshdeep kaur
Roll no.462023
Msc.it
heuristic technique.pptx...............................
A heuristic is a technique that is used to
solve a problem faster than the classic
methods. These techniques are used to find
the approximate solution of a problem when
classical methods do not. Heuristics are said
to be the problem-solving techniques that
result in practical and quick solutions.
Heuristics are strategies that are derived
from past experience with similar problems.
Heuristics use practical methods and
shortcuts used to produce the solutions that
may or may not be optimal, but those
solutions are sufficient in a given limited
timeframe.
The following Algorithm make use of
Heuristic evolution:
Hill Climbing
Best First Search
A*
AO*
Constraint Satisfaction
Means-ends Analysis
Hill climbing algorithm is a local search algorithm which continuously
moves in the direction of increasing elevation/value to find the peak of
the mountain or best solution to the problem. It terminates when it
reaches a peak value where no neighbor has a higher value.
Hill climbing algorithm is a technique which is used for optimizing the
mathematical problems. One of the widely discussed examples of Hill
climbing algorithm is Traveling-salesman Problem in which we need to
minimize the distance traveled by the salesman.
It is also called greedy local search as it only looks to its good immediate
neighbor state and not beyond that.
A node of hill climbing algorithm has two components which are state
and value.
HILL
CLIMBING
State space diagram for hill
climbing
The state-space diagram is a graphical
representation of the set of states our search
algorithm can reach vs the value of our
objective function(the function which we
wish to maximize).
X-axis: denotes the state space ie states or
configuration our algorithm may reach.
Y-axis: denotes the values of objective
function corresponding to a particular state.
The best solution will be a state space where
the objective function has a maximum
value(global maximum).
Local maximum: It is a state which is better than its neighboring state however
there exists a state which is better than it(global maximum).
Global maximum: It is the best possible state in the state space diagram.
This is because, at this stage, the objective function has the highest value.
Plateau/flat local maximum: It is a flat region of state space where
neighboring states have the same value.
Ridge: It is a region that is higher than its neighbors but itself
has a slope. It is a special kind of local maximum.
Current state: The region of the state space diagram where
we are currently present during the search.
Shoulder: It is a plateau that has an uphill edge.
Different
region in
state space
diagran
ALGORITHM
FOR SIMPLE
HILL CLIMBING
Step 1: Evaluate the initial state, if it is goal state then
return success and Stop
Step 2: Loop Until a solution is found or there is no new
operator left to apply.
Step 3: Select and apply an operator to
the current state.
Step 4: Check new state:
Step 5: Exit.
BEST FIRST SEARCH
Best first search (BFS) is a search algorithm that functions at a particular rule
and uses a priority queue and heuristic search. It is ideal for computers to
evaluate the appropriate and shortest path through a maze of possibilities.
Suppose you get stuck in a big maze and do not know how and where to
exit quickly. Here, the best first search in AI aids your system program to
evaluate and choose the right path at every succeeding step to reach the
goal as quickly as possible.
For example, imagine you are playing a video game of Super Mario or
Contra where you have to reach the goal and kill the enemy. The best first
search aid computer system to control the Mario or Contra to check the
quickest route or way to kill the enemy. It evaluates distinct paths and
selects the closest one with no other threats to reach your goal and kill the
enemy as fast as possible
heuristic technique.pptx...............................
step1 • Place the starting node into the OPEN list
step2 • If the OPEN list is empty, Stop and return failure.
ste3p
• Remove the node n, from the OPEN list which has the
lowest value of h(n), and places it in the CLOSED list.
step4
• Expand the node n, and generate the successors of
node n.
step5
• Check each successor of node n, and find whether any node is a goal node
or not. If any successor node is goal node, then return success and terminate
the search, else proceed to Step 6.
step6
• For each successor node, algorithm checks for evaluation function f(n), and
then check if the node has been in either OPEN or CLOSED list. If the node has
not been in both list, then add it to the OPEN list.
BEST FIRST SEARCH ALGORITHM
A* Search Algorithm:
A* search is the most commonly known form of
best-first search. It uses heuristic function h(n),
and cost to reach the node n from the start state
g(n). It has combined features of UCS and
greedy best-first search, by which it solve the
problem efficiently. A* search algorithm finds the
shortest path through the search space using the
heuristic function. This search algorithm expands
less search tree and provides optimal result
faster. A* algorithm is similar to UCS except that it
uses g(n)+h(n) instead of g(n).
In A* search algorithm, we use search heuristic as
well as the cost to reach the node. Hence we
can combine both costs as following, and this
sum is called as a fitness number.
Its an informed search and works as best first search. ● AO* Algorithm is based on problem
decomposition (Breakdown problem into small pieces). ● Its an efficient method to explore
a solution path. ● AO* is often used for the common pathfinding problem in applications
such as video games, but was originally designed as a general graph traversal algorithm. ●
It finds applications in diverse problems, including the problem of parsing using stochastic
grammars in NLP. ● Other cases include an Informational search with online learning. ● It is
useful for searching game trees, problem solving etc.
AND-OR Graph ● AND-OR graph 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. Own Mobile Phone Steal It Earn Money Buy mobile phone
AO* ALGORITHM
Algorithm of A* search:
 Step1: Place the starting node in the OPEN list.
 Step 2: Check if the OPEN list is empty or not, if the list is empty then return failure
and stops.
 Step 3: Select the node from the OPEN list which has the smallest value of
evaluation function (g+h), if node n is goal node then return success and stop,
otherwise
 Step 4: Expand node n and generate all of its successors, and put n into the
closed list. For each successor n', check whether n' is already in the OPEN or
CLOSED list, if not then compute evaluation function for n' and place into Open
list.
 Step 5: Else if node n' is already in OPEN and CLOSED, then it should be attached
to the back pointer which reflects the lowest g(n') value.
 Step 6: Return to Step 2.
In this example, we will traverse the given graph using the A* algorithm. The
heuristic value of all states is given in the below table so we will calculate the f(n) of
each state using the formula f(n)= g(n) + h(n), where g(n) is the cost to reach any
node from start state.
Here we will use OPEN and CLOSED list.
EXAMPLE
1. Initialization: {(S, 5)}
2. Iteration1: {(S--> A, 4), (S-->G,
10)}
3. Iteration2: {(S--> A-->C, 4), (S-->
A-->B, 7), (S-->G, 10)}
4. Iteration3: {(S--> A-->C--->G, 6),
(S--> A-->C--->D, 11), (S--> A--
>B, 7), (S-->G, 10)}
5. Iteration 4 will give the final
result, as S--->A--->C--->G it
provides the optimal path with
cost 6.
SOLUTION
 Its an informed search and works as best first search. ● AO* Algorithm is based on
problem decomposition (Breakdown problem into small pieces). ● Its an efficient
method to explore a solution path. ● AO* is often used for the common pathfinding
problem in applications such as video games, but was originally designed as a general
graph traversal algorithm. ● It finds applications in diverse problems, including the
problem of parsing using stochastic grammars in NLP. ● Other cases include an
Informational search with online learning. ● It is useful for searching game trees,
problem solving etc.
AND-OR Graph
 ● AND-OR graph 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.
 Node in the graph will point both down to its successors and up to its parent nodes. ●
Each Node in the graph will also have a heuristic value associated with it. f(n)=g(n)
+h(n) f(n): Cost function. g(n): Actual cost or Edge value h(n): Heuristic/ Estimated
value of the nodes
AO* Algorithm
 Initialise the graph to start node
 Traverse the graph following the current path
accumulating nodes that have not yet been
expanded or solved
 Pick any of these nodes and expand it and if it has no
successors call this value FUTILITY otherwise calculate
only f` for each of the successors.
 . If f` is 0 then mark the node as SOLVED
 . Change the value of f` for the newly created node
to reflect its successors by back propagation
 . Wherever possible use the most promising routes and
if a node is marked as SOLVED then mark the parent
node as SOLVED.
 If starting node is SOLVED or value greater than
FUTILITY, stop, else repeat from 2.
AO* Algorithm
heuristic technique.pptx...............................
Constraint Satisfaction Problems (CSP)
• Constraints: The guidelines that control how variables relate to one another are known
as constraints. Constraints in a CSP define the ranges of possible values for variables.
Unary constraints, binary constraints, and higher-order constraints are only a few
examples of the various sorts of constraints. For instance, in a sudoku problem, the
restrictions might be that each row, column, and 3×3 box can only have one instance
of each number from 1 to 9.
CSP REPRESENTATION:
• The finite set of variables V1, V2, V3 ……………..Vn.
• Non-empty domain for every single variable D1, D2, D3 …………..Dn.
• The finite set of constraints C1, C2 …….…, Cm.
• where each constraint Ci restricts the possible values for variables,
• e.g., V1 ≠ V2
• Each constraint Ci is a pair <scope, relation>
• Example: <(V1, V2), V1 not equal to V2>
• Scope = set of variables that participate in constraint.
• Relation = list of valid variable value combinations.
• There might be a clear list of permitted combinations. Perhaps a relation that is
abstract and that allows for membership testing and listing.
heuristic technique.pptx...............................
The means-ends analysis process can be
applied recursively for a problem. It is a
strategy to control search in problem-solving.
Following are the main Steps which describes
the working of MEA technique for solving a
problem.
First, evaluate the difference between Initial
State and final State.
Select the various operators which can be
applied for each difference.
Apply the operator at each difference, which
reduces the difference between the current
state and goal state.
MEANS ENDS ANALYSIS
ALGORITHM FOR MEANS END ANALYSIS
1. Step 1: Compare CURRENT to GOAL, if there are no differences between both
then return Success and Exit.
2. Step 2: Else, select the most significant difference and reduce it by doing the
following steps until the success or failure occurs.
3. Select a new operator O which is applicable for the current difference, and if
there is no such operator, then signal failure.
4. Attempt to apply operator O to CURRENT. Make a description of two states.
5. i) O-Start, a state in which O?s preconditions are satisfied.
6. ii) O-Result, the state that would result if O were applied In O-start.
7. If
8. (First-Part <------ MEA (CURRENT, O-START)
9. And
10.(LAST-Part <----- MEA (O-Result, GOAL), are successful, then signal Success and
return the result of combining FIRST-PART, O, and LAST-PART.
heuristic technique.pptx...............................

More Related Content

PDF
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
Guru Nanak Technical Institutions
 
PPT
unit-1-l3AI..........................ppt
ShilpaBhatia32
 
PPTX
Heuristic Searching Algorithms Artificial Intelligence.pptx
Swagat Praharaj
 
PPT
Heuristic Search Techniques {Artificial Intelligence}
FellowBuddy.com
 
PDF
Unit-3 (2).pdf WEAK SLOT-AND-FILLER STRUCTURES
dnyandip40
 
PPTX
Artificial Intelligence_Anjali_Kumari_26900122059.pptx
CCBProduction
 
PPTX
HEURISTIC SEARCH and other technique.pptx
rakeshkumar12020604
 
PPTX
Informed Search Techniques new kirti L 8.pptx
Kirti Verma
 
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
Guru Nanak Technical Institutions
 
unit-1-l3AI..........................ppt
ShilpaBhatia32
 
Heuristic Searching Algorithms Artificial Intelligence.pptx
Swagat Praharaj
 
Heuristic Search Techniques {Artificial Intelligence}
FellowBuddy.com
 
Unit-3 (2).pdf WEAK SLOT-AND-FILLER STRUCTURES
dnyandip40
 
Artificial Intelligence_Anjali_Kumari_26900122059.pptx
CCBProduction
 
HEURISTIC SEARCH and other technique.pptx
rakeshkumar12020604
 
Informed Search Techniques new kirti L 8.pptx
Kirti Verma
 

Similar to heuristic technique.pptx............................... (20)

PPT
Heuristic Search Techniques Unit -II.ppt
karthikaparthasarath
 
PPT
Heuristic Search Techniques Unit -II.ppt
karthikaparthasarath
 
PDF
UNIT 2 - Artificial intelligence merged.pdf
SwarnaMugi2
 
PPTX
Control Strategies in AI
Amey Kerkar
 
PPTX
Informed and Uninformed search Strategies
Amey Kerkar
 
PPTX
A Star Algorithm in Artificial intelligence
vipulkondekar
 
PPTX
informed search.pptx
SoundariyaSathish
 
PPTX
Unit 3 Informed Search Strategies.pptx
DrYogeshDeshmukh1
 
PDF
A* Search Algorithm
vikas dhakane
 
PDF
Heuristic Searching: A* Search
IOSR Journals
 
PPTX
AI BEST FIRST,A-STAR,AO-STAR SEARCH.pptx
KALPANAC20
 
PPTX
AI UNIT-1-BREADTH and BEST FIRST SEARCH.pptx
KALPANAC20
 
PPTX
Artificial Intelligence
Jay Nagar
 
PPTX
BFS,DFS, BEST FIRST,A-STAR,AO-STAR SEARCH.pptx
KALPANAC20
 
PPTX
Artificial intelligence topic for the btech studentCT II.pptx
bharatipatel22
 
PPTX
484507360-Lecture-4-Heuristic-Search-Strategies.pptx
hbashir659
 
PPTX
AO star algorithm -Adv-Ltms-comp AI.pptx
karthikaparthasarath
 
PPTX
Heuristic or informed search
HamzaJaved64
 
PPT
Heuristic search problem-solving str.ppt
SahilSharma872516
 
PPTX
Artificial Intelligence and Machine Learning.pptx
bobertbaratheon74
 
Heuristic Search Techniques Unit -II.ppt
karthikaparthasarath
 
Heuristic Search Techniques Unit -II.ppt
karthikaparthasarath
 
UNIT 2 - Artificial intelligence merged.pdf
SwarnaMugi2
 
Control Strategies in AI
Amey Kerkar
 
Informed and Uninformed search Strategies
Amey Kerkar
 
A Star Algorithm in Artificial intelligence
vipulkondekar
 
informed search.pptx
SoundariyaSathish
 
Unit 3 Informed Search Strategies.pptx
DrYogeshDeshmukh1
 
A* Search Algorithm
vikas dhakane
 
Heuristic Searching: A* Search
IOSR Journals
 
AI BEST FIRST,A-STAR,AO-STAR SEARCH.pptx
KALPANAC20
 
AI UNIT-1-BREADTH and BEST FIRST SEARCH.pptx
KALPANAC20
 
Artificial Intelligence
Jay Nagar
 
BFS,DFS, BEST FIRST,A-STAR,AO-STAR SEARCH.pptx
KALPANAC20
 
Artificial intelligence topic for the btech studentCT II.pptx
bharatipatel22
 
484507360-Lecture-4-Heuristic-Search-Strategies.pptx
hbashir659
 
AO star algorithm -Adv-Ltms-comp AI.pptx
karthikaparthasarath
 
Heuristic or informed search
HamzaJaved64
 
Heuristic search problem-solving str.ppt
SahilSharma872516
 
Artificial Intelligence and Machine Learning.pptx
bobertbaratheon74
 
Ad

Recently uploaded (20)

PDF
What are the steps to buy GitHub accounts safely?
d14405913
 
PDF
John Lowry Spartan Capital_ Modern Wealth Management Strategies That Extend B...
John Lowry Spartan Capital
 
PPTX
BUSINESS FINANCE POWER POINT PRESENTATION
JethSrey
 
PDF
Data Sheet Cloud Integration Platform - dataZap
Chainsys SEO
 
PPTX
Foreign-Direct-Investment-Shaping-the-Global-Trade-Landscape 5.pptx
Blackworld7
 
PPTX
Unlocking Creativity Top Adobe Tools for Content Creators Buy Adobe Software...
PI Software
 
PPTX
Appreciations - July 25.pptxdddddddddddss
anushavnayak
 
PPTX
Decoding BPMN: A Clear Guide to Business Process Modeling
RUPAL AGARWAL
 
PPTX
Virbyze_Our company profile_Preview.pptx
myckwabs
 
PPTX
Keynote: CATHOLIC UNIVERSITY: A PLACE OF CREATIVITY AND KNOWLEDGE
Alvaro Barbosa
 
PPT
How to Protect Your New York Business from the Unexpected
Sam Vohra
 
PPTX
Social Media Marketing for Business Growth
vidhi622006
 
PPTX
What is Letter Writing, Letter Writing Sample
SeemaAgrawal43
 
DOCX
unit 1 BC.docx - INTRODUCTION TO BUSINESS COMMUICATION
MANJU N
 
PDF
bain-temasek-sea-green-economy-2022-report-investing-behind-the-new-realities...
YudiSaputra43
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
MDR Services – 24x7 Managed Detection and Response
CyberNX Technologies Private Limited
 
PDF
Rodolfo Belcastro su All Around The Worlds Magazine - Febbraio 2025
Rodolfo Belcastro
 
DOCX
UNIT 2 BC.docx- cv - RESOLUTION -MINUTES-NOTICE - BUSINESS LETTER DRAFTING
MANJU N
 
PDF
Followers to Fees - Social media for Speakers
Corey Perlman, Social Media Speaker and Consultant
 
What are the steps to buy GitHub accounts safely?
d14405913
 
John Lowry Spartan Capital_ Modern Wealth Management Strategies That Extend B...
John Lowry Spartan Capital
 
BUSINESS FINANCE POWER POINT PRESENTATION
JethSrey
 
Data Sheet Cloud Integration Platform - dataZap
Chainsys SEO
 
Foreign-Direct-Investment-Shaping-the-Global-Trade-Landscape 5.pptx
Blackworld7
 
Unlocking Creativity Top Adobe Tools for Content Creators Buy Adobe Software...
PI Software
 
Appreciations - July 25.pptxdddddddddddss
anushavnayak
 
Decoding BPMN: A Clear Guide to Business Process Modeling
RUPAL AGARWAL
 
Virbyze_Our company profile_Preview.pptx
myckwabs
 
Keynote: CATHOLIC UNIVERSITY: A PLACE OF CREATIVITY AND KNOWLEDGE
Alvaro Barbosa
 
How to Protect Your New York Business from the Unexpected
Sam Vohra
 
Social Media Marketing for Business Growth
vidhi622006
 
What is Letter Writing, Letter Writing Sample
SeemaAgrawal43
 
unit 1 BC.docx - INTRODUCTION TO BUSINESS COMMUICATION
MANJU N
 
bain-temasek-sea-green-economy-2022-report-investing-behind-the-new-realities...
YudiSaputra43
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
MDR Services – 24x7 Managed Detection and Response
CyberNX Technologies Private Limited
 
Rodolfo Belcastro su All Around The Worlds Magazine - Febbraio 2025
Rodolfo Belcastro
 
UNIT 2 BC.docx- cv - RESOLUTION -MINUTES-NOTICE - BUSINESS LETTER DRAFTING
MANJU N
 
Followers to Fees - Social media for Speakers
Corey Perlman, Social Media Speaker and Consultant
 
Ad

heuristic technique.pptx...............................

  • 1. Seminar on Heuristic Search Techniques Submitted to: Mr.Chetan Gupta POST GRADUATE GOVERNMENT COLLEGE SECTOR 11 CHANDIGARH Department of Professional Studies Submitted by: Arshdeep kaur Roll no.462023 Msc.it
  • 3. A heuristic is a technique that is used to solve a problem faster than the classic methods. These techniques are used to find the approximate solution of a problem when classical methods do not. Heuristics are said to be the problem-solving techniques that result in practical and quick solutions. Heuristics are strategies that are derived from past experience with similar problems. Heuristics use practical methods and shortcuts used to produce the solutions that may or may not be optimal, but those solutions are sufficient in a given limited timeframe.
  • 4. The following Algorithm make use of Heuristic evolution: Hill Climbing Best First Search A* AO* Constraint Satisfaction Means-ends Analysis
  • 5. Hill climbing algorithm is a local search algorithm which continuously moves in the direction of increasing elevation/value to find the peak of the mountain or best solution to the problem. It terminates when it reaches a peak value where no neighbor has a higher value. Hill climbing algorithm is a technique which is used for optimizing the mathematical problems. One of the widely discussed examples of Hill climbing algorithm is Traveling-salesman Problem in which we need to minimize the distance traveled by the salesman. It is also called greedy local search as it only looks to its good immediate neighbor state and not beyond that. A node of hill climbing algorithm has two components which are state and value. HILL CLIMBING
  • 6. State space diagram for hill climbing The state-space diagram is a graphical representation of the set of states our search algorithm can reach vs the value of our objective function(the function which we wish to maximize). X-axis: denotes the state space ie states or configuration our algorithm may reach. Y-axis: denotes the values of objective function corresponding to a particular state. The best solution will be a state space where the objective function has a maximum value(global maximum).
  • 7. Local maximum: It is a state which is better than its neighboring state however there exists a state which is better than it(global maximum). Global maximum: It is the best possible state in the state space diagram. This is because, at this stage, the objective function has the highest value. Plateau/flat local maximum: It is a flat region of state space where neighboring states have the same value. Ridge: It is a region that is higher than its neighbors but itself has a slope. It is a special kind of local maximum. Current state: The region of the state space diagram where we are currently present during the search. Shoulder: It is a plateau that has an uphill edge. Different region in state space diagran
  • 8. ALGORITHM FOR SIMPLE HILL CLIMBING Step 1: Evaluate the initial state, if it is goal state then return success and Stop Step 2: Loop Until a solution is found or there is no new operator left to apply. Step 3: Select and apply an operator to the current state. Step 4: Check new state: Step 5: Exit.
  • 9. BEST FIRST SEARCH Best first search (BFS) is a search algorithm that functions at a particular rule and uses a priority queue and heuristic search. It is ideal for computers to evaluate the appropriate and shortest path through a maze of possibilities. Suppose you get stuck in a big maze and do not know how and where to exit quickly. Here, the best first search in AI aids your system program to evaluate and choose the right path at every succeeding step to reach the goal as quickly as possible. For example, imagine you are playing a video game of Super Mario or Contra where you have to reach the goal and kill the enemy. The best first search aid computer system to control the Mario or Contra to check the quickest route or way to kill the enemy. It evaluates distinct paths and selects the closest one with no other threats to reach your goal and kill the enemy as fast as possible
  • 11. step1 • Place the starting node into the OPEN list step2 • If the OPEN list is empty, Stop and return failure. ste3p • Remove the node n, from the OPEN list which has the lowest value of h(n), and places it in the CLOSED list. step4 • Expand the node n, and generate the successors of node n. step5 • Check each successor of node n, and find whether any node is a goal node or not. If any successor node is goal node, then return success and terminate the search, else proceed to Step 6. step6 • For each successor node, algorithm checks for evaluation function f(n), and then check if the node has been in either OPEN or CLOSED list. If the node has not been in both list, then add it to the OPEN list. BEST FIRST SEARCH ALGORITHM
  • 12. A* Search Algorithm: A* search is the most commonly known form of best-first search. It uses heuristic function h(n), and cost to reach the node n from the start state g(n). It has combined features of UCS and greedy best-first search, by which it solve the problem efficiently. A* search algorithm finds the shortest path through the search space using the heuristic function. This search algorithm expands less search tree and provides optimal result faster. A* algorithm is similar to UCS except that it uses g(n)+h(n) instead of g(n). In A* search algorithm, we use search heuristic as well as the cost to reach the node. Hence we can combine both costs as following, and this sum is called as a fitness number.
  • 13. Its an informed search and works as best first search. ● AO* Algorithm is based on problem decomposition (Breakdown problem into small pieces). ● Its an efficient method to explore a solution path. ● AO* is often used for the common pathfinding problem in applications such as video games, but was originally designed as a general graph traversal algorithm. ● It finds applications in diverse problems, including the problem of parsing using stochastic grammars in NLP. ● Other cases include an Informational search with online learning. ● It is useful for searching game trees, problem solving etc. AND-OR Graph ● AND-OR graph 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. Own Mobile Phone Steal It Earn Money Buy mobile phone AO* ALGORITHM
  • 14. Algorithm of A* search:  Step1: Place the starting node in the OPEN list.  Step 2: Check if the OPEN list is empty or not, if the list is empty then return failure and stops.  Step 3: Select the node from the OPEN list which has the smallest value of evaluation function (g+h), if node n is goal node then return success and stop, otherwise  Step 4: Expand node n and generate all of its successors, and put n into the closed list. For each successor n', check whether n' is already in the OPEN or CLOSED list, if not then compute evaluation function for n' and place into Open list.  Step 5: Else if node n' is already in OPEN and CLOSED, then it should be attached to the back pointer which reflects the lowest g(n') value.  Step 6: Return to Step 2.
  • 15. In this example, we will traverse the given graph using the A* algorithm. The heuristic value of all states is given in the below table so we will calculate the f(n) of each state using the formula f(n)= g(n) + h(n), where g(n) is the cost to reach any node from start state. Here we will use OPEN and CLOSED list. EXAMPLE
  • 16. 1. Initialization: {(S, 5)} 2. Iteration1: {(S--> A, 4), (S-->G, 10)} 3. Iteration2: {(S--> A-->C, 4), (S--> A-->B, 7), (S-->G, 10)} 4. Iteration3: {(S--> A-->C--->G, 6), (S--> A-->C--->D, 11), (S--> A-- >B, 7), (S-->G, 10)} 5. Iteration 4 will give the final result, as S--->A--->C--->G it provides the optimal path with cost 6. SOLUTION
  • 17.  Its an informed search and works as best first search. ● AO* Algorithm is based on problem decomposition (Breakdown problem into small pieces). ● Its an efficient method to explore a solution path. ● AO* is often used for the common pathfinding problem in applications such as video games, but was originally designed as a general graph traversal algorithm. ● It finds applications in diverse problems, including the problem of parsing using stochastic grammars in NLP. ● Other cases include an Informational search with online learning. ● It is useful for searching game trees, problem solving etc. AND-OR Graph  ● AND-OR graph 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.  Node in the graph will point both down to its successors and up to its parent nodes. ● Each Node in the graph will also have a heuristic value associated with it. f(n)=g(n) +h(n) f(n): Cost function. g(n): Actual cost or Edge value h(n): Heuristic/ Estimated value of the nodes AO* Algorithm
  • 18.  Initialise the graph to start node  Traverse the graph following the current path accumulating nodes that have not yet been expanded or solved  Pick any of these nodes and expand it and if it has no successors call this value FUTILITY otherwise calculate only f` for each of the successors.  . If f` is 0 then mark the node as SOLVED  . Change the value of f` for the newly created node to reflect its successors by back propagation  . Wherever possible use the most promising routes and if a node is marked as SOLVED then mark the parent node as SOLVED.  If starting node is SOLVED or value greater than FUTILITY, stop, else repeat from 2. AO* Algorithm
  • 20. Constraint Satisfaction Problems (CSP) • Constraints: The guidelines that control how variables relate to one another are known as constraints. Constraints in a CSP define the ranges of possible values for variables. Unary constraints, binary constraints, and higher-order constraints are only a few examples of the various sorts of constraints. For instance, in a sudoku problem, the restrictions might be that each row, column, and 3×3 box can only have one instance of each number from 1 to 9. CSP REPRESENTATION: • The finite set of variables V1, V2, V3 ……………..Vn. • Non-empty domain for every single variable D1, D2, D3 …………..Dn. • The finite set of constraints C1, C2 …….…, Cm. • where each constraint Ci restricts the possible values for variables, • e.g., V1 ≠ V2 • Each constraint Ci is a pair <scope, relation> • Example: <(V1, V2), V1 not equal to V2> • Scope = set of variables that participate in constraint. • Relation = list of valid variable value combinations. • There might be a clear list of permitted combinations. Perhaps a relation that is abstract and that allows for membership testing and listing.
  • 22. The means-ends analysis process can be applied recursively for a problem. It is a strategy to control search in problem-solving. Following are the main Steps which describes the working of MEA technique for solving a problem. First, evaluate the difference between Initial State and final State. Select the various operators which can be applied for each difference. Apply the operator at each difference, which reduces the difference between the current state and goal state. MEANS ENDS ANALYSIS
  • 23. ALGORITHM FOR MEANS END ANALYSIS 1. Step 1: Compare CURRENT to GOAL, if there are no differences between both then return Success and Exit. 2. Step 2: Else, select the most significant difference and reduce it by doing the following steps until the success or failure occurs. 3. Select a new operator O which is applicable for the current difference, and if there is no such operator, then signal failure. 4. Attempt to apply operator O to CURRENT. Make a description of two states. 5. i) O-Start, a state in which O?s preconditions are satisfied. 6. ii) O-Result, the state that would result if O were applied In O-start. 7. If 8. (First-Part <------ MEA (CURRENT, O-START) 9. And 10.(LAST-Part <----- MEA (O-Result, GOAL), are successful, then signal Success and return the result of combining FIRST-PART, O, and LAST-PART.