A production rule represents a condition-action (premise-consequence) pair.
Any Rule-Based System (RBS) has a few basic and simple elements as follows:
- A set of facts: These facts are actually the assertions and should be anything relevant to the beginning state of the system.
- A set of rules: This contains all actions that should be taken within the scope of a problem specify how to act on the assertion set. A rule relates the facts in the IF part to some action in the THEN part. The system should contain only relevant rules and avoid the irrelevant ones because the number of rules in the system will affect its performance.
- A termination criterion: This is a condition that determines that a solution has been found or that none exists. This is necessary to terminate some rule-based systems that find themselves in infinite loops otherwise.
An agent checks for the condition and if the condition exists then production rule fires and corresponding action is carried out. The condition part of the rule determines which rule may be applied to a problem. The action part carries out the associated problem-solving steps. This complete process is called a recognize-act cycle.
A precondition of the rule is either satisfied or not. If the precondition is satisfied, the rule may be applied (fired). The control system then chooses which applicable rule should be applied and ceases computation when a termination condition on the database is satisfied. If multiple rules are to fire at the same time, the control system resolves the conflicts.
The application of the rule changes the global database – its content corresponds to the description of current state
A set of rules represents a rule base (knowledge base), a global database (stored in working memory) is a facts base and a control system is usually called an inference engine
The rules are processed through a backward or forward chaining process, or a combination of the two.
The basic features of a rule-based system according to [hayes]
Rule-based representations allow the inclusion of uncertainty management through the use of confidence factors.
Due to their ease of use (simplicity of representation, modularity, modifiability) rule-based representations remain the most popular representation scheme for expert systems.
Advantages and disadvantages of RBS are given in the table below:
Advantages | Disadvantages |
Provides excellent tools for structuring AI programsHighly modular because individual rules can be added, removed or modified independentlyExpressed in a natural form (natural language).Separation of knowledge and Control – Recognises Act CycleA natural mapping onto state space research – data or goal-drivenHigh modularity of production rules (easy to add, modify or remove an individual rule)Uses pattern directed control which is more flexible than algorithmic controlProvides opportunities for heuristic control of searchTracing and Explanation – Simple Control, Informative rulesLanguage IndependenceA plausible model of human problem solving -SOAR, ACTA good way to model the state-driven nature of intelligent machinesQuite helpful in real time in environment and applications. | It’s very difficult to analyse the flow of control within a PS Describes the operations that can be performed in a search for a solution to the problem..No learning capabilities, as it does not store the result of the problem for the future usesInefficiency since during the execution of the program, many rules may be active The rules in the production system should not have any type of conflict resolution as when a new rule is added to the database it should ensure that it does not have any conflict with any existing rules. |
An example: a simplified RBS – taking a lift in order to go to a desired floor [ligeza]
Literature
- [hayes] Hayes-Roth, F., Rule-based systems. Communications of the ACM, Special section, vol. 28, No. 9, Sept 1985
- [ligeza] Ligęsa, A., Logical foundations for rule-based systems. Studies in Computational Intelligence (2nd ed.), vol. 11, Springer, 2006