SlideShare uma empresa Scribd logo
1 de 18
Mr. Amey D. S. Kerkar,
Asst. Professor ,
Computer Engineering Department,
Don Bosco College of Engineering,
Fatorda-Goa.
Terminologies:
 State – Configuration of the game at any Point
1. State Space
 - Description of all possible states reachable from initial
state.
 Forms a graph.
 Nodes = States
 Arcs= actions
2. Initial State
3. Goal State
4. Path Cost
5. Production Rules:
 Rules/actions/operators applied to the current state. Results into
the next state.
rule: XY
Where, LHS represents current state in problem space
RHS is the resultant state.
6. Production System
- AI system developed for the solution of any problem.
Components of Production System:
1. Production Rules
2. Knowledge Base(KB)
3. Control Strategy- Order in which rule is applied compared to
Database/Knowledge base rules
4. Rule applier- checks current state with LHS of rules in KB and
finds appropriate rule to apply.
Example 1: 8-Puzzle Problem
7 4 2
1 5
6 3 8
Initial State
1 2 3
8 4
7 6 5
Initial State
Rules /Operators/Actions: 1. Move blank tile UP
2. Move blank tile DOWN
3. Move blank tile LEFT
4. Move blank tile RIGHT
Control Strategy= Search Technique.
Types of Search Techniques:
1. Uninformed/ Blind Search
2. Informed Search
Problem Formulation for 8 puzzle:
- Data Structure: 3 x 3 vector used for board
- Blank Tile is represented with ‘B’
- Numbered tiles are represented with corresponding
tile number
- Ex: 7 4 2
1 5
6 3 8
Is represented as:
7 4 2
1 𝑩 5
6 3 8
7 4 2
1 5
6 3 8
7 4 2
1 5
6 3 8
7 4
1 5 2
6 3 8
7 4 2
1 8 8
6 3
7 2
1 4 5
6 3 8
7 4 2
1 5
6 3 8
7 4 2
1 3 5
6 8
7 4 2
1 5
6 3 8
1 2 3
8 4
7 6 5
Search Process contains:
1. Expanding a node
2. Generating a node
3. Comparing
4. Tracking the path and path cost
Terminologies: 1.Generated node
2. Explored node
Example 2: TIC-TAC-TOE Problem
Initial state
X X X
X X X
X X X
X
X
X
X
X
X
5 POSSIBLE GOAL STATES FOR PLAYER 1
Player 1 will mark X
Player 2 will mark O
Problem Formulation for TIC-TAC-TOE:
- Data Structure: 3 x 3 vector used for board
- Blank Cell is represented with ‘0’
- Cell with ‘X’ marking represented with ‘1’
- Cell with ‘O’ marking represented with ‘2’
- Ex: Initial state 0 0 0
0 𝟎 0
0 0 0
0 0 X
X 0
X 0
- One of the
Goal State :
2 2 1
0 𝟏 2
1 2 0
Problem Formulation:
Each state= ordered pair {X,Y}
Where,
X= amount of water contained in Jar 1 (4 gallon capacity)
at any time.
Y=amount of water contained in Jar 2 (3 gallon capacity)
at any time.
Initial state: {0,0}
Final state: { P, 2}, Where P is any amount of water.
Example 3: Water Jug Problem
Production Rules:
RULE 1: (X,Y)(4,Y) [fill 4 gallon jug. Applicable if X<4]
RULE 2: (X,Y)(X,3) [fill 3 gallon jug. Applicable if Y<3]
RULE 3: (X,Y)(X-X1,Y) [pour some water out of 4 gallons jar]
RULE 4: (X,Y)(X,Y-X1) [pour some water out of 3 gallons jar]
RULE 5: (X,Y)(0,Y) [Empty 4 gallon jar]
RULE 6: (X,Y)(X,0) [Empty 3 gallon jar]
RULE 7: (X,Y)(4,Y-(4-X)) [Fill 4 gallon jar by pouring some water
from 3 gallon jar]
RULE 8: (X,Y)(X-(3-Y),3) [Fill 3 gallon jar by pouring some water
from 4 gallon jar]
RULE 9: (X,Y)(X+Y,0) [Empty 3 gallon jar by pouring all its water
into 4 gallon jar]
RULE 10: (X,Y)(0,X+Y) [Empty 4 gallon jar by pouring all its water
into 3 gallon jar]
RULE 11: (0,2)(2,0) [Pour 2 gallon from 3 gallon jar into 4 gallon]
RULE 12: (2,y)(0,y) [empty the 2 gallons in 3 gallon
jar on the ground]
One solution :
Water in 4-gallon
jar (X)
Water in 3-gallon
jar (Y)
Rule applied
0 0
0 3 Rule 2
3 0 Rule 9
3 3 Rule 2
4 2 Rule 7
0 2 Rule 5 or 12
Water in 4-gallon
jar (X)
Water in 3-gallon
jar (Y)
Rule applied
0 0
4 0 Rule 1
1 3 Rule 8
1 0 Rule 6
0 1 Rule 10
4 1 Rule 1
2 3 Rule 8
Another Solution :
{0,0}
{0,3}{4,0}
{4,3}{1,3} {3,0} {4,3}
{1,0}
{0,1}
{4,1}
{2,3}
{3,3}
{4,2}
{0,2}
{2,0}
 Missionaries and cannibels
 Travelling Salesperson
 8 Queens
 Combinatorial explosition- in travelling salesperson
