SlideShare a Scribd company logo
1
Solving problems by searching
171, Class 2
Chapter 3
2
Overview
 Intelligent agents: problem solving as search
 Search consists of
 state space
 operators
 start state
 goal states
 The search graph
 A Search Tree is an efficient way to represent the search
process
 There are a variety of search algorithms, including
 Depth-First Search
 Breadth-First Search
 Others which use heuristic knowledge (in future lectures)
3
Example: Romania
 On holiday in Romania; currently in Arad.
 Flight leaves tomorrow from Bucharest
 Formulate goal:
 be in Bucharest
 Formulate problem:
 states: various cities
 actions: drive between cities
 Find solution:
 sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest
4
Example: Romania
5
Problem types
 Static / Dynamic
Previous problem was static: no attention to changes in environment
 Observable / Partially Observable / Unobservable
Previous problem was observable: it knew its initial state.
 Deterministic / Stochastic
Previous problem was deterministic: no new percepts
were necessary, we can predict the future perfectly
 Discrete / continuous
Previous problem was discrete: we can enumerate all possibilities
6
Example: vacuum world
 Observable, start in #5.
Solution?
7
Example: vacuum world
 Observable, start in #5.
Solution? [Right, Suck]
 Unobservable, start in
{1,2,3,4,5,6,7,8} e.g.,
Solution?
8
Example: vacuum world
 Unobservable, start in
{1,2,3,4,5,6,7,8} e.g.,
Solution?
[Right,Suck,Left,Suck]
9
11
State-Space Problem Formulation
A problem is defined by four items:
initial state e.g., "at Arad“
actions or successor function S(x) = set of action–state pairs
 e.g., S(Arad) = {<Arad  Zerind, Zerind>, … }
goal test,
e.g., x = "at Bucharest”, Checkmate(x)
path cost (additive)
 e.g., sum of distances, number of actions executed, etc.
 c(x,a,y) is the step cost, assumed to be ≥ 0
A solution is a sequence of actions leading from the initial state to a
goal state
13
Vacuum world state space graph
 states? discrete: dirt and robot location
 initial state? any
 actions? Left, Right, Suck
 goal test? no dirt at all locations
 path cost? 1 per action
14
Example: 8-queen problem
15
Example: 8-Queens
 states? -any arrangement of n<=8 queens
-or arrangements of n<=8 queens in leftmost n
columns, 1 per column, such that no queen
attacks any other.
 initial state? no queens on the board
 actions? -add queen to any empty square
-or add queen to leftmost empty square such
that it is not attacked by other queens.
 goal test? 8 queens on the board, none attacked.
 path cost? 1 per move
16
Example: robotic assembly
 states?: real-valued coordinates of robot joint
angles parts of the object to be assembled
 initial state?: rest configuration
 actions?: continuous motions of robot joints
 goal test?: complete assembly
 path cost?: time to execute
17
Robot block world
 Given a set of blocks in a certain configuration,
 Move the blocks into a goal configuration.
 Example :
 (c,b,a)  (b,c,a)
A
B
C
A
C
B
Move (x,y)
18
Operator Description
19
Example: The 8-puzzle
 states?
 initial state?
 actions?
 goal test?
 path cost?
Try yourselves
20
Example: The 8-puzzle
 states? locations of tiles
 initial state? given
 actions? move blank left, right, up, down
 goal test? goal state (given)
 path cost? 1 per move
[Note: optimal solution of n-Puzzle family is NP-hard]
22
The “8-Puzzle” Problem
1 2 3
4
8
6
7 5
1 2 3
4 5 6
7 8
Goal State
Start State
1 2 3
4
8
6
7
5
23
State space of the 8 puzzle problem
24
The Traveling Salesperson Problem
 Find the shortest tour that visits all cities
without visiting any city twice and return
to starting point.
 State: sequence of cities visited
 S0 = A
C
D
A
E
F
B
25
The Traveling Salesperson Problem
 Find the shortest tour that visits all cities
