Production system (computer science)

[citation needed] Those rules, termed productions, are a basic knowledge representation found useful in automated planning and scheduling, expert systems, and action selection.

A production system also contains a database, sometimes called working memory, which maintains data about the current state or knowledge, and a rule interpreter.

The condition portion of each rule (left-hand side or LHS) is tested against the current state of the working memory.

In idealized or data-oriented production systems, there is an assumption that any triggered conditions should be executed: the consequent actions (right-hand side or RHS) will update the agent's knowledge, removing or adding data to the working memory.

The system stops processing either when the user interrupts the forward chaining loop; when a given number of cycles have been performed; when a "halt" RHS is executed, or when no rules have LHSs that are true.

The latter is illustrated by the Rete algorithm, designed by Charles L. Forgy in[1]1974, which is used in a series of production systems, called OPS and originally developed at Carnegie Mellon University culminating in OPS5 in the early 1980s.

Whichever conflict resolution strategy is implemented, the method is indeed crucial to the efficiency and correctness of the production system.

Production rules in OPS5 apply to all instances of data structures that match conditions and conform to variable bindings.

In the example, once a monkey holds the suspended object, the status of the goal is set to "satisfied" and the same production rule can no longer apply as its first condition fails.