SlideShare a Scribd company logo
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

More Related Content

PDF
AI 7 | Constraint Satisfaction Problem
PDF
Problem Solving
PPTX
Artificial Intelligence Searching Techniques
PPT
Knowledge Representation & Reasoning
PPT
Polygon filling
DOC
Branch and bound
PDF
Ai lab manual
PPTX
Knowledge representation and Predicate logic
AI 7 | Constraint Satisfaction Problem
Problem Solving
Artificial Intelligence Searching Techniques
Knowledge Representation & Reasoning
Polygon filling
Branch and bound
Ai lab manual
Knowledge representation and Predicate logic

What's hot (20)

PPTX
Adversarial search
PPTX
Association Rule mining
PPTX
Knowledge representation In Artificial Intelligence
PDF
Ai lecture 06(unit-02)
PPTX
Circle generation algorithm
PPTX
Water jug problem ai part 6
PDF
I.BEST FIRST SEARCH IN AI
PPT
Syntax and semantics of propositional logic
PPTX
Ai 8 puzzle problem
PPT
Problems, Problem spaces and Search
PPT
5 csp
PPTX
Dynamic Programming
PPTX
Reasoning in AI
PPT
Hill climbing
PDF
Artificial Intelligence - Hill climbing.
PPTX
Constraint satisfaction problems (csp)
PDF
I. AO* SEARCH ALGORITHM
PPTX
Lecture optimal binary search tree
PDF
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
PPTX
Artificial Intelligence- TicTacToe game
Adversarial search
Association Rule mining
Knowledge representation In Artificial Intelligence
Ai lecture 06(unit-02)
Circle generation algorithm
Water jug problem ai part 6
I.BEST FIRST SEARCH IN AI
Syntax and semantics of propositional logic
Ai 8 puzzle problem
Problems, Problem spaces and Search
5 csp
Dynamic Programming
Reasoning in AI
Hill climbing
Artificial Intelligence - Hill climbing.
Constraint satisfaction problems (csp)
I. AO* SEARCH ALGORITHM
Lecture optimal binary search tree
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
Artificial Intelligence- TicTacToe game
Ad

Viewers also liked (7)

PDF
State space search
PPT
(Radhika) presentation on chapter 2 ai
PPT
State Space Search(2)
PPT
Predicate Logic
PPTX
Frames
PPTX
Issues in knowledge representation
PPT
Heuristic Search Techniques {Artificial Intelligence}
State space search
(Radhika) presentation on chapter 2 ai
State Space Search(2)
Predicate Logic
Frames
Issues in knowledge representation
Heuristic Search Techniques {Artificial Intelligence}
Ad

Similar to Problems problem spaces and search (20)

PPTX
PPT FOPL first order predicate logic.pptx
PPT
2.Problems Problem Spaces and Search.ppt
PDF
Ch 2 State Space Search - slides part 1.pdf
PPT
Chapter 02-artificialPROBLEM SOLVING.ppt
PPT
Problem space
PPT
Problem space
PPT
Problem space
PPT
Amit ppt
PPT
Problems Spaces and Search
PPTX
problem space and problem definition in ai
PPTX
Searching in Artificial Intelligence for UG
PPTX
problemsolving with AI.pptx
PDF
chapter 2 Problem Solving.pdf
PPTX
Presentation_8948_Content_Document_20250725121751PM (1).pptx
PPTX
study material for Artificial Intelligence
PPTX
Final slide (bsc csit) chapter 3
PPTX
AI-04 Production System - Search Problem.pptx
PPT
22sch AI Module 2.ppt 22sch AI Module 2.ppt
PPT
22sch AI Module 2.ppt 22sch AI Module 2.ppt
PPTX
CptS 440 / 540 Artificial Intelligence
PPT FOPL first order predicate logic.pptx
2.Problems Problem Spaces and Search.ppt
Ch 2 State Space Search - slides part 1.pdf
Chapter 02-artificialPROBLEM SOLVING.ppt
Problem space
Problem space
Problem space
Amit ppt
Problems Spaces and Search
problem space and problem definition in ai
Searching in Artificial Intelligence for UG
problemsolving with AI.pptx
chapter 2 Problem Solving.pdf
Presentation_8948_Content_Document_20250725121751PM (1).pptx
study material for Artificial Intelligence
Final slide (bsc csit) chapter 3
AI-04 Production System - Search Problem.pptx
22sch AI Module 2.ppt 22sch AI Module 2.ppt
22sch AI Module 2.ppt 22sch AI Module 2.ppt
CptS 440 / 540 Artificial Intelligence

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPT
Teaching material agriculture food technology
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Cloud computing and distributed systems.
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Machine Learning_overview_presentation.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Spectroscopy.pptx food analysis technology
PDF
Approach and Philosophy of On baking technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
MYSQL Presentation for SQL database connectivity
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Big Data Technologies - Introduction.pptx
Assigned Numbers - 2025 - Bluetooth® Document
Teaching material agriculture food technology
sap open course for s4hana steps from ECC to s4
Programs and apps: productivity, graphics, security and other tools
Per capita expenditure prediction using model stacking based on satellite ima...
Cloud computing and distributed systems.
Digital-Transformation-Roadmap-for-Companies.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
The AUB Centre for AI in Media Proposal.docx
Machine Learning_overview_presentation.pptx
cuic standard and advanced reporting.pdf
Encapsulation_ Review paper, used for researhc scholars
Spectroscopy.pptx food analysis technology
Approach and Philosophy of On baking technology
Machine learning based COVID-19 study performance prediction
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Diabetes mellitus diagnosis method based random forest with bat algorithm
MYSQL Presentation for SQL database connectivity
“AI and Expert System Decision Support & Business Intelligence Systems”
Big Data Technologies - Introduction.pptx

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