SlideShare una empresa de Scribd logo
1 de 81
Problem Solving by Searching Search Methods :  informed (Heuristic) search
Using problem specific knowledge to aid searching ,[object Object],[object Object],Search everywhere!!
Using problem specific knowledge to aid searching ,[object Object],[object Object],[object Object],Search only in this subtree!! A B C E D F G H I J K L O M N
More formally, why heuristic functions work? ,[object Object],[object Object],[object Object]
Heuristic Functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Approach 1:  f   Measures the Value of the Current State ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Approach 2:  f   Measures the Cost to the Goal ,[object Object],[object Object],[object Object],[object Object]
Approach 3:  f  measures the total cost of the solution path (Admissible Heuristic Functions) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Traditional informed search strategies ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Informed Search Strategies Best First Search
An implementation of Best First Search ,[object Object],[object Object],[object Object],[object Object]
Informed Search Strategies Greedy Search eval-fn : f(n) = h(n)
Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h  ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h  ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h  ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h  ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h  ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h  ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h  ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h  ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h  ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h  ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
Greedy Search: Tree Search Start A
Greedy Search: Tree Search Start 75 118 140 [374] [329] [253] A B C E
Greedy Search: Tree Search 99 80 Start 75 118 140 [374] [329] [253] [193] [366] [178] A B C E F G A
Greedy Search: Tree Search 99 211 80 Start Goal 75 118 140 [374] [329] [253] [193] [366] [178] [0] [253] A B C E F I G A E
Greedy Search: Tree Search 99 211 80 Start Goal 75 118 140 [374] [329] [253] [193] [366] [178] [0] [253] Path cost(A-E-F-I) = 253 + 178 + 0 =  431 dist(A-E-F-I) = 140 + 99 + 211 =  450 A B C E F I G A E
Greedy Search: Optimal ? 99 211 80 Start Goal 97 101 75 118 111 f(n) = h  ( n ) = straight-line distance heuristic dist(A-E-G-H-I) =140+80+97+101= 418  140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
Greedy Search: Complete ? 99 211 80 Start Goal 97 101 75 118 111 f(n) = h  ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 **  C 250 D 244 E 253 F 178 G 193 H 98 I 0
Greedy Search: Tree Search Start A
Greedy Search: Tree Search Start 75 118 140 [374] [250] [253] A B C E
Greedy Search: Tree Search 111 Start 75 118 140 [374] [250] [253] [244] A B C E D
Greedy Search: Tree Search 111 Start 75 118 140 [374] [250] [253] [244] [250] Infinite Branch ! A B C E D C
Greedy Search: Tree Search 111 Start 75 118 140 [374] [250] [253] [244] [250] [244] Infinite Branch ! A B C E D C D
Greedy Search: Tree Search 111 Start 75 118 140 [374] [250] [253] [244] [250] [244] Infinite Branch ! A B C E D C D
Greedy Search: Time and Space Complexity ? 99 211 80 Start Goal 97 101 75 118 111 140 ,[object Object],[object Object],[object Object],[object Object],A B D C E F I G H
Informed Search Strategies A* Search eval-fn : f(n)=g(n)+h(n)
A* (A Star)  ,[object Object],[object Object],[object Object]
A* (A Star)  ,[object Object],[object Object],[object Object]
A* (A Star)  g(n) h(n) f(n) = g(n)+h(n) n
A* Search f(n) = g(n) + h  ( n ) g(n):  is the exact cost to reach node  n  from the initial state. State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0 A B D C E F I 99 211 G H 80 Start Goal 97 101 75 118 111 140
A* Search: Tree Search Start A
A* Search: Tree Search Start 75 118 140 [393] [449] [447] A B C E
A* Search: Tree Search 99 80 Start 75 118 140 [393] [449] [447] [417] [413] A B C E F G
A* Search: Tree Search 99 80 Start 75 118 140 [393] [449] [447] [417] [413] 97 [415] A B C E F G H
A* Search: Tree Search 99 80 Start 97 101 75 118 140 [393] [449] [447] [417] [413] [415] Goal [418] A B C E F I G H
A* Search: Tree Search 99 80 Start 97 101 75 118 140 [393] [449] [447] [417] [413] [415] Goal [418] [450] A B C E F I G H I
A* Search: Tree Search 99 80 Start 97 101 75 118 140 [393] [449] [447] [417] [413] [415] Goal [418] [450] A B C E F I G H I
A* Search: Tree Search 99 80 Start 97 101 75 118 140 [393] [449] [447] [417] [413] [415] Goal [418] [450] A B C E F I G H I
A* with f() not Admissible h() overestimates the cost to reach the goal state
A* Search:  h  not admissible ! 99 211 80 Start Goal 97 101 75 118 111 f(n) = g(n) + h  ( n ) –  (H-I) Overestimated g(n):  is the exact cost to reach node  n  from the initial state. 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 138 I 0
A* Search: Tree Search Start A
A* Search: Tree Search Start 75 118 140 [393] [449] [447] A B C E
A* Search: Tree Search 99 80 Start 75 118 140 [393] [449] [447] [417] [413] A B C E F G
A* Search: Tree Search 99 80 Start 75 118 140 [393] [449] [447] [417] [413] 97 [455] A B C E F G H
A* Search: Tree Search 99 80 Start 97 75 118 140 [393] [449] [447] [417] [413] [455] Goal [450] A B C E F G H I
A* Search: Tree Search 99 80 Start 97 75 118 140 [393] [449] [447] [417] [413] [455] Goal [450] [473] A B C E F G H I D
A* Search: Tree Search 99 80 Start 97 75 118 140 [393] [449] [447] [417] [413] [455] Goal [450] [473] A B C E F G H I D
A* Search: Tree Search 99 80 Start 97 75 118 140 [393] [449] [447] [417] [413] [455] Goal [450] [473] A B C E F G H I D
A* Search: Tree Search 99 80 Start 97 75 118 140 [393] [449] [447] [417] [413] [455] Goal [450] [473] A* not optimal !!! A B C E F G H I D
A* Algorithm A* with systematic checking for repeated states …
A* Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A* Search: Analysis 99 211 80 Start Goal 97 101 75 118 111 140 ,[object Object],[object Object],[object Object],[object Object],A B D C E F I G H
Informed Search Strategies Iterative Deepening A*
Iterative Deepening A*:IDA* ,[object Object],[object Object]
Consistent Heuristic ,[object Object],[object Object],N N’ h(N) h(N’) c(N,N’)
IDA* Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object]
8-Puzzle f(N) = g(N) + h(N)  with h(N) = number of misplaced tiles Cutoff=4 4 6
8-Puzzle Cutoff=4 f(N) = g(N) + h(N)  with h(N) = number of misplaced tiles 4 4 6 6
8-Puzzle Cutoff=4 f(N) = g(N) + h(N)  with h(N) = number of misplaced tiles 4 4 6 6 5
8-Puzzle Cutoff=4 f(N) = g(N) + h(N)  with h(N) = number of misplaced tiles 4 4 6 6 5 5
8-Puzzle Cutoff=4 f(N) = g(N) + h(N)  with h(N) = number of misplaced tiles 4 4 6 6 5 5 6
8-Puzzle Cutoff=5 f(N) = g(N) + h(N)  with h(N) = number of misplaced tiles 4 6
8-Puzzle Cutoff=5 f(N) = g(N) + h(N)  with h(N) = number of misplaced tiles 4 4 6 6
8-Puzzle Cutoff=5 f(N) = g(N) + h(N)  with h(N) = number of misplaced tiles 4 4 6 6 5
8-Puzzle Cutoff=5 f(N) = g(N) + h(N)  with h(N) = number of misplaced tiles 4 4 6 6 5 7
8-Puzzle Cutoff=5 f(N) = g(N) + h(N)  with h(N) = number of misplaced tiles 4 4 6 6 5 7 5
8-Puzzle Cutoff=5 f(N) = g(N) + h(N)  with h(N) = number of misplaced tiles 4 4 6 6 5 7 5 5
8-Puzzle Cutoff=5 f(N) = g(N) + h(N)  with h(N) = number of misplaced tiles 4 4 6 6 5 7 5 5
When to Use Search Techniques ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Conclusions ,[object Object],[object Object]

