SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
Artificial Intelligence Searching
Problem Solving by Searching.
Reading: Section 3.1 – 3.4 of Textbook R&N
Intelligence is often displayed during problem-solving
processes.
How an agent can find a sequence of actions
that achieves its goal?
By Bal Krishna Subedi 1
Artificial Intelligence Searching
State Space Representation
In many situations, "to solve a problem" can be described
as to change the current situation, step by step, from
an initial state to a final state.
If each state is represented by a node, and each possible change is represented by
a link, then a "problem" can be represented as a graph (the "state space"), with a
"solution" corresponding to a path from the initial state to a final state.
In this way, a solution consists of a sequence of operations, each of which changes
one state into another one, and the whole sequence changes the initial state into a
final state in multiple steps.
By Bal Krishna Subedi 2
Artificial Intelligence Searching
Problem-Solving Agents
Task: To solve a particular problem by searching state space.
function simple-problem-solving-agent (percept) returns an action
inputs: percept, a percept
static: seq, an action sequence, initially empty
state, some description of current world state
goal, a goal, initially empty
problem, a problem formulation
state update-state (state, percept)
if seq is empty then do
goal formulate-goal (state)
problem formulate-problem (state, goal)
seq search (problem)
action first (seq)
seq rest (seq)
return action
Assume the environment is:
Static, Observable, Discrete &
Deterministic.
By Bal Krishna Subedi 3
Artificial Intelligence Searching
Defining Search Problems
A statement of a Search problem has four components:
1. initial state: starting point from which the agent sets out
2. actions (operators, successor functions):
• describe the set of possible actions
3. goal test: determines if a given state is the goal state.
4. path cost:
• determines the expenses of the agent for executing the actions in a path
• sum of the costs of the individual actions in a path
Solution quality is measured by the path cost function, and an
optimal solution has the lowest path cost
among all solutions.
By Bal Krishna Subedi 4
Artificial Intelligence Searching
Example: Route Finding Problem
By Bal Krishna Subedi 5
• states
– Locations (e.g: A, B, …)
• initial state
– starting point (e.g: S)
• successor function (operators)
– move from one location to another
• goal test
– arrive at a certain location (e.g: G)
• path cost
– Total distance, money, time, travel
comfort etc. (here distance in km)
S
A
D
B
E
C
F
G
3
4 4
5 5
42
4
3
Problem Formulation:
To find the route from city S to city G
Artificial Intelligence Searching
Searching for Solutions
1. Start from initial state, test, is it goal? If not expand the current state.
(i.e. from S get A, D).
2. Move to anyone of new states to proceed further (i.e move to A or D).
3. Continue choosing, testing, and expending until either a solution is
found or no more state to be expanded.
For this example there are 8 states & infinite number of paths to
check.
By Bal Krishna Subedi 6
Artificial Intelligence Searching
Search Method’s Performance
The choice of which state is to expand – search methods.
Search methods are evaluated along the following dimensions:
completeness:- does it always find a solution if one exists?
time complexity:- number of nodes generated/expanded
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 (number of successor of any
node) of the search tree
d -- depth of the least-cost solution.
m -- maximum length of any path in the space (may be ∞)
By Bal Krishna Subedi 7
Artificial Intelligence Searching
Search Methods
There are two broad classes of search methods:
- uninformed (or blind) search methods;
In the case of the uninformed search methods the order in which potential
solution paths are considered is arbitrary, using no domain-specific
information to judge where the solution is likely to lie.
• Breadth-first Search
• Uniform-cost search
• Depth-first search
• Depth-limited search.
• Interative deepening depth-first search.
• Bidirectional search
- informed (heuristic) search methods.
Use domain specific heuristic to find solution.
• Discussed later.
By Bal Krishna Subedi 8
Artificial Intelligence Searching
Breadth-first search (BFS)
All nodes are expended at a given depth in the search tree before any nodes at
the next level are expanded until the goal reached.
S
A D
B
E
C
F
G
D A
E E B B
A CECFBFD
S
A
D
B
E
C
F
G
3
4 4
5 5
42
4
3
Find path from S to G
Constraint: Do not generate as child
node if the node is already parent to
avoid more loop.
By Bal Krishna Subedi 9
Artificial Intelligence Searching
BFS: Discussion
• Complete? Yes, if b is finite (i.e goal is in some finite depth)
• Optimal? Yes, if steps are identical not optimal in general.
• Time complexity? 1 + b + b2 + b3 + . . . + bd = O(bd), i.e.,
exponential in d
• Space complexity? O(bd) (keeps every node in memory)
Lets assume a b= 10 at depth 10, number of nodes = 1011 time required for
processing (with processor can process 10,000 nodes per sec) = 129 days
and memory requirement = 101 TB (1 node = 1KB)
Required another solution!
By Bal Krishna Subedi 10
Artificial Intelligence Searching
Uniform-Cost Search
Modified version of BFS to make optimal.
Expand the node n with lowest path cost.
By Bal Krishna Subedi 11
S
A
D
B
E
C
F
G
3
4 4
5 5
42
4
3
S
A D
3 4
3 4
B D
54
87
C E
4 5
11 12
G
3
13
B F
45
1011
A E
5 2
69
C(i,j) = cost of an arc from node i to node j
C(x,z) = C(x,y) + C(y,z)
Find the minimum cost path from S to G:
Artificial Intelligence Searching
Uniform-Cost Search: Discussion
Does not care about the number of steps, only care about total cost.
• Complete? Yes, if step cost ≥ ε (small positive number).
• Time? Maximum as of BFS
• Space? Maximum as of BFS.
• Optimal? Yes
By Bal Krishna Subedi 12
Artificial Intelligence Searching
Depth First Search
DFS expand the deepest unexpanded node.
By Bal Krishna Subedi 13
S
A
B
C
G
E
FD
S
A
D
B
E
C
F
G
3
4 4
5 5
42
4
3
Find a path from S to G.
Artificial Intelligence Searching
DFS: Discussion
• Complete? Yes: in finite state, No, if fall in infinite depth.
• Time? O(bm): terrible if m is much larger than d
• but if solutions are dense, may be much faster than breadth-first
• Space? O(bm), i.e., linear space!
• Optimal? No
The problem of unbounded trees can be solve by supplying depth-
first search with a determined depth limit (nodes at depth are treated
as they have no successors) – Depth limited search
By Bal Krishna Subedi 14
Artificial Intelligence Searching
Iterative deepening depth-first search
S
A
D
B
E
C
F
G
3
4 4
5 5
42
4
3
Performs successive depth-first searches,
considering increasing depth searches, until
a goal node is reached.
Depth 0: S
Depth 1: S
A
S
DA
S
D
A
A
B D
Depth 2: S
A
B
S
A
B D
S
D
A
A
B D
By Bal Krishna Subedi15
Depth 3: S
A
B
C
S
A
B
C E
S
A
B
E
D
E
S
A
B
C E
D
D
A
…
Artificial Intelligence Searching
Iterative deepening DFS: Discussion
Combine the benefits of DFS and BFS.
• Complete? Yes
• Time? O(bd)
• Space? O(bd)
• Optimal? Yes, if steps costs are all identical
• Can be modified to explore uniform-cost tree
By Bal Krishna Subedi 16
Artificial Intelligence Searching
Bidirectional Search
• Search simultaneously forwards from the start
point, and backwards from the goal, and stop
when the two searches meet in the middle.
• Problems: generate predecessors; many goal
states; efficient check for node already visited
by other half of the search; and, what kind of
search.
By Bal Krishna Subedi 17
Artificial Intelligence Searching
Bidirectional Search: Discussion
• Complete? Yes
• Time? O(bd/2)
• Space? O(bd/2)
• Optimal? Yes (if done with correct strategy -
e.g. breadth first).
By Bal Krishna Subedi 18

