Rule-based system

In computer science, a rule-based system is used to store and manipulate knowledge to interpret information in a useful way. It is often used in artificial intelligence applications and research.

Normally, the term rule-based system is applied to systems involving human-crafted or curated rule sets. Rule-based systems constructed using automatic rule inference, such as rule-based machine learning, are normally excluded from this system type.

Applications

A classic example of a rule-based system is the domain-specific expert system that uses rules to make deductions or choices. For example, an expert system might help a doctor choose the correct diagnosis based on a cluster of symptoms, or select tactical moves to play a game.

Rule-based systems can be used to perform lexical analysis to compile or interpret computer programs, or in natural language processing.

Rule-based programming attempts to derive execution instructions from a starting set of data and rules. This is a more indirect method than that employed by an imperative programming language, which lists execution steps sequentially.

Construction

A typical rule-based system has four basic components:[1]

  • Match: In this first phase, the left-hand sides of all productions are matched against the contents of working memory. As a result a conflict set is obtained, which consists of instantiations of all satisfied productions. An instantiation of a production is an ordered list of working memory elements that satisfies the left-hand side of the production.
  • Conflict-Resolution: In this second phase, one of the production instantiations in the conflict set is chosen for execution. If no productions are satisfied, the interpreter halts.
  • Act: In this third phase, the actions of the production selected in the conflict-resolution phase are executed. These actions may change the contents of working memory. At the end of this phase, execution returns to the first phase.
  • Temporary working memory.
  • A user interface or other connection to the outside world through which input and output signals are received and sent.
gollark: Neither "pastebin" nor "virus" are APIs and these checks are easy to evadr.
gollark: Your scanfile thing will, at least, detect DemoVirus.
gollark: That reminds me, I really ought to see what CraftOS-PC raw mode looks like now.
gollark: Or I could make some sort of horrible very limited CraftOS-PC reimplementation based on the actual Lua library, magically copy whatever OC does, and just make all the `term` calls print TRoR output instead.
gollark: no.

See also

References

  1. "What is a rule-based system?". j-paine.org.
  2. Cabitza, F., & Dal Seno, B. (2005). "DJess-A Knowledge-Sharing Middleware to Deploy Distributed Inference Systems". International Journal of Computer and Information Engineering. 2: 66–69. doi:10.1109/PERSER.2005.1506416.CS1 maint: multiple names: authors list (link)
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.