without visiting any city twice and return
to starting point.
 State: sequence of cities visited
 S0 = A
}
,
,
{ d
c
a }
,
,
|
)
,
,
,
{( d
c
a
X
x
d
c
a 
 SG = a complete tour
C
D
A
E
F
B
26
The state-space graph
 Graphs:
 nodes, arcs, directed arcs, paths
 Search graphs:
 States are nodes
 operators are directed arcs
 solution is a path from start to goal
 Problem formulation:
 Give an abstract description of states, operators, initial state
and goal state.
 Problem solving:
 Generate a part of the search space that contains a solution
27
Tree search algorithms
 Basic idea:
 Exploration of state space graph by generating
successors of already-explored states (a.k.a. expanding
states).
 Every states is evaluated: is it a goal state?
28
Tree search example
29
Tree search example
30
Tree search example
31
Implementation: states vs. nodes
 A state is a (representation of) a physical configuration
 A node is a data structure constituting part of a search tree
contains info such as: state, parent node, action, path cost
g(x), depth
 The Expand function creates new nodes, filling in the
various fields and using the SuccessorFn of the problem
to create the corresponding states.
32
Search strategies
 A search strategy is defined by picking the order of node
expansion
 Strategies are evaluated along the following dimensions:
 completeness: does it always find a solution if one exists?
 time complexity: number of nodes generated
 space complexity: maximum number of nodes in memory
 optimality: does it always find a least-cost solution?
 Time and space complexity are measured in terms of
 b: maximum branching factor of the search tree
 d: depth of the least-cost solution
 m: maximum depth of the state space (may be ∞)
33
Searching the search space
 Uninformed Blind search
 Breadth-first
 uniform first
 depth-first
 Iterative deepening depth-first
 Bidirectional
 Branch and Bound
 Informed Heuristic search (next class)
 Greedy search, hill climbing, Heuristics
34
Next time
 Search Strategies
Questions?

More Related Content

Similar to state-spaces29Sep06.ppt

problem solve and resolving in ai domain , probloms
problem solve and resolving in ai domain , problomsproblem solve and resolving in ai domain , probloms
problem solve and resolving in ai domain , probloms
SlimAmiri
 
l2.pptx
l2.pptxl2.pptx
l2.pptx
l2.pptxl2.pptx
Lecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligenceLecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligence
mohsinwaseer1
 
13256181.ppt
13256181.ppt13256181.ppt
13256181.ppt
JohnWilliam111370
 
Lec#2
Lec#2Lec#2
Lec#2
Ali Shah
 
Lecture 3 problem solving
Lecture 3   problem solvingLecture 3   problem solving
Lecture 3 problem solving
Vajira Thambawita
 
Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching Techniques
Dr. C.V. Suresh Babu
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searchingLuigi Ceccaroni
 
Backtracking
Backtracking  Backtracking
Backtracking
Vikas Sharma
 
Search 2
Search 2Search 2
3.AILec5nkjnkjnkjnkjnkjnjhuhgvkjhbkhj-6.ppt
3.AILec5nkjnkjnkjnkjnkjnjhuhgvkjhbkhj-6.ppt3.AILec5nkjnkjnkjnkjnkjnjhuhgvkjhbkhj-6.ppt
3.AILec5nkjnkjnkjnkjnkjnjhuhgvkjhbkhj-6.ppt
ShakibHasan53
 
2-Heuristic Search.ppt
2-Heuristic Search.ppt2-Heuristic Search.ppt
2-Heuristic Search.ppt
MIT,Imphal
 
Search 1
Search 1Search 1
5.5 back track
5.5 back track5.5 back track
5.5 back track
Krish_ver2
 
Perform brute force
Perform brute forcePerform brute force
Perform brute force
SHC
 
Searching
SearchingSearching
Comparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm
Comparison Study of Multiple Traveling Salesmen Problem using Genetic AlgorithmComparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm
Comparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm
IOSR Journals
 

Similar to state-spaces29Sep06.ppt (20)

problem solve and resolving in ai domain , probloms
problem solve and resolving in ai domain , problomsproblem solve and resolving in ai domain , probloms
problem solve and resolving in ai domain , probloms
 
l2.pptx
l2.pptxl2.pptx
l2.pptx
 
l2.pptx
l2.pptxl2.pptx
l2.pptx
 
Lecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligenceLecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligence
 
13256181.ppt
13256181.ppt13256181.ppt
13256181.ppt
 
Lec#2
Lec#2Lec#2
Lec#2
 
Searching techniques
Searching techniquesSearching techniques
Searching techniques
 
Lecture 3 problem solving
Lecture 3   problem solvingLecture 3   problem solving
Lecture 3 problem solving
 
Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching Techniques
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
 
Backtracking
Backtracking  Backtracking
Backtracking
 
Search 2
Search 2Search 2
Search 2
 
3.AILec5nkjnkjnkjnkjnkjnjhuhgvkjhbkhj-6.ppt
3.AILec5nkjnkjnkjnkjnkjnjhuhgvkjhbkhj-6.ppt3.AILec5nkjnkjnkjnkjnkjnjhuhgvkjhbkhj-6.ppt
3.AILec5nkjnkjnkjnkjnkjnjhuhgvkjhbkhj-6.ppt
 
2-Heuristic Search.ppt
2-Heuristic Search.ppt2-Heuristic Search.ppt
2-Heuristic Search.ppt
 
Search 1
Search 1Search 1
Search 1
 
5.5 back track
5.5 back track5.5 back track
5.5 back track
 
Perform brute force
Perform brute forcePerform brute force
Perform brute force
 
Search
SearchSearch
Search
 
Searching
SearchingSearching
Searching
 
Comparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm
Comparison Study of Multiple Traveling Salesmen Problem using Genetic AlgorithmComparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm
Comparison Study of Multiple Traveling Salesmen Problem using Genetic Algorithm
 

More from PerumalPitchandi

Lecture Notes on Recommender System Introduction
Lecture Notes on Recommender System IntroductionLecture Notes on Recommender System Introduction
Lecture Notes on Recommender System Introduction
PerumalPitchandi
 
22ADE002 – Business Analytics- Module 1.pptx
22ADE002 – Business Analytics- Module 1.pptx22ADE002 – Business Analytics- Module 1.pptx
22ADE002 – Business Analytics- Module 1.pptx
PerumalPitchandi
 
biv_mult.ppt
biv_mult.pptbiv_mult.ppt
biv_mult.ppt
PerumalPitchandi
 
ppt_ids-data science.pdf
ppt_ids-data science.pdfppt_ids-data science.pdf
ppt_ids-data science.pdf
PerumalPitchandi
 
ANOVA Presentation.ppt
ANOVA Presentation.pptANOVA Presentation.ppt
ANOVA Presentation.ppt
PerumalPitchandi
 
Data Science Intro.pptx
Data Science Intro.pptxData Science Intro.pptx
Data Science Intro.pptx
PerumalPitchandi
 
Descriptive_Statistics_PPT.ppt
Descriptive_Statistics_PPT.pptDescriptive_Statistics_PPT.ppt
Descriptive_Statistics_PPT.ppt
PerumalPitchandi
 
SW_Cost_Estimation.ppt
SW_Cost_Estimation.pptSW_Cost_Estimation.ppt
SW_Cost_Estimation.ppt
PerumalPitchandi
 
CostEstimation-1.ppt
CostEstimation-1.pptCostEstimation-1.ppt
CostEstimation-1.ppt
PerumalPitchandi
 
20IT204-COA-Lecture 18.ppt
20IT204-COA-Lecture 18.ppt20IT204-COA-Lecture 18.ppt
20IT204-COA-Lecture 18.ppt
PerumalPitchandi
 
20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptx20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptx
PerumalPitchandi
 
Capability Maturity Model (CMM).pptx
Capability Maturity Model (CMM).pptxCapability Maturity Model (CMM).pptx
Capability Maturity Model (CMM).pptx
PerumalPitchandi
 
Comparison_between_Waterfall_and_Agile_m (1).pptx
Comparison_between_Waterfall_and_Agile_m (1).pptxComparison_between_Waterfall_and_Agile_m (1).pptx
Comparison_between_Waterfall_and_Agile_m (1).pptx
PerumalPitchandi
 
Introduction to Data Science.pptx
Introduction to Data Science.pptxIntroduction to Data Science.pptx
Introduction to Data Science.pptx
PerumalPitchandi
 
FDS Module I 24.1.2022.ppt
FDS Module I 24.1.2022.pptFDS Module I 24.1.2022.ppt
FDS Module I 24.1.2022.ppt
PerumalPitchandi
 
FDS Module I 20.1.2022.ppt
FDS Module I 20.1.2022.pptFDS Module I 20.1.2022.ppt
FDS Module I 20.1.2022.ppt
PerumalPitchandi
 
AgileSoftwareDevelopment.ppt
AgileSoftwareDevelopment.pptAgileSoftwareDevelopment.ppt
AgileSoftwareDevelopment.ppt
PerumalPitchandi
 
Agile and its impact to Project Management 022218.pptx
Agile and its impact to Project Management 022218.pptxAgile and its impact to Project Management 022218.pptx
Agile and its impact to Project Management 022218.pptx
PerumalPitchandi
 
Data_exploration.ppt
Data_exploration.pptData_exploration.ppt
Data_exploration.ppt
PerumalPitchandi
 
BIIntro.ppt
BIIntro.pptBIIntro.ppt
BIIntro.ppt
PerumalPitchandi
 

More from PerumalPitchandi (20)

Lecture Notes on Recommender System Introduction
Lecture Notes on Recommender System IntroductionLecture Notes on Recommender System Introduction
Lecture Notes on Recommender System Introduction
 
22ADE002 – Business Analytics- Module 1.pptx
22ADE002 – Business Analytics- Module 1.pptx22ADE002 – Business Analytics- Module 1.pptx
22ADE002 – Business Analytics- Module 1.pptx
 
biv_mult.ppt
biv_mult.pptbiv_mult.ppt
biv_mult.ppt
 
ppt_ids-data science.pdf
ppt_ids-data science.pdfppt_ids-data science.pdf
ppt_ids-data science.pdf
 
ANOVA Presentation.ppt
ANOVA Presentation.pptANOVA Presentation.ppt
ANOVA Presentation.ppt
 
Data Science Intro.pptx
Data Science Intro.pptxData Science Intro.pptx
Data Science Intro.pptx
 
Descriptive_Statistics_PPT.ppt
Descriptive_Statistics_PPT.pptDescriptive_Statistics_PPT.ppt
Descriptive_Statistics_PPT.ppt
 
SW_Cost_Estimation.ppt
SW_Cost_Estimation.pptSW_Cost_Estimation.ppt
SW_Cost_Estimation.ppt
 
CostEstimation-1.ppt
CostEstimation-1.pptCostEstimation-1.ppt
CostEstimation-1.ppt
 
20IT204-COA-Lecture 18.ppt
20IT204-COA-Lecture 18.ppt20IT204-COA-Lecture 18.ppt
20IT204-COA-Lecture 18.ppt
 
20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptx20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptx
 
Capability Maturity Model (CMM).pptx
Capability Maturity Model (CMM).pptxCapability Maturity Model (CMM).pptx
Capability Maturity Model (CMM).pptx
 
Comparison_between_Waterfall_and_Agile_m (1).pptx
Comparison_between_Waterfall_and_Agile_m (1).pptxComparison_between_Waterfall_and_Agile_m (1).pptx
Comparison_between_Waterfall_and_Agile_m (1).pptx
 
Introduction to Data Science.pptx
Introduction to Data Science.pptxIntroduction to Data Science.pptx
Introduction to Data Science.pptx
 
FDS Module I 24.1.2022.ppt
FDS Module I 24.1.2022.pptFDS Module I 24.1.2022.ppt
FDS Module I 24.1.2022.ppt
 
FDS Module I 20.1.2022.ppt
FDS Module I 20.1.2022.pptFDS Module I 20.1.2022.ppt
FDS Module I 20.1.2022.ppt
 
AgileSoftwareDevelopment.ppt
AgileSoftwareDevelopment.pptAgileSoftwareDevelopment.ppt
AgileSoftwareDevelopment.ppt
 
Agile and its impact to Project Management 022218.pptx
Agile and its impact to Project Management 022218.pptxAgile and its impact to Project Management 022218.pptx
Agile and its impact to Project Management 022218.pptx
 
Data_exploration.ppt
Data_exploration.pptData_exploration.ppt
Data_exploration.ppt
 
BIIntro.ppt
BIIntro.pptBIIntro.ppt
BIIntro.ppt
 

Recently uploaded

Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 

Recently uploaded (20)

Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 

state-spaces29Sep06.ppt

  • 1. 1 Solving problems by searching 171, Class 2 Chapter 3
  • 2. 2 Overview  Intelligent agents: problem solving as search  Search consists of  state space  operators  start state  goal states  The search graph  A Search Tree is an efficient way to represent the search process  There are a variety of search algorithms, including  Depth-First Search  Breadth-First Search  Others which use heuristic knowledge (in future lectures)
  • 3. 3 Example: Romania  On holiday in Romania; currently in Arad.  Flight leaves tomorrow from Bucharest  Formulate goal:  be in Bucharest  Formulate problem:  states: various cities  actions: drive between cities  Find solution:  sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest
  • 5. 5 Problem types  Static / Dynamic Previous problem was static: no attention to changes in environment  Observable / Partially Observable / Unobservable Previous problem was observable: it knew its initial state.  Deterministic / Stochastic Previous problem was deterministic: no new percepts were necessary, we can predict the future perfectly  Discrete / continuous Previous problem was discrete: we can enumerate all possibilities
  • 6. 6 Example: vacuum world  Observable, start in #5. Solution?
  • 7. 7 Example: vacuum world  Observable, start in #5. Solution? [Right, Suck]  Unobservable, start in {1,2,3,4,5,6,7,8} e.g., Solution?
  • 8. 8 Example: vacuum world  Unobservable, start in {1,2,3,4,5,6,7,8} e.g., Solution? [Right,Suck,Left,Suck]
  • 9. 9
  • 10. 11 State-Space Problem Formulation A problem is defined by four items: initial state e.g., "at Arad“ actions or successor function S(x) = set of action–state pairs  e.g., S(Arad) = {<Arad  Zerind, Zerind>, … } goal test, e.g., x = "at Bucharest”, Checkmate(x) path cost (additive)  e.g., sum of distances, number of actions executed, etc.  c(x,a,y) is the step cost, assumed to be ≥ 0 A solution is a sequence of actions leading from the initial state to a goal state
  • 11. 13 Vacuum world state space graph  states? discrete: dirt and robot location  initial state? any  actions? Left, Right, Suck  goal test? no dirt at all locations  path cost? 1 per action
  • 13. 15 Example: 8-Queens  states? -any arrangement of n<=8 queens -or arrangements of n<=8 queens in leftmost n columns, 1 per column, such that no queen attacks any other.  initial state? no queens on the board  actions? -add queen to any empty square -or add queen to leftmost empty square such that it is not attacked by other queens.  goal test? 8 queens on the board, none attacked.  path cost? 1 per move
  • 14. 16 Example: robotic assembly  states?: real-valued coordinates of robot joint angles parts of the object to be assembled  initial state?: rest configuration  actions?: continuous motions of robot joints  goal test?: complete assembly  path cost?: time to execute
  • 15. 17 Robot block world  Given a set of blocks in a certain configuration,  Move the blocks into a goal configuration.  Example :  (c,b,a)  (b,c,a) A B C A C B Move (x,y)
  • 17. 19 Example: The 8-puzzle  states?  initial state?  actions?  goal test?  path cost? Try yourselves
  • 18. 20 Example: The 8-puzzle  states? locations of tiles  initial state? given  actions? move blank left, right, up, down  goal test? goal state (given)  path cost? 1 per move [Note: optimal solution of n-Puzzle family is NP-hard]
  • 19. 22 The “8-Puzzle” Problem 1 2 3 4 8 6 7 5 1 2 3 4 5 6 7 8 Goal State Start State 1 2 3 4 8 6 7 5
  • 20. 23 State space of the 8 puzzle problem
  • 21. 24 The Traveling Salesperson Problem  Find the shortest tour that visits all cities without visiting any city twice and return to starting point.  State: sequence of cities visited  S0 = A C D A E F B
  • 22. 25 The Traveling Salesperson Problem  Find the shortest tour that visits all cities without visiting any city twice and return to starting point.  State: sequence of cities visited  S0 = A } , , { d c a } , , | ) , , , {( d c a X x d c a   SG = a complete tour C D A E F B
  • 23. 26 The state-space graph  Graphs:  nodes, arcs, directed arcs, paths  Search graphs:  States are nodes  operators are directed arcs  solution is a path from start to goal  Problem formulation:  Give an abstract description of states, operators, initial state and goal state.  Problem solving:  Generate a part of the search space that contains a solution
  • 24. 27 Tree search algorithms  Basic idea:  Exploration of state space graph by generating successors of already-explored states (a.k.a. expanding states).  Every states is evaluated: is it a goal state?
  • 28. 31 Implementation: states vs. nodes  A state is a (representation of) a physical configuration  A node is a data structure constituting part of a search tree contains info such as: state, parent node, action, path cost g(x), depth  The Expand function creates new nodes, filling in the various fields and using the SuccessorFn of the problem to create the corresponding states.
  • 29. 32 Search strategies  A search strategy is defined by picking the order of node expansion  Strategies are evaluated along the following dimensions:  completeness: does it always find a solution if one exists?  time complexity: number of nodes generated  space complexity: maximum number of nodes in memory  optimality: does it always find a least-cost solution?  Time and space complexity are measured in terms of  b: maximum branching factor of the search tree  d: depth of the least-cost solution  m: maximum depth of the state space (may be ∞)
  • 30. 33 Searching the search space  Uninformed Blind search  Breadth-first  uniform first  depth-first  Iterative deepening depth-first  Bidirectional  Branch and Bound  Informed Heuristic search (next class)  Greedy search, hill climbing, Heuristics
  • 31. 34 Next time  Search Strategies Questions?