Más contenido relacionado

La actualidad más candente

Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic Agents
Nuruzzaman Milon
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
Luigi Ceccaroni
 

La actualidad más candente (20)

Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
State Space Search in ai
State Space Search in aiState Space Search in ai
State Space Search in ai
 
Problem Solving
Problem Solving Problem Solving
Problem Solving
 
Heuristc Search Techniques
Heuristc Search TechniquesHeuristc Search Techniques
Heuristc Search Techniques
 
Frames
FramesFrames
Frames
 
Solving problems by searching Informed (heuristics) Search
Solving problems by searching Informed (heuristics) SearchSolving problems by searching Informed (heuristics) Search
Solving problems by searching Informed (heuristics) Search
 
I. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmI. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithm
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic Agents
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
Reinforcement learning, Q-Learning
Reinforcement learning, Q-LearningReinforcement learning, Q-Learning
Reinforcement learning, Q-Learning
 
AI-State Space Representation.pptx
AI-State Space Representation.pptxAI-State Space Representation.pptx
AI-State Space Representation.pptx
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and Lifting
 
Artificial Intelligence -- Search Algorithms
Artificial Intelligence-- Search Algorithms Artificial Intelligence-- Search Algorithms
Artificial Intelligence -- Search Algorithms
 
Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching Techniques
 
AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
 
AI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptxAI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptx
 
Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound technique
 

Destacado

Heuristic Search
Heuristic SearchHeuristic Search
Heuristic Search
butest
 

Destacado (15)

Hillclimbing search algorthim #introduction
Hillclimbing search algorthim #introductionHillclimbing search algorthim #introduction
Hillclimbing search algorthim #introduction
 
Algorithm Analysis and Design Class Notes
Algorithm Analysis and Design Class NotesAlgorithm Analysis and Design Class Notes
Algorithm Analysis and Design Class Notes
 
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
 
Linear and Binary Search Algorithms.(Discrete Mathematics)
Linear and Binary Search Algorithms.(Discrete Mathematics)Linear and Binary Search Algorithms.(Discrete Mathematics)
Linear and Binary Search Algorithms.(Discrete Mathematics)
 
Bfs and Dfs
Bfs and DfsBfs and Dfs
Bfs and Dfs
 
Search algorithms master
Search algorithms masterSearch algorithms master
Search algorithms master
 
130210107039 2130702
130210107039 2130702130210107039 2130702
130210107039 2130702
 
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
 
ADA complete notes
ADA complete notesADA complete notes
ADA complete notes
 
Application of dfs
Application of dfsApplication of dfs
Application of dfs
 
DFS and BFS
DFS and BFSDFS and BFS
DFS and BFS
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of Algorithms
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
 
17. Trees and Graphs
17. Trees and Graphs17. Trees and Graphs
17. Trees and Graphs
 

Similar a Ch2 3-informed (heuristic) search

16890 unit 2 heuristic search techniques
16890 unit 2 heuristic  search techniques16890 unit 2 heuristic  search techniques
16890 unit 2 heuristic search techniques
Jais Balta
 
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
PalGov
 
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
RahulSharma4566
 
Some topics in analysis of boolean functions
Some topics in analysis of boolean functionsSome topics in analysis of boolean functions
Some topics in analysis of boolean functions
guest756c74
 
Incremental Topological Ordering (and Cycle Detection)
Incremental Topological Ordering (and Cycle Detection)Incremental Topological Ordering (and Cycle Detection)
Incremental Topological Ordering (and Cycle Detection)
⌨️ Andrey Goder
 
Artificial intelligence(06)
Artificial intelligence(06)Artificial intelligence(06)
Artificial intelligence(06)
Nazir Ahmed
 

Similar a Ch2 3-informed (heuristic) search (20)

16890 unit 2 heuristic search techniques
16890 unit 2 heuristic  search techniques16890 unit 2 heuristic  search techniques
16890 unit 2 heuristic search techniques
 
A star search
A star searchA star search
A star search
 
Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
Heuristic Searching: A* Search
Heuristic Searching: A* SearchHeuristic Searching: A* Search
Heuristic Searching: A* Search
 
Informed Search.pptx
Informed Search.pptxInformed Search.pptx
Informed Search.pptx
 
Search 2
Search 2Search 2
Search 2
 
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
 
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttktshamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
shamwari dzerwendo.mmmmmmfmmfmfkksrkrttkt
 
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
 
04 search heuristic
04 search heuristic04 search heuristic
04 search heuristic
 
informed_search.pdf
informed_search.pdfinformed_search.pdf
informed_search.pdf
 
Maximums and minimum
Maximums and minimum Maximums and minimum
Maximums and minimum
 
M4 heuristics
M4 heuristicsM4 heuristics
M4 heuristics
 
Some topics in analysis of boolean functions
Some topics in analysis of boolean functionsSome topics in analysis of boolean functions
Some topics in analysis of boolean functions
 
CS767_Lecture_03.pptx
CS767_Lecture_03.pptxCS767_Lecture_03.pptx
CS767_Lecture_03.pptx
 
Incremental Topological Ordering (and Cycle Detection)
Incremental Topological Ordering (and Cycle Detection)Incremental Topological Ordering (and Cycle Detection)
Incremental Topological Ordering (and Cycle Detection)
 