Contenu connexe

Tendances

Uninformed Search technique
Uninformed Search techniqueUninformed Search technique
Uninformed Search techniqueKapil Dahal
 
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) Searchmatele41
 
PowerPoint - K-State Laboratory for Knowledge Discovery in ...
PowerPoint - K-State Laboratory for Knowledge Discovery in ...PowerPoint - K-State Laboratory for Knowledge Discovery in ...
PowerPoint - K-State Laboratory for Knowledge Discovery in ...butest
 
Mit203 analysis and design of algorithms
Mit203  analysis and design of algorithmsMit203  analysis and design of algorithms
Mit203 analysis and design of algorithmssmumbahelp
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language ProcessingNimrita Koul
 
Lecture 08 uninformed search techniques
Lecture 08 uninformed search techniquesLecture 08 uninformed search techniques
Lecture 08 uninformed search techniquesHema Kashyap
 
Diversified Social Media Retrieval for News Stories
Diversified Social Media Retrieval for News StoriesDiversified Social Media Retrieval for News Stories
Diversified Social Media Retrieval for News StoriesBryan Gummibearehausen
 
Uninformed search
Uninformed searchUninformed search
Uninformed searchBablu Shofi
 
Combinations of Local Search and Constraint Programming
Combinations of Local Search and Constraint ProgrammingCombinations of Local Search and Constraint Programming
Combinations of Local Search and Constraint ProgrammingPaulShawIBM
 
