# Production System in Artificial Intelligence

### What is a Production System? List and explain production system categories – Artificial Intelligence

Since the search process is the core of many artificial intelligence (AI) processes, it is useful to structure Al programs in a way that facilitates describing and performing the search process.

Production systems in artificial intelligence provide such structures so that the search process’s performance can be measured.

A production system consists of:

1. A set of rules, “each consisting of a left side (a pattern) that determines the applicability of the rule and a right side that describes the operation to be performed if the rule is applied.”

For example:

In the Water Jug Problem, Rule (x, y) is x<4 ->(4, Y) indicates Fill the 4-gallon jug and (x, y) if y<3 -> (x, 3) indicates Fill the 3-gallon jug.

2. One or more knowledge/databases “that contain whatever information is appropriate for the particular task. Some plans of the database may be permanent, while other plans of it may pertain only to the solution of the current problem.”

3. A control strategy “that specifies the order in which the rules will be compared to the database and a way of resolving the conflicts that arise when several rules match at once.”

3. A rule applier.

### Classes / Categories of Production systems

The production system is mainly categorized into 4 types,

1. Monotonic Production System: “The application of a rule never prevents the later application of another rule that could also have been applied at the time the first rule was selected”.

2. Non-Monotonic Production system: “is one in which this is not true”.

3. Partially commutative Production system: “It is the property that if the application of a particular sequence of rules transforms state x to state y, then permutation of those rules allowable, also transforms state x into state y.”

4. Commutative Production system: “is both monotonic and Partially commutative”.

### Partially Commutative and Monotonic:

These production systems are useful for solving ignorable problems.

Example: Theorem Proving

They can be implemented without the ability to backtrack to previous states when it is discovered that an incorrect path has been followed.

This often results in a considerable increase in efficiency, particularly because since the database will never have to be restored, It is not necessary to keep track of where in the search process every change was made.

They are good for problems where things do not change; new things get created.

### Partially Commutative and Non-Monotonic

These production systems are useful for solving problems in which changes occur but can be reversed and in which order of operations is not critical.

Example: Robot Navigation, 8-puzzle, blocks world

Suppose the robot has the following ops: go North (N), go East (E), go South (S), go West (W).

To reach its goal, it does not matter whether the robot executes the N-N-E or N-E-N.

### Not Partially Commutative

These production systems are useful for solving problems in which irreversible change occurs

Example: Chemical Synthesis

The operations can be: Add chemical x to the pot, Change the temperature to t degrees.

These operations may cause irreversible changes to the potion being brewed.

The order in which the operations are performed can be very important in determining the final output.

For example (X+y)+z is not the same as (z+y)+x