Bfs & dfs application
Bfs & dfs applicationBfs & dfs application
Bfs & dfs application
 
Artificial intelligence(06)
Artificial intelligence(06)Artificial intelligence(06)
Artificial intelligence(06)
 
Artificial intelligence(06)
Artificial intelligence(06)Artificial intelligence(06)
Artificial intelligence(06)
 
Informed Search by the artificial intelligence
Informed Search by the artificial intelligenceInformed Search by the artificial intelligence
Informed Search by the artificial intelligence
 

Más de chandsek666 (6)

Knowledge engg using & in fol
Knowledge engg using & in folKnowledge engg using & in fol
Knowledge engg using & in fol
 
Introduction iii
Introduction iiiIntroduction iii
Introduction iii
 
Class first order logic
Class first order logicClass first order logic
Class first order logic
 
Searchadditional2
Searchadditional2Searchadditional2
Searchadditional2
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Lecture1
Lecture1Lecture1
Lecture1
 

Último

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 

Ch2 3-informed (heuristic) search

  • 1. Problem Solving by Searching Search Methods : informed (Heuristic) search
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. Informed Search Strategies Best First Search
  • 11.
  • 12. Informed Search Strategies Greedy Search eval-fn : f(n) = h(n)
  • 13. Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
  • 14. Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
  • 15. Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
  • 16. Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
  • 17. Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
  • 18. Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
  • 19. Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
  • 20. Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
  • 21. Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
  • 22. Greedy Search 99 211 80 Start Goal 97 101 75 118 111 f(n) = h ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
  • 23. Greedy Search: Tree Search Start A
  • 24. Greedy Search: Tree Search Start 75 118 140 [374] [329] [253] A B C E
  • 25. Greedy Search: Tree Search 99 80 Start 75 118 140 [374] [329] [253] [193] [366] [178] A B C E F G A
  • 26. Greedy Search: Tree Search 99 211 80 Start Goal 75 118 140 [374] [329] [253] [193] [366] [178] [0] [253] A B C E F I G A E
  • 27. Greedy Search: Tree Search 99 211 80 Start Goal 75 118 140 [374] [329] [253] [193] [366] [178] [0] [253] Path cost(A-E-F-I) = 253 + 178 + 0 = 431 dist(A-E-F-I) = 140 + 99 + 211 = 450 A B C E F I G A E
  • 28. Greedy Search: Optimal ? 99 211 80 Start Goal 97 101 75 118 111 f(n) = h ( n ) = straight-line distance heuristic dist(A-E-G-H-I) =140+80+97+101= 418 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0
  • 29. Greedy Search: Complete ? 99 211 80 Start Goal 97 101 75 118 111 f(n) = h ( n ) = straight-line distance heuristic 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 ** C 250 D 244 E 253 F 178 G 193 H 98 I 0
  • 30. Greedy Search: Tree Search Start A
  • 31. Greedy Search: Tree Search Start 75 118 140 [374] [250] [253] A B C E
  • 32. Greedy Search: Tree Search 111 Start 75 118 140 [374] [250] [253] [244] A B C E D
  • 33. Greedy Search: Tree Search 111 Start 75 118 140 [374] [250] [253] [244] [250] Infinite Branch ! A B C E D C
  • 34. Greedy Search: Tree Search 111 Start 75 118 140 [374] [250] [253] [244] [250] [244] Infinite Branch ! A B C E D C D
  • 35. Greedy Search: Tree Search 111 Start 75 118 140 [374] [250] [253] [244] [250] [244] Infinite Branch ! A B C E D C D
  • 36.
  • 37. Informed Search Strategies A* Search eval-fn : f(n)=g(n)+h(n)
  • 38.
  • 39.
  • 40. A* (A Star) g(n) h(n) f(n) = g(n)+h(n) n
  • 41. A* Search f(n) = g(n) + h ( n ) g(n): is the exact cost to reach node n from the initial state. State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 98 I 0 A B D C E F I 99 211 G H 80 Start Goal 97 101 75 118 111 140
  • 42. A* Search: Tree Search Start A
  • 43. A* Search: Tree Search Start 75 118 140 [393] [449] [447] A B C E
  • 44. A* Search: Tree Search 99 80 Start 75 118 140 [393] [449] [447] [417] [413] A B C E F G
  • 45. A* Search: Tree Search 99 80 Start 75 118 140 [393] [449] [447] [417] [413] 97 [415] A B C E F G H
  • 46. A* Search: Tree Search 99 80 Start 97 101 75 118 140 [393] [449] [447] [417] [413] [415] Goal [418] A B C E F I G H
  • 47. A* Search: Tree Search 99 80 Start 97 101 75 118 140 [393] [449] [447] [417] [413] [415] Goal [418] [450] A B C E F I G H I
  • 48. A* Search: Tree Search 99 80 Start 97 101 75 118 140 [393] [449] [447] [417] [413] [415] Goal [418] [450] A B C E F I G H I
  • 49. A* Search: Tree Search 99 80 Start 97 101 75 118 140 [393] [449] [447] [417] [413] [415] Goal [418] [450] A B C E F I G H I
  • 50. A* with f() not Admissible h() overestimates the cost to reach the goal state
  • 51. A* Search: h not admissible ! 99 211 80 Start Goal 97 101 75 118 111 f(n) = g(n) + h ( n ) – (H-I) Overestimated g(n): is the exact cost to reach node n from the initial state. 140 A B D C E F I G H State Heuristic: h(n) A 366 B 374 C 329 D 244 E 253 F 178 G 193 H 138 I 0
  • 52. A* Search: Tree Search Start A
  • 53. A* Search: Tree Search Start 75 118 140 [393] [449] [447] A B C E
  • 54. A* Search: Tree Search 99 80 Start 75 118 140 [393] [449] [447] [417] [413] A B C E F G
  • 55. A* Search: Tree Search 99 80 Start 75 118 140 [393] [449] [447] [417] [413] 97 [455] A B C E F G H
  • 56. A* Search: Tree Search 99 80 Start 97 75 118 140 [393] [449] [447] [417] [413] [455] Goal [450] A B C E F G H I
  • 57. A* Search: Tree Search 99 80 Start 97 75 118 140 [393] [449] [447] [417] [413] [455] Goal [450] [473] A B C E F G H I D
  • 58. A* Search: Tree Search 99 80 Start 97 75 118 140 [393] [449] [447] [417] [413] [455] Goal [450] [473] A B C E F G H I D
  • 59. A* Search: Tree Search 99 80 Start 97 75 118 140 [393] [449] [447] [417] [413] [455] Goal [450] [473] A B C E F G H I D
  • 60. A* Search: Tree Search 99 80 Start 97 75 118 140 [393] [449] [447] [417] [413] [455] Goal [450] [473] A* not optimal !!! A B C E F G H I D
  • 61. A* Algorithm A* with systematic checking for repeated states …
  • 62.
  • 63.
  • 64. Informed Search Strategies Iterative Deepening A*
  • 65.
  • 66.
  • 67.
  • 68. 8-Puzzle f(N) = g(N) + h(N) with h(N) = number of misplaced tiles Cutoff=4 4 6
  • 69. 8-Puzzle Cutoff=4 f(N) = g(N) + h(N) with h(N) = number of misplaced tiles 4 4 6 6
  • 70. 8-Puzzle Cutoff=4 f(N) = g(N) + h(N) with h(N) = number of misplaced tiles 4 4 6 6 5
  • 71. 8-Puzzle Cutoff=4 f(N) = g(N) + h(N) with h(N) = number of misplaced tiles 4 4 6 6 5 5
  • 72. 8-Puzzle Cutoff=4 f(N) = g(N) + h(N) with h(N) = number of misplaced tiles 4 4 6 6 5 5 6
  • 73. 8-Puzzle Cutoff=5 f(N) = g(N) + h(N) with h(N) = number of misplaced tiles 4 6
  • 74. 8-Puzzle Cutoff=5 f(N) = g(N) + h(N) with h(N) = number of misplaced tiles 4 4 6 6
  • 75. 8-Puzzle Cutoff=5 f(N) = g(N) + h(N) with h(N) = number of misplaced tiles 4 4 6 6 5
  • 76. 8-Puzzle Cutoff=5 f(N) = g(N) + h(N) with h(N) = number of misplaced tiles 4 4 6 6 5 7
  • 77. 8-Puzzle Cutoff=5 f(N) = g(N) + h(N) with h(N) = number of misplaced tiles 4 4 6 6 5 7 5
  • 78. 8-Puzzle Cutoff=5 f(N) = g(N) + h(N) with h(N) = number of misplaced tiles 4 4 6 6 5 7 5 5
  • 79. 8-Puzzle Cutoff=5 f(N) = g(N) + h(N) with h(N) = number of misplaced tiles 4 4 6 6 5 7 5 5
  • 80.
  • 81.