text summarization using amr
text summarization using amrtext summarization using amr
text summarization using amramit nagarkoti
 
Learning R via Python…or the other way around
Learning R via Python…or the other way aroundLearning R via Python…or the other way around
Learning R via Python…or the other way aroundSid Xing
 

Tendances (20)

Uninformed Search technique
Uninformed Search techniqueUninformed Search technique
Uninformed Search technique
 
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
 
PowerPoint - K-State Laboratory for Knowledge Discovery in ...
PowerPoint - K-State Laboratory for Knowledge Discovery in ...PowerPoint - K-State Laboratory for Knowledge Discovery in ...
PowerPoint - K-State Laboratory for Knowledge Discovery in ...
 
Problem Solving
Problem Solving Problem Solving
Problem Solving
 
Mit203 analysis and design of algorithms
Mit203  analysis and design of algorithmsMit203  analysis and design of algorithms
Mit203 analysis and design of algorithms
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Lecture 08 uninformed search techniques
Lecture 08 uninformed search techniquesLecture 08 uninformed search techniques
Lecture 08 uninformed search techniques
 
Diversified Social Media Retrieval for News Stories
Diversified Social Media Retrieval for News StoriesDiversified Social Media Retrieval for News Stories
Diversified Social Media Retrieval for News Stories
 
Uninformed search
Uninformed searchUninformed search
Uninformed search
 
NLP from scratch
NLP from scratch NLP from scratch
NLP from scratch
 
More than Words: Advancing Prosodic Analysis
More than Words: Advancing Prosodic AnalysisMore than Words: Advancing Prosodic Analysis
More than Words: Advancing Prosodic Analysis
 
Combinations of Local Search and Constraint Programming
Combinations of Local Search and Constraint ProgrammingCombinations of Local Search and Constraint Programming
Combinations of Local Search and Constraint Programming
 
Ca notes
Ca notesCa notes
Ca notes
 
Id3115321536
Id3115321536Id3115321536
Id3115321536
 
text summarization using amr
text summarization using amrtext summarization using amr
text summarization using amr
 
Project Report
Project ReportProject Report
Project Report
 
Learning R via Python…or the other way around
Learning R via Python…or the other way aroundLearning R via Python…or the other way around
Learning R via Python…or the other way around
 
Use CNN for Sequence Modeling
Use CNN for Sequence ModelingUse CNN for Sequence Modeling
Use CNN for Sequence Modeling
 
grammer
grammergrammer
grammer
 
25010001
2501000125010001
25010001
 

Similaire à AI Searching Techniques and State Space Representation

PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptxPPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptxRaviKiranVarma4
 
SP14 CS188 Lecture 2 -- Uninformed Search.pptx
SP14 CS188 Lecture 2 -- Uninformed Search.pptxSP14 CS188 Lecture 2 -- Uninformed Search.pptx
SP14 CS188 Lecture 2 -- Uninformed Search.pptxAnimeGuru1
 
