Lecture 2

Everyday – search examples ,[object Object],[object Object],[object Object],[object Object],[object Object]
Industry – search examples ,[object Object],[object Object],[object Object],[object Object],[object Object]
Today’s lecture ,[object Object],[object Object],[object Object],[object Object],[object Object]
Search ,[object Object],[object Object]
Problem solving by search  Represent the problem as  STATES  and  OPERATORS   that  transform one state into another state.  A solution to the problem is an  OPERATOR SEQUENCE   that transforms  the  INITIAL STATE  into a  GOAL STATE .  Finding the  sequence  requires  SEARCHING  the  STATE SPACE  by  GENERATING   the paths connecting the two.
Example: Measuring problem– water jug problem! ,[object Object],3 l 5 l 9 l
Example: Measuring problem! A c B A B C 0 0 0 3 0 0 3 0 3 0 0 6 3 0 6 0 3 6 3 3 6 1 5 6 0 5 7 3 l 5 l 9 l
Example: Measuring problem! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],A B C 3 l 5 l 9 l
Which solution do we prefer? ,[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],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ok…Let’s review ,[object Object],[object Object],[object Object],[object Object],[object Object]
Basic concepts (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Basic concepts (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Problem formulation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example 1: water jug (1) 9 5 Given 3 jugs (9, 5 and 3 liters), a water pump, and a sink, how do you get exactly 7 liters into the 9 liter jug? ,[object Object],[object Object],[object Object],[object Object],[object Object],Jug 2  Jug 3  Sink Pump 3 Jug 1
Example 2: cryptoarithmetic F  O R T Y +  T E N +  T E N S  I  X T Y Assign numbers to letters so that the sum is correct 2 9 7 8 6 +  8 5 0 +  8 5 0 3 1 4 8 6 ,[object Object],[object Object],[object Object],[object Object],[object Object],Solution F=2, O=9 R=7, T=8 Y=6, E=5 N=0, I=1 X=4
Example 4: 8-queens ,[object Object],[object Object],[object Object],[object Object],[object Object]
Example: 8-puzzle ,[object Object],[object Object],[object Object],[object Object],start state goal state
Example: 8-puzzle ,[object Object],[object Object],[object Object],[object Object],start state goal state
A different Problem ,[object Object],[object Object],[object Object],[object Object],[object Object]
How do we represent the problem in Lisp?  Data structures? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tree for water jug problem (0,0,0) (0,3,0) (4,0, 0) (0,0,0) (1,3,0) (4,3,0) (0,0,0) (3,0,0) (0,3,0) (1,0,0) (4,0,0) (4,3,0)     (4,3,0)
Search algorithms ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Implementation of search algorithms ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Queuing-Fn( queue ,  elements )  is a queuing function that inserts a set of elements into the queue and  determines the order of node expansion .  Varieties of the queuing function produce varieties of the search algorithm.
Evaluation of search strategies ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Uninformed search strategies ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],Search
 
 
 
 
 
 
 
 
Breath-first search Expand the tree in successive layers, uniformly looking at all nodes at level n before progressing to level n+1 function  Breath-First-Search( problem )  returns  solution nodes  := Make-Queue(Make-Node(Initial-State( problem )) loop do if  nodes  is empty  then return  failure node :=  Remove-Front  (nodes) if  Goal-Test[ problem ] applied to State( node ) succeeds then return   node new-nodes :=  Expand  (node, O perators [problem])) nodes :=  Insert-At-End-of-Queue (new-nodes) end
Another Breath-first search S A D B D A E C E E B B F D F B F C E A C G G C G F 14 19 19 17 17 15 15 13 G 25 11
Properties of breadth-first search ,[object Object],[object Object],[object Object],[object Object]
Properties of breadth-first search ,[object Object],[object Object],[object Object],[object Object]
Depth-first
 
 
 
 
 
 
 
Depth first search Dive into the search tree as far as you can, backing up  only when there is no way to proceed function  Depth-First-Search( problem )  returns  solution nodes  := Make-Queue(Make-Node(Initial-State( problem )) loop do if  nodes  is empty  then return  failure node :=  Remove-Front  (nodes) if  Goal-Test[ problem ] applied to State( node ) succeeds then return   node new-nodes :=  Expand  (node, O perarors [problem])) nodes :=  Insert-At-Front-of-Queue (new-nodes) end
Depth-first search S A D B D A E C E E B B F D F B F C E A C G G C G F 14 19 19 17 17 15 15 13 G 25 11
Properties of depth-first search ,[object Object],[object Object],[object Object],[object Object]
Examples ,[object Object],[object Object]
More Examples ,[object Object],[object Object]
Lisp Code for Depth First ,[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],[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],[object Object],[object Object]
Properties of search strategies ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Where are we? ,[object Object],[object Object],[object Object],[object Object]
1 de 56

Recomendados

Ch2 3-informed (heuristic) searchCh2 3-informed (heuristic) search
Ch2 3-informed (heuristic) searchchandsek666
11.4K visualizações81 slides
AI 3 | Uninformed SearchAI 3 | Uninformed Search
AI 3 | Uninformed SearchMohammad Imam Hossain
535 visualizações62 slides
Informed searchInformed search
Informed searchAmit Rathi
1.3K visualizações84 slides

Mais conteúdo relacionado

Mais procurados

Problem Solving Problem Solving
Problem Solving Amar Jukuntla
8.1K visualizações173 slides
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AIKirti Verma
1.1K visualizações11 slides
Informed search (heuristics)Informed search (heuristics)
Informed search (heuristics)Bablu Shofi
954 visualizações31 slides
Solving problems by searchingSolving problems by searching
Solving problems by searchingLuigi Ceccaroni
12.8K visualizações48 slides
AI 6 | Adversarial SearchAI 6 | Adversarial Search
AI 6 | Adversarial SearchMohammad Imam Hossain
208 visualizações44 slides

Mais procurados(20)

Problem Solving Problem Solving
Problem Solving
Amar Jukuntla8.1K visualizações
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AI
Kirti Verma1.1K visualizações
AI Lecture 4 (informed search and exploration)AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)
Tajim Md. Niamat Ullah Akhund1.6K visualizações
Informed search (heuristics)Informed search (heuristics)
Informed search (heuristics)
Bablu Shofi954 visualizações
Solving problems by searchingSolving problems by searching
Solving problems by searching
Luigi Ceccaroni12.8K visualizações
AI 6 | Adversarial SearchAI 6 | Adversarial Search
AI 6 | Adversarial Search
Mohammad Imam Hossain208 visualizações
Lecture 11 Informed SearchLecture 11 Informed Search
Lecture 11 Informed Search
Hema Kashyap1.2K visualizações
AI_ 3 & 4 Knowledge Representation issuesAI_ 3 & 4 Knowledge Representation issues
AI_ 3 & 4 Knowledge Representation issues
Khushali Kathiriya874 visualizações
AI: AI & SearchingAI: AI & Searching
AI: AI & Searching
DataminingTools Inc5.1K visualizações
AI: AI & Problem SolvingAI: AI & Problem Solving
AI: AI & Problem Solving
DataminingTools Inc36.4K visualizações
State space searchState space search
State space search
chauhankapil661 visualizações
Problem solving agentsProblem solving agents
Problem solving agents
Megha Sharma4.1K visualizações
Knowledge Representation, Inference and ReasoningKnowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and Reasoning
Sagacious IT Solution1.9K visualizações
Propositional logicPropositional logic
Propositional logic
Rushdi Shams7K visualizações
pushdown automatapushdown automata
pushdown automata
Sujata Pardeshi20.3K visualizações
search strategies in artificial intelligencesearch strategies in artificial intelligence
search strategies in artificial intelligence
Hanif Ullah (Gold Medalist)1.7K visualizações
Hill climbingHill climbing
Hill climbing
Mohammad Faizan67.9K visualizações
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
Megha Sharma3K visualizações
AI 5 | Local SearchAI 5 | Local Search
AI 5 | Local Search
Mohammad Imam Hossain340 visualizações