problem –
number of routes α (no of cities -1)!
If it takes 1 hour of cpu time to solve for 30 cities
30 hours for 31 cities and
330 hours for 32 cities!!!!
Control strategies
 Helps us decide which rule to apply next.
 What to do when there are more than 1 matching
rules?
 Good control strategy should:
1. cause motion
2.Systematic
Control strategies are classified as:
1. Uninformed/blind search control strategy
Do not have additional info about states beyond problem def.
Total search space is looked for solution
No info is used to determine preference of one child over
other.
Example: 1. Breadth First Search(BFS), Depth First
Search(DFS), Depth Limited Search (DLS).
2. Informed/Directed Search Control Strategy
Some info about problem space(heuristic) is used to compute
preference among the children for exploration and
expansion.
Examples: 1. Best First Search, 2. Problem Decomposition,
A*, Mean end Analysis
Problems problem spaces and search

Mais conteúdo relacionado

Mais procurados

Propositional logic
Propositional logicPropositional logic
Propositional logic
Rushdi Shams
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
Tech_MX
 

Mais procurados (20)

Resolution method in AI.pptx
Resolution method in AI.pptxResolution method in AI.pptx
Resolution method in AI.pptx
 
Informed search
Informed searchInformed search
Informed search
 
Artificial Intelligence Notes Unit 1
Artificial Intelligence Notes Unit 1 Artificial Intelligence Notes Unit 1
Artificial Intelligence Notes Unit 1
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Truth management system
Truth  management systemTruth  management system
Truth management system
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
 
Problems, Problem spaces and Search
Problems, Problem spaces and SearchProblems, Problem spaces and Search
Problems, Problem spaces and Search
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 
First Order Logic resolution
First Order Logic resolutionFirst Order Logic resolution
First Order Logic resolution
 
State space search
State space searchState space search
State space search
 
1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets
 
Production system in ai
Production system in aiProduction system in ai
Production system in ai
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
 
Adaline madaline
Adaline madalineAdaline madaline
Adaline madaline
 
Kleene's theorem
Kleene's theoremKleene's theorem
Kleene's theorem
 
knowledge representation using rules
knowledge representation using rulesknowledge representation using rules
knowledge representation using rules
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
Lecture 06 production system
Lecture 06 production systemLecture 06 production system
Lecture 06 production system
 
Multi Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing MachineMulti Head, Multi Tape Turing Machine
Multi Head, Multi Tape Turing Machine
 
Planning
Planning Planning
Planning
 

Destaque (7)

State space search
State space search State space search
State space search
 
(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 ai(Radhika) presentation on chapter 2 ai
(Radhika) presentation on chapter 2 ai
 
State Space Search(2)
State Space Search(2)State Space Search(2)
State Space Search(2)
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & Reasoning
 
Frames
FramesFrames
Frames
 
Issues in knowledge representation
Issues in knowledge representationIssues in knowledge representation
Issues in knowledge representation
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
 

Semelhante a Problems problem spaces and search

Chapter2final 130103081315-phpapp02
Chapter2final 130103081315-phpapp02Chapter2final 130103081315-phpapp02
Chapter2final 130103081315-phpapp02
Madhan Kumar
 
2.Problems Problem Spaces and Search.ppt
2.Problems Problem Spaces and Search.ppt2.Problems Problem Spaces and Search.ppt
2.Problems Problem Spaces and Search.ppt
Dr. Naushad Varish
 

Semelhante a Problems problem spaces and search (20)

Problem Formulation
Problem FormulationProblem Formulation
Problem Formulation
 
Ch 2 State Space Search - slides part 1.pdf
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
 
AI-State Space Representation.pptx
AI-State Space Representation.pptxAI-State Space Representation.pptx
AI-State Space Representation.pptx
 
AI-State Space Representation.pptx
AI-State Space Representation.pptxAI-State Space Representation.pptx
AI-State Space Representation.pptx
 
Problems Spaces and Search
Problems Spaces and SearchProblems Spaces and Search
Problems Spaces and Search
 
Ai lecture 8(unit02)
Ai lecture  8(unit02)Ai lecture  8(unit02)
Ai lecture 8(unit02)
 
unit 2.pptx
unit 2.pptxunit 2.pptx
unit 2.pptx
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
problemsolving with AI.pptx
problemsolving with AI.pptxproblemsolving with AI.pptx
problemsolving with AI.pptx
 
Chapter2final 130103081315-phpapp02
Chapter2final 130103081315-phpapp02Chapter2final 130103081315-phpapp02
Chapter2final 130103081315-phpapp02
 
Amit ppt
Amit pptAmit ppt
Amit ppt
 
AI-04 Production System - Search Problem.pptx
AI-04 Production System - Search Problem.pptxAI-04 Production System - Search Problem.pptx
AI-04 Production System - Search Problem.pptx
 
B02404014
B02404014B02404014
B02404014
 
Expert system
Expert systemExpert system
Expert system
 
Chapter 2 (final)
Chapter 2 (final)Chapter 2 (final)
Chapter 2 (final)
 
Ai unit-3
Ai unit-3Ai unit-3
Ai unit-3
 
Production system
Production systemProduction system
Production system
 
2.Problems Problem Spaces and Search.ppt
2.Problems Problem Spaces and Search.ppt2.Problems Problem Spaces and Search.ppt
2.Problems Problem Spaces and Search.ppt
 
Top school in delhi ncr
Top school in delhi ncrTop school in delhi ncr
Top school in delhi ncr
 
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal's
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal'sGreedy algorithms -Making change-Knapsack-Prim's-Kruskal's
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal's
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 

Problems problem spaces and search

  • 1. Mr. Amey D. S. Kerkar, Asst. Professor , Computer Engineering Department, Don Bosco College of Engineering, Fatorda-Goa.
  • 2. Terminologies:  State – Configuration of the game at any Point 1. State Space  - Description of all possible states reachable from initial state.  Forms a graph.  Nodes = States  Arcs= actions 2. Initial State 3. Goal State 4. Path Cost
  • 3. 5. Production Rules:  Rules/actions/operators applied to the current state. Results into the next state. rule: XY Where, LHS represents current state in problem space RHS is the resultant state. 6. Production System - AI system developed for the solution of any problem. Components of Production System: 1. Production Rules 2. Knowledge Base(KB) 3. Control Strategy- Order in which rule is applied compared to Database/Knowledge base rules 4. Rule applier- checks current state with LHS of rules in KB and finds appropriate rule to apply.
  • 4. Example 1: 8-Puzzle Problem 7 4 2 1 5 6 3 8 Initial State 1 2 3 8 4 7 6 5 Initial State Rules /Operators/Actions: 1. Move blank tile UP 2. Move blank tile DOWN 3. Move blank tile LEFT 4. Move blank tile RIGHT Control Strategy= Search Technique. Types of Search Techniques: 1. Uninformed/ Blind Search 2. Informed Search
  • 5. Problem Formulation for 8 puzzle: - Data Structure: 3 x 3 vector used for board - Blank Tile is represented with ‘B’ - Numbered tiles are represented with corresponding tile number - Ex: 7 4 2 1 5 6 3 8 Is represented as: 7 4 2 1 𝑩 5 6 3 8
  • 6. 7 4 2 1 5 6 3 8 7 4 2 1 5 6 3 8 7 4 1 5 2 6 3 8 7 4 2 1 8 8 6 3 7 2 1 4 5 6 3 8 7 4 2 1 5 6 3 8 7 4 2 1 3 5 6 8 7 4 2 1 5 6 3 8 1 2 3 8 4 7 6 5
  • 7. Search Process contains: 1. Expanding a node 2. Generating a node 3. Comparing 4. Tracking the path and path cost Terminologies: 1.Generated node 2. Explored node
  • 8. Example 2: TIC-TAC-TOE Problem Initial state X X X X X X X X X X X X X X X 5 POSSIBLE GOAL STATES FOR PLAYER 1 Player 1 will mark X Player 2 will mark O
  • 9. Problem Formulation for TIC-TAC-TOE: - Data Structure: 3 x 3 vector used for board - Blank Cell is represented with ‘0’ - Cell with ‘X’ marking represented with ‘1’ - Cell with ‘O’ marking represented with ‘2’ - Ex: Initial state 0 0 0 0 𝟎 0 0 0 0 0 0 X X 0 X 0 - One of the Goal State : 2 2 1 0 𝟏 2 1 2 0
  • 10. Problem Formulation: Each state= ordered pair {X,Y} Where, X= amount of water contained in Jar 1 (4 gallon capacity) at any time. Y=amount of water contained in Jar 2 (3 gallon capacity) at any time. Initial state: {0,0} Final state: { P, 2}, Where P is any amount of water. Example 3: Water Jug Problem
  • 11. Production Rules: RULE 1: (X,Y)(4,Y) [fill 4 gallon jug. Applicable if X<4] RULE 2: (X,Y)(X,3) [fill 3 gallon jug. Applicable if Y<3] RULE 3: (X,Y)(X-X1,Y) [pour some water out of 4 gallons jar] RULE 4: (X,Y)(X,Y-X1) [pour some water out of 3 gallons jar] RULE 5: (X,Y)(0,Y) [Empty 4 gallon jar] RULE 6: (X,Y)(X,0) [Empty 3 gallon jar] RULE 7: (X,Y)(4,Y-(4-X)) [Fill 4 gallon jar by pouring some water from 3 gallon jar] RULE 8: (X,Y)(X-(3-Y),3) [Fill 3 gallon jar by pouring some water from 4 gallon jar] RULE 9: (X,Y)(X+Y,0) [Empty 3 gallon jar by pouring all its water into 4 gallon jar] RULE 10: (X,Y)(0,X+Y) [Empty 4 gallon jar by pouring all its water into 3 gallon jar] RULE 11: (0,2)(2,0) [Pour 2 gallon from 3 gallon jar into 4 gallon]
  • 12. RULE 12: (2,y)(0,y) [empty the 2 gallons in 3 gallon jar on the ground] One solution : Water in 4-gallon jar (X) Water in 3-gallon jar (Y) Rule applied 0 0 0 3 Rule 2 3 0 Rule 9 3 3 Rule 2 4 2 Rule 7 0 2 Rule 5 or 12
  • 13. Water in 4-gallon jar (X) Water in 3-gallon jar (Y) Rule applied 0 0 4 0 Rule 1 1 3 Rule 8 1 0 Rule 6 0 1 Rule 10 4 1 Rule 1 2 3 Rule 8 Another Solution :
  • 15.  Missionaries and cannibels  Travelling Salesperson  8 Queens  Combinatorial explosition- in travelling salesperson problem – number of routes α (no of cities -1)! If it takes 1 hour of cpu time to solve for 30 cities 30 hours for 31 cities and 330 hours for 32 cities!!!!
  • 16. Control strategies  Helps us decide which rule to apply next.  What to do when there are more than 1 matching rules?  Good control strategy should: 1. cause motion 2.Systematic
  • 17. Control strategies are classified as: 1. Uninformed/blind search control strategy Do not have additional info about states beyond problem def. Total search space is looked for solution No info is used to determine preference of one child over other. Example: 1. Breadth First Search(BFS), Depth First Search(DFS), Depth Limited Search (DLS). 2. Informed/Directed Search Control Strategy Some info about problem space(heuristic) is used to compute preference among the children for exploration and expansion. Examples: 1. Best First Search, 2. Problem Decomposition, A*, Mean end Analysis