State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniquesKirti Verma
 
CptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial IntelligenceCptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial Intelligencebutest
 
AI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptxAI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptxYousef Aburawi
 
Artificial intelligence(05)
Artificial intelligence(05)Artificial intelligence(05)
Artificial intelligence(05)Nazir Ahmed
 
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 , problomsSlimAmiri
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial IntelligenceJay Nagar
 
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.pptmmpnair0
 
uniformed (also called blind search algo)
uniformed (also called blind search algo)uniformed (also called blind search algo)
uniformed (also called blind search algo)ssuser2a76b5
 

Similaire à AI Searching Techniques and State Space Representation (20)

Searching
SearchingSearching
Searching
 
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptxPPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
 
Search 2
Search 2Search 2
Search 2
 
Lecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptxLecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptx
 
l2.pptx
l2.pptxl2.pptx
l2.pptx
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
SP14 CS188 Lecture 2 -- Uninformed Search.pptx
SP14 CS188 Lecture 2 -- Uninformed Search.pptxSP14 CS188 Lecture 2 -- Uninformed Search.pptx
SP14 CS188 Lecture 2 -- Uninformed Search.pptx
 
l2.pptx
l2.pptxl2.pptx
l2.pptx
 
AI: AI & problem solving
AI: AI & problem solvingAI: AI & problem solving
AI: AI & problem solving
 
AI: AI & Problem Solving
AI: AI & Problem SolvingAI: AI & Problem Solving
AI: AI & Problem Solving
 
State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniques
 
CptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial IntelligenceCptS 440 / 540 Artificial Intelligence
CptS 440 / 540 Artificial Intelligence
 
AI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptxAI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptx
 
Final slide4 (bsc csit) chapter 4
Final slide4 (bsc csit) chapter 4Final slide4 (bsc csit) chapter 4
Final slide4 (bsc csit) chapter 4
 
Artificial intelligence(05)
Artificial intelligence(05)Artificial intelligence(05)
Artificial intelligence(05)
 
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
 
c4.pptx
c4.pptxc4.pptx
c4.pptx
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
2012wq171-03-UninformedSeknlk ;lm,l;mk;arch.ppt
 
uniformed (also called blind search algo)
uniformed (also called blind search algo)uniformed (also called blind search algo)
uniformed (also called blind search algo)
 

Plus de Tribhuvan University (20)

Lecture 7 se
Lecture 7 seLecture 7 se
Lecture 7 se
 
Lecture 6 se
Lecture 6 seLecture 6 se
Lecture 6 se
 
Lecture 5 se
Lecture 5 seLecture 5 se
Lecture 5 se
 
Lecture 3 se
Lecture 3 seLecture 3 se
Lecture 3 se
 
Lecture 1 se
Lecture 1 seLecture 1 se
Lecture 1 se
 
Lecture 2 se
Lecture 2 seLecture 2 se
Lecture 2 se
 
Lecture 5 m&ca
Lecture 5 m&caLecture 5 m&ca
Lecture 5 m&ca
 
Lecture 4 m&ca
Lecture 4 m&caLecture 4 m&ca
Lecture 4 m&ca
 
Lecture 3 m&ca
Lecture 3 m&caLecture 3 m&ca
Lecture 3 m&ca
 
Lecture 2 m&ca
Lecture 2 m&caLecture 2 m&ca
Lecture 2 m&ca
 
Lecture 1 m&ca
Lecture 1 m&caLecture 1 m&ca
Lecture 1 m&ca
 
Neural network (csc372) lecture 2
Neural network (csc372) lecture 2Neural network (csc372) lecture 2
Neural network (csc372) lecture 2
 
Neural network (csc372) lecture 1
Neural network (csc372) lecture 1Neural network (csc372) lecture 1
Neural network (csc372) lecture 1
 
Ai unit-2
Ai unit-2Ai unit-2
Ai unit-2
 
Ai unit-3
Ai unit-3Ai unit-3
Ai unit-3
 
Unit 4(nlp _neural_network)
Unit 4(nlp _neural_network)Unit 4(nlp _neural_network)
Unit 4(nlp _neural_network)
 
Ai unit-6
Ai unit-6Ai unit-6
Ai unit-6
 
Ai unit-1
Ai unit-1Ai unit-1
Ai unit-1
 
Knowldge reprsentations
Knowldge reprsentationsKnowldge reprsentations
Knowldge reprsentations
 
Logic homework
Logic homeworkLogic homework
Logic homework
 

Dernier

Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Dernier (20)

Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 

AI Searching Techniques and State Space Representation

  • 1. Artificial Intelligence Searching Problem Solving by Searching. Reading: Section 3.1 – 3.4 of Textbook R&N Intelligence is often displayed during problem-solving processes. How an agent can find a sequence of actions that achieves its goal? By Bal Krishna Subedi 1
  • 2. Artificial Intelligence Searching State Space Representation In many situations, "to solve a problem" can be described as to change the current situation, step by step, from an initial state to a final state. If each state is represented by a node, and each possible change is represented by a link, then a "problem" can be represented as a graph (the "state space"), with a "solution" corresponding to a path from the initial state to a final state. In this way, a solution consists of a sequence of operations, each of which changes one state into another one, and the whole sequence changes the initial state into a final state in multiple steps. By Bal Krishna Subedi 2
  • 3. Artificial Intelligence Searching Problem-Solving Agents Task: To solve a particular problem by searching state space. function simple-problem-solving-agent (percept) returns an action inputs: percept, a percept static: seq, an action sequence, initially empty state, some description of current world state goal, a goal, initially empty problem, a problem formulation state update-state (state, percept) if seq is empty then do goal formulate-goal (state) problem formulate-problem (state, goal) seq search (problem) action first (seq) seq rest (seq) return action Assume the environment is: Static, Observable, Discrete & Deterministic. By Bal Krishna Subedi 3
  • 4. Artificial Intelligence Searching Defining Search Problems A statement of a Search problem has four components: 1. initial state: starting point from which the agent sets out 2. actions (operators, successor functions): • describe the set of possible actions 3. goal test: determines if a given state is the goal state. 4. path cost: • determines the expenses of the agent for executing the actions in a path • sum of the costs of the individual actions in a path Solution quality is measured by the path cost function, and an optimal solution has the lowest path cost among all solutions. By Bal Krishna Subedi 4
  • 5. Artificial Intelligence Searching Example: Route Finding Problem By Bal Krishna Subedi 5 • states – Locations (e.g: A, B, …) • initial state – starting point (e.g: S) • successor function (operators) – move from one location to another • goal test – arrive at a certain location (e.g: G) • path cost – Total distance, money, time, travel comfort etc. (here distance in km) S A D B E C F G 3 4 4 5 5 42 4 3 Problem Formulation: To find the route from city S to city G
  • 6. Artificial Intelligence Searching Searching for Solutions 1. Start from initial state, test, is it goal? If not expand the current state. (i.e. from S get A, D). 2. Move to anyone of new states to proceed further (i.e move to A or D). 3. Continue choosing, testing, and expending until either a solution is found or no more state to be expanded. For this example there are 8 states & infinite number of paths to check. By Bal Krishna Subedi 6
  • 7. Artificial Intelligence Searching Search Method’s Performance The choice of which state is to expand – search methods. Search methods are evaluated along the following dimensions: completeness:- does it always find a solution if one exists? time complexity:- number of nodes generated/expanded 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 (number of successor of any node) of the search tree d -- depth of the least-cost solution. m -- maximum length of any path in the space (may be ∞) By Bal Krishna Subedi 7
  • 8. Artificial Intelligence Searching Search Methods There are two broad classes of search methods: - uninformed (or blind) search methods; In the case of the uninformed search methods the order in which potential solution paths are considered is arbitrary, using no domain-specific information to judge where the solution is likely to lie. • Breadth-first Search • Uniform-cost search • Depth-first search • Depth-limited search. • Interative deepening depth-first search. • Bidirectional search - informed (heuristic) search methods. Use domain specific heuristic to find solution. • Discussed later. By Bal Krishna Subedi 8
  • 9. Artificial Intelligence Searching Breadth-first search (BFS) All nodes are expended at a given depth in the search tree before any nodes at the next level are expanded until the goal reached. S A D B E C F G D A E E B B A CECFBFD S A D B E C F G 3 4 4 5 5 42 4 3 Find path from S to G Constraint: Do not generate as child node if the node is already parent to avoid more loop. By Bal Krishna Subedi 9
  • 10. Artificial Intelligence Searching BFS: Discussion • Complete? Yes, if b is finite (i.e goal is in some finite depth) • Optimal? Yes, if steps are identical not optimal in general. • Time complexity? 1 + b + b2 + b3 + . . . + bd = O(bd), i.e., exponential in d • Space complexity? O(bd) (keeps every node in memory) Lets assume a b= 10 at depth 10, number of nodes = 1011 time required for processing (with processor can process 10,000 nodes per sec) = 129 days and memory requirement = 101 TB (1 node = 1KB) Required another solution! By Bal Krishna Subedi 10
  • 11. Artificial Intelligence Searching Uniform-Cost Search Modified version of BFS to make optimal. Expand the node n with lowest path cost. By Bal Krishna Subedi 11 S A D B E C F G 3 4 4 5 5 42 4 3 S A D 3 4 3 4 B D 54 87 C E 4 5 11 12 G 3 13 B F 45 1011 A E 5 2 69 C(i,j) = cost of an arc from node i to node j C(x,z) = C(x,y) + C(y,z) Find the minimum cost path from S to G:
  • 12. Artificial Intelligence Searching Uniform-Cost Search: Discussion Does not care about the number of steps, only care about total cost. • Complete? Yes, if step cost ≥ ε (small positive number). • Time? Maximum as of BFS • Space? Maximum as of BFS. • Optimal? Yes By Bal Krishna Subedi 12
  • 13. Artificial Intelligence Searching Depth First Search DFS expand the deepest unexpanded node. By Bal Krishna Subedi 13 S A B C G E FD S A D B E C F G 3 4 4 5 5 42 4 3 Find a path from S to G.
  • 14. Artificial Intelligence Searching DFS: Discussion • Complete? Yes: in finite state, No, if fall in infinite depth. • Time? O(bm): terrible if m is much larger than d • but if solutions are dense, may be much faster than breadth-first • Space? O(bm), i.e., linear space! • Optimal? No The problem of unbounded trees can be solve by supplying depth- first search with a determined depth limit (nodes at depth are treated as they have no successors) – Depth limited search By Bal Krishna Subedi 14
  • 15. Artificial Intelligence Searching Iterative deepening depth-first search S A D B E C F G 3 4 4 5 5 42 4 3 Performs successive depth-first searches, considering increasing depth searches, until a goal node is reached. Depth 0: S Depth 1: S A S DA S D A A B D Depth 2: S A B S A B D S D A A B D By Bal Krishna Subedi15 Depth 3: S A B C S A B C E S A B E D E S A B C E D D A …
  • 16. Artificial Intelligence Searching Iterative deepening DFS: Discussion Combine the benefits of DFS and BFS. • Complete? Yes • Time? O(bd) • Space? O(bd) • Optimal? Yes, if steps costs are all identical • Can be modified to explore uniform-cost tree By Bal Krishna Subedi 16
  • 17. Artificial Intelligence Searching Bidirectional Search • Search simultaneously forwards from the start point, and backwards from the goal, and stop when the two searches meet in the middle. • Problems: generate predecessors; many goal states; efficient check for node already visited by other half of the search; and, what kind of search. By Bal Krishna Subedi 17
  • 18. Artificial Intelligence Searching Bidirectional Search: Discussion • Complete? Yes • Time? O(bd/2) • Space? O(bd/2) • Optimal? Yes (if done with correct strategy - e.g. breadth first). By Bal Krishna Subedi 18