Destaque

Cs 361 2015 lec 1-2Cs 361 2015 lec 1-2
Cs 361 2015 lec 1-2Alaa Zaghloul
1.1K visualizações21 slides
Cs 361 2015 lec 1-2Cs 361 2015 lec 1-2
Cs 361 2015 lec 1-2Alaa Zaghloul
653 visualizações21 slides
Jarrar: Un-informed SearchJarrar: Un-informed Search
Jarrar: Un-informed SearchMustafa Jarrar
2.4K visualizações84 slides
04 search heuristic04 search heuristic
04 search heuristicNour Zeineddine
1.7K visualizações77 slides

Destaque(11)

Cs 361 2015 lec 1-2Cs 361 2015 lec 1-2
Cs 361 2015 lec 1-2
Alaa Zaghloul1.1K visualizações
Cs 361 2015 lec 1-2Cs 361 2015 lec 1-2
Cs 361 2015 lec 1-2
Alaa Zaghloul653 visualizações
Artificial Intelligence-- Search Algorithms Artificial Intelligence-- Search Algorithms
Artificial Intelligence -- Search Algorithms
Syed Ahmed4.3K visualizações
Introduction to Artificial Intelligence Introduction to Artificial Intelligence
Introduction to Artificial Intelligence
Mustafa Jarrar2.6K visualizações
Jarrar: Un-informed SearchJarrar: Un-informed Search
Jarrar: Un-informed Search
Mustafa Jarrar2.4K visualizações
04 search heuristic04 search heuristic
04 search heuristic
Nour Zeineddine1.7K visualizações
Jarrar: Informed Search  Jarrar: Informed Search
Jarrar: Informed Search
Mustafa Jarrar2.5K visualizações
09 heuristic search09 heuristic search
09 heuristic search
Tianlu Wang1.9K visualizações
(Radhika) presentation on chapter 2 ai(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 ai
Radhika Srinivasan9.3K visualizações
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search Strategies
Amey Kerkar49.4K visualizações
Uniformed tree searching Uniformed tree searching
Uniformed tree searching
Ayaelshiwi7K visualizações

Similar a Lecture 2

CptS 440 / 540 Artificial IntelligenceCptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial Intelligencebutest
1.1K visualizações182 slides
l2.pptxl2.pptx
l2.pptxMajwegaJacksonSuubiA
7 visualizações182 slides
state-spaces29Sep06.pptstate-spaces29Sep06.ppt
state-spaces29Sep06.pptPerumalPitchandi
6 visualizações31 slides
l2.pptxl2.pptx
l2.pptxAnujaBeatriceB
2 visualizações182 slides
Chapter3 SearchChapter3 Search
Chapter3 SearchKhiem Ho
1.8K visualizações56 slides

Similar a Lecture 2(20)

CptS 440 / 540 Artificial IntelligenceCptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial Intelligence
butest1.1K visualizações
l2.pptxl2.pptx
l2.pptx
MajwegaJacksonSuubiA7 visualizações
state-spaces29Sep06.pptstate-spaces29Sep06.ppt
state-spaces29Sep06.ppt
PerumalPitchandi6 visualizações
l2.pptxl2.pptx
l2.pptx
AnujaBeatriceB2 visualizações
Chapter3 SearchChapter3 Search
Chapter3 Search
Khiem Ho1.8K visualizações
AI-04 Production System - Search Problem.pptxAI-04 Production System - Search Problem.pptx
AI-04 Production System - Search Problem.pptx
Pankaj Debbarma218 visualizações
Daa unit 1Daa unit 1
Daa unit 1
jinalgoti350 visualizações
Searching techniquesSearching techniques
Searching techniques
Prof.Dharmishtha R. Chaudhari54 visualizações
Search-Beyond-Classical-no-exercise-answers.pdfSearch-Beyond-Classical-no-exercise-answers.pdf
Search-Beyond-Classical-no-exercise-answers.pdf
MrRRThirrunavukkaras2 visualizações
Lecture 3 Problem Solving.pptxLecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptx
AndrewKuziwakwasheMu24 visualizações
Dsoop (co 221) 1Dsoop (co 221) 1
Dsoop (co 221) 1
Puja Koch538 visualizações
Amit pptAmit ppt
Amit ppt
amitp267.9K visualizações
Mit6 006 f11_quiz1Mit6 006 f11_quiz1
Mit6 006 f11_quiz1
Sandeep Jindal249 visualizações
QQ
Q
guest9b2176809 visualizações
Ch 2 State Space Search - slides part 1.pdfCh 2 State Space Search - slides part 1.pdf
Ch 2 State Space Search - slides part 1.pdf
KrishnaMadala1226 visualizações
unit 2.pptxunit 2.pptx
unit 2.pptx
Gavy119 visualizações
Algorithm Assignment HelpAlgorithm Assignment Help
Algorithm Assignment Help
Programming Homework Help165 visualizações
Kamil witecki asynchronous, yet readable, codeKamil witecki asynchronous, yet readable, code
Kamil witecki asynchronous, yet readable, code
Kamil Witecki323 visualizações
lab-8 (1).pptxlab-8 (1).pptx
lab-8 (1).pptx
ShimoFcis8 visualizações

Último

Class 10 English notes 23-24.pptxClass 10 English notes 23-24.pptx
Class 10 English notes 23-24.pptxTariq KHAN
63 visualizações53 slides
Nico Baumbach IMR Media ComponentNico Baumbach IMR Media Component
Nico Baumbach IMR Media ComponentInMediaRes1
186 visualizações2 slides
Dance KS5 BreakdownDance KS5 Breakdown
Dance KS5 BreakdownWestHatch
52 visualizações2 slides

Último(20)

Class 10 English notes 23-24.pptxClass 10 English notes 23-24.pptx
Class 10 English notes 23-24.pptx
Tariq KHAN63 visualizações
Material del tarjetero LEES Travesías.docxMaterial del tarjetero LEES Travesías.docx
Material del tarjetero LEES Travesías.docx
Norberto Millán Muñoz57 visualizações
Structure and Functions of Cell.pdfStructure and Functions of Cell.pdf
Structure and Functions of Cell.pdf
Nithya Murugan142 visualizações
Nico Baumbach IMR Media ComponentNico Baumbach IMR Media Component
Nico Baumbach IMR Media Component
InMediaRes1186 visualizações
Dance KS5 BreakdownDance KS5 Breakdown
Dance KS5 Breakdown
WestHatch52 visualizações
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and Startups
Svetlin Nakov57 visualizações
Industry4wrd.pptxIndustry4wrd.pptx
Industry4wrd.pptx
BC Chew153 visualizações
Universe revised.pdfUniverse revised.pdf
Universe revised.pdf
DrHafizKosar84 visualizações
discussion post.pdfdiscussion post.pdf
discussion post.pdf
jessemercerail70 visualizações
STYP infopack.pdfSTYP infopack.pdf
STYP infopack.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego143 visualizações
Streaming Quiz 2023.pdfStreaming Quiz 2023.pdf
Streaming Quiz 2023.pdf
Quiz Club NITW87 visualizações
ICANNICANN
ICANN
RajaulKarim2057 visualizações
2022 CAPE Merit List 2023 2022 CAPE Merit List 2023
2022 CAPE Merit List 2023
Caribbean Examinations Council3K visualizações
BYSC infopack.pdfBYSC infopack.pdf
BYSC infopack.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego144 visualizações
ICS3211_lecture 08_2023.pdfICS3211_lecture 08_2023.pdf
ICS3211_lecture 08_2023.pdf
Vanessa Camilleri68 visualizações
Use of Probiotics in Aquaculture.pptxUse of Probiotics in Aquaculture.pptx
Use of Probiotics in Aquaculture.pptx
AKSHAY MANDAL69 visualizações
Women from Hackney’s History: Stoke Newington by Sue DoeWomen from Hackney’s History: Stoke Newington by Sue Doe
Women from Hackney’s History: Stoke Newington by Sue Doe
History of Stoke Newington103 visualizações
SIMPLE PRESENT TENSE_new.pptxSIMPLE PRESENT TENSE_new.pptx
SIMPLE PRESENT TENSE_new.pptx
nisrinamadani2146 visualizações

Lecture 2

  • 1.
  • 2.
  • 3.
  • 4.
  • 5. Problem solving by search Represent the problem as STATES and OPERATORS that transform one state into another state. A solution to the problem is an OPERATOR SEQUENCE that transforms the INITIAL STATE into a GOAL STATE . Finding the sequence requires SEARCHING the STATE SPACE by GENERATING the paths connecting the two.
  • 6.
  • 7. Example: Measuring problem! A c B A B C 0 0 0 3 0 0 3 0 3 0 0 6 3 0 6 0 3 6 3 3 6 1 5 6 0 5 7 3 l 5 l 9 l
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. Tree for water jug problem (0,0,0) (0,3,0) (4,0, 0) (0,0,0) (1,3,0) (4,3,0) (0,0,0) (3,0,0) (0,3,0) (1,0,0) (4,0,0) (4,3,0)     (4,3,0)
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.  
  • 28.  
  • 29.  
  • 30.  
  • 31.  
  • 32.  
  • 33.  
  • 34.  
  • 35. Breath-first search Expand the tree in successive layers, uniformly looking at all nodes at level n before progressing to level n+1 function Breath-First-Search( problem ) returns solution nodes := Make-Queue(Make-Node(Initial-State( problem )) loop do if nodes is empty then return failure node := Remove-Front (nodes) if Goal-Test[ problem ] applied to State( node ) succeeds then return node new-nodes := Expand (node, O perators [problem])) nodes := Insert-At-End-of-Queue (new-nodes) end
  • 36. Another Breath-first search S A D B D A E C E E B B F D F B F C E A C G G C G F 14 19 19 17 17 15 15 13 G 25 11
  • 37.
  • 38.
  • 40.  
  • 41.  
  • 42.  
  • 43.  
  • 44.  
  • 45.  
  • 46.  
  • 47. Depth first search Dive into the search tree as far as you can, backing up only when there is no way to proceed function Depth-First-Search( problem ) returns solution nodes := Make-Queue(Make-Node(Initial-State( problem )) loop do if nodes is empty then return failure node := Remove-Front (nodes) if Goal-Test[ problem ] applied to State( node ) succeeds then return node new-nodes := Expand (node, O perarors [problem])) nodes := Insert-At-Front-of-Queue (new-nodes) end
  • 48. Depth-first search S A D B D A E C E E B B F D F B F C E A C G G C G F 14 19 19 17 17 15 15 13 G 25 11
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.