3-Problem, Production System
3-Problem, Production System
3-Problem, Production System
1 05/02/24
Problem formulation
There are 4 steps
Define the problem precisely.
The definition must comprise of precise specification of the
initial situations as well the final situation with acceptable
solution to the problem
Analyze the problem
Isolate and represent the task knowledge which
is required to solve the problem
Choose the best problem solving technique and
apply it
2 05/02/24
Well-defined problems and
solutions
The initial state that the agent starts in
A description of the possible action
available to the agent.
A description of what each action does?
The goal test, which determines whether a
given state is a goal state
A path cost function that assigns a numeric
cost to each path
3 05/02/24
Defining the problem
Done with state space search
Example
Chess game
Water jug problem
8-Puzzle Problem
8-Queens Problem
4 05/02/24
Chess game
Defining game
Initial state
goal state (many states possible)
Legal moves
Practical difficulty
It is estimated there are between 10111 and 10123 positions
No person could ever supply a complete set of such rules
No program could easily handle all those rules
5 05/02/24
Defining Water jug problem
A water jug problem: 4-gallon and 3-gallon
4 3
no marker on the bottle
pump to fill the water into the jug
How can you get exactly 2 gallons of water
into the 4-gallons jug?
6 05/02/24
Production System
Production system or production rule system is a
computer program typically used to provide some form
of artificial intelligence,
Which consists primarily of a set of rules about behavior
But, it also includes the mechanism necessary to follow
those rules as the system responds to states of the
world.
7 05/02/24
8 05/02/24
Production System Rules
Production System rules can be classified as:
Deductive Inference Rules
You can represent the knowledge in a production system as
a set of rules along with a control system and database. It
can be written as:
If(Condition) Then (Condition)
The production rules are also known as condition-action,
antecedent-consequent, pattern-action, situation-response,
feedback-result pairs.
9 05/02/24
For example, math is deductive:
If x = 4
And if y = 1
Then 2x + y = 9
10 05/02/24
Abductive Inference Rules
Abductive reasoning typically begins with an incomplete
set of observations and proceeds to the likeliest possible
explanation for the set.
Medical diagnosis is an application of abductive
reasoning: given this set of symptoms, what is the
diagnosis that would best explain most of them?
11 05/02/24
Classes or types of Production System
There are four major classes of Production System in Artificial
Intelligence:
Monotonic Production System: It’s a production system in
which the application of a rule never prevents the later
application of another rule, that could have also been applied
at the time the first rule was selected.
Partially Commutative Production System: It’s a type of
production system in which the application of a sequence of
rules transforms state X into state Y, then any permutation of
those rules that is allowable also transforms state X into state Y.
Theorem proving falls under the monotonic partially
communicative system.
12 05/02/24
Non-Monotonic Production Systems: These are
useful for solving ignorable problems. These systems
are important from an implementation standpoint
because they can be implemented without the ability to
backtrack to previous states when it is discovered that
an incorrect path was followed.
Commutative Systems: These are usually useful for
problems in which changes occur but can be
reversed and in which the order of operation is not
critical. Production systems that are not usually not
partially commutative are useful for many problems in
which irreversible changes occur, such as chemical
analysis.
13 05/02/24
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
Cause motion
Systematic
14 05/02/24
Search strategies
Uninformed search Informed search
Breadth-first search Greedy best-first search
Depth-first search
A* Search: Minimizing
Depth-limited search the total estimated
Iterative deepening solution cost
depth-first search Memory-bounded
Bidirectional search heuristic search
15 05/02/24
A state space search
j1 and j2 are 2 jugs
(x,y) : order pair
x : max. water in j1 is 4-gallons x=4
y : max. water in j2 is 3-gallons y=3
start state : (0,0)
goal state : (2,0)
Rules : 1. Fill the 4 gallon-jug (4,-)
2. Fill the 3 gallon-jug (-,3)
3. Empty the 4 gallon-jug (0,-)
4. Empty the 3 gallon-jug (-,0)
16 05/02/24
Water jug rules
1 ( j1, j2 ) Fill the 4-gallon jug j1 = x
2 ( j1, j2 ) Fill the 3-gallon jug j2 = y
3 ( j1, j2 ) Empty the 4-gallon jug on the ground j1 = 0
4 ( j1, j2 ) Empty the 3-gallon jug on the ground j2 = 0
17 05/02/24
Water jug rules
18 05/02/24
A water jug solution
4-Gallon Jug 3-Gallon Jug Rule Applied
0 0
0 3 2
3 0 8
3 3 2
4 2 6
0 2 3
2 0 8
19 05/02/24
Formal description of a problem
20 05/02/24
Search Tree