Appendix F Formal Models for Artificial Intelligence Methods: Theoretical Foundations of Rule-Based Systems

Appendix F Formal Models for Artificial Intelligence Methods: Theoretical Foundations of Rule-Based Systems

Definitions that allow one to describe a rule-based system in a formal way [ 52 ] are introduced in the first section. An issue of reasoning in logic is presented in the second section. There are many approaches to this issue in modern logic, e.g., introduced by Kazimierz Ajdukiewicz, Jan Łukasiewicz, Charles Sanders Peirce, Willard Van Orman Quine. In this monograph we present a taxonomy of reasoning according to

Józef Maria Boche´nski 15 [ 30 ].

F.1 Definition of Generic Rule-Based Systems

There are several definitions of generic rule-based systems in the literature. However, most of them relate to rule-based systems of the specific form. In our opinion, one of the most successful trials of constructing such a formal model is the one developed by a team of Claude Kirchner (INRIA). We present a formalization of a rule-based

system according to this approach [ 52 ].

n ) , a set of terms T ( X) ,

a substitution σ, and semantics of FOL, as in Appendix C . Additionally, let F ( X) denote a set of formulas, V ar(t) a set of variables occurring in a term (a set of terms) t , FV (φ) a set of free variables occurring in a formula φ, Dom(σ) the domain of a substitution σ, R a set of labels. A theory is a set of formulas T that is closed under

a logical consequence, i.e., for each formula ϕ the following holds: if T |= ϕ, then ϕ∈T.

15 Józef Maria Boche´nski, OP, a professor and the rector of the Université de Fribourg, a professor of Pontificia Studiorum Universitas a Sancto Thoma Aquinate (Angelicum) in Rome, a logician

and philosopher, Dominican. He was known as an indefatigable man having a good sense of humor, e.g., he gained a pilot’s licence while in his late sixties.

© Springer International Publishing Switzerland 2016 279 M. Flasi´nski, Introduction to Artificial Intelligence, DOI 10.1007/978-3-319-40022-8

280 Appendix F: Formal Models for Artificial Intelligence Methods … Definition F.1

A term t is called a ground term, if V ar(t) = ∅.

Definition F.2 The Herbrand universe for any F ( X) is a set H that is defined inductively in the following way.

C occurs in a formula belonging to F ( X) , then a ∈ H. (If there is no constant in formulas of F ( X) , then we add any constant to H.)

n , if t 1 ,..., t n are terms belonging to H, then

f (t 1 ,..., t n ) ∈ H. Thus, the Herbrand universe for a given set of formulas F ( X) is a set of all

the ground terms that have been defined with the help of function symbols out of constants occurring in formulas of F ( X) .

Definition F.3

A fact is a ground term. Definition F.4

A working memory WM is a set of facts. In other words, a working memory WM is a subset of the Herbrand universe H.

Definition F.5

A (positive) pattern is a term p ∈ T ( X) , and a negative pattern is a term of the form ¬p. A set of positive and negative patterns is denoted as P = P + ∪P − and it is called the set of patterns.

Definition F.6 Let S be a set of facts. A pattern of updating PU of a set of facts S is

a pair PU = (rem, add), where rem = {r : r ∈ T ( X) } is a set containing patterns of the terms that should be removed from the set of facts, add = {a : a ∈ T ( X) } is

a set containing patterns of the terms that should be added to the set of facts. Definition F.7

A rule is a triple

( R, COND, ACT ), where

R ∈ R is the rule label, COND is of the form (P, φ), where P is the set of patterns, φ is a formula such that FV (φ) ⊆ V ar(P), ACT = (rem, add) is a pattern of updating a working memory WM such that:

V ar(rem) ⊆ V ar(P + ) and V ar(add) ⊆ V ar(P + ) . COND is called a condition (antecedent) of the rule, and ACT an action (consequent)

of the rule . A rule can be written also in the form:

R : IF COND THEN ACT.

Definition F.8 Let S be a set of facts, P = P + ∪P −

be a set of patterns. P + matches S according to a theory T and a substitution σ, denoted P +

≪ σ T S iff the following condition is fulfilled.

∀p ∈ P + ∃t ∈ Sσ(p) = T t.

Appendix F: Formal Models for Artificial Intelligence Methods … 281 P − mismatches S according to a theory T , denoted P −

T S iff the following condition is fulfilled.

∀¬p ∈ P −

T t.

Definition F.9 ′ Let σ be a substitution, WM be a working memory, WM ⊆ WM.

A rule (R, COND, ACT ), where COND = (P, φ), ACT = (rem, add), (σ, WM ′ ) - matches the working memory WM iff the following conditions are fulfilled. •P +

≪ σ T WM ′ , •P −

T WM , • T |= σ(φ), where WM ′ is the minimal subset of WM.

Definition F.10

Let a rule (R, COND, ACT ), COND = (P, φ), ACT = (rem, add), ( σ, WM ) -matches the working memory WM. An application of this rule is a

modification of the working memory WM defined in the following way.

WM = (WM\σ(rem)) ∪ σ(add).

An application of a rule is denoted by WM ⇒ WM. A sequence of rule applications

is denoted by WM 0 ⇒ WM 1 ⇒ · · · ⇒ WM n .

Definition F.11 ′ Let WM be a working memory, R be a set of rules, WM ⊆ WM.

A set CS ={(R, WM ′ ) : ∃(R, COND, ACT) ∈ R such that (σ, WM ′ ) -matches WM}

is called a set of conflicting rules of R for the working memory WM. Definition F.12

A conflict resolution method CRM is an algorithm, which, for a set of rules R and a sequence of rule applications,

WM 0 ⇒ WM 1 ⇒ · · · ⇒ WM n , computes a unique element of a set of conflicting rules of R for the working memory

WM n . Definition F.13

A generic rule-based system GRBS is a quadruple: GRBS = (WM, R, CRM, T ), where

WM is a working memory, R is a set of rules, called a rule base, CRM is a conflict resolution method, T is a pattern matching theory.

282 Appendix F: Formal Models for Artificial Intelligence Methods … One can easily notice that the model presented above [ 52 ] is very formal. In

practice, rule-based systems are constructed according to such a formalized model very rarely. Firstly, conflict resolution methods usually concern a single application of

a rule. Secondly, facts belonging to a working memory WM and patterns belonging to a set P are of the form f (t 1 ,... t n ) , where t i , i = 1, . . . , n are symbols of variables or constants (for facts, only constants), f is a function symbol. Moreover, a set of patterns P is usually not defined explicitly in a rule antecedent COND = (P, φ). Instead, patterns occur in a formula φ and a module of rules’ matching extracts them

from φ. A formula φ is a conjunction of literals. 16 A matching process is usually of the form of syntactic pattern matching, which means that a theory T is empty. Frequently, an application of a rule action ACT is defined as a replacement of a

constant c k by a constant c k in a ground term f m ( c 1 ,..., c k ,..., c n ) , which results in obtaining a ground term f m ( c 1 ,..., c k ,..., c n ) . 17 Thus, we can simply define an action ACT as an assignment f k m := c k . Of course, an action can be a sequence of such assignments.

Taking into account such simplifications, 18 a rule-based system can be defined as

a triple:

RBS = (WM, R, CRM),

where WM, R, CRM are of the simplified form discussed above. Our considerations above concerned rules of a declarative type. Such rules only modify the working memory. If we construct a control (steering) rule-based sys- tem, we define also reactive rules that influence the system external environment. 19 Modeling such a system with the formalism presented above, we can assume that an execution of a reactive rule consists in changing a “control (steering) term” in the working memory. Then, a specialized module of the system interprets such a term and calls a proper procedure contained in a library of control procedures.

F.2 Logical Reasoning—Selected Notions

An inference is a reasoning that consists in acknowledging a statement to be true assuming some statements are true. In logic, an inference is made with the help of rules of inference .

16 Notions concerning FOL are introduced in Appendix C .

17 According to the formalism presented, we could simulate such an operation as removing the first ground term from the working memory and adding the second one.

18 Of course, some rule-based systems cannot be simplified in such a way. For example, an expert system mentioned in Chap. 9 and developed by the author operates on graphs. Thus, in this case

assuming the “shallow” (one-level) form of terms is impossible. 19 An action of a reactive rule can be of the form of a command, e.g. open_valve(V34).

Appendix F: Formal Models for Artificial Intelligence Methods … 283

A rule of inference is usually defined in the following form:

A 2 ... ,

where A 1 , A 2 ,..., A n are statements assumed to be true, whereas B is a statement we acknowledge to be true, or in the form:

A 1 , A 2 ,..., A n .

A notation introduced above can be interpreted as follows: “If we assume that statements represented with expressions A 1 , A 2 ,..., A n are true, then we are allowed to acknowledge a statement represented with an expression B is true ”. The three following basic types of reasoning can be distinguished in logic. Deduction is based on the modus ponendo ponens rule, which is of the form:

if A, then B

Thus, deduction is a type of reasoning, in which on the basis of a certain general rule and a premise we infer a conclusion. Abduction is based on the rule of the form:

if A, then B

In abductive reasoning we use a certain rule and a conclusion (usually a certain (em- pirical) observation) to derive a premise (usually interpreted as the best explanation of this conclusion).

From the point of view of logic only deduction is reliable reasoning. (Incomplete) induction 20 (in a sense, induction by incomplete enumeration) can be treated as a special case of abduction. It consists in inferring a certain generalization about a class of objects on the basis of premises concerning some objects belonging

to this class. In the simplest case induction can be defined in the following way [ 2 ]:

20 In this appendix we do not introduce all types of induction (e.g. induction by complete enu- meration, eliminative induction), but only such a type that relates to methods described in this

book.

284 Appendix F: Formal Models for Artificial Intelligence Methods …

(a) A if A , then B

(b)

if A , then B

if A , then B

PROGRESSIVE DEDUCTION

(c)

if A , then B

if A , then B

RE GRESSIVE DEDUCTION

B (?)

B B (T)

Fig. F.1 Two kinds of deduction: a the inference rule for deduction, b a progressive deduction, c a regressive deduction

S 1 is P S 2 is P

S n is P every S is P

Dokumen yang terkait

Hubungan pH dan Viskositas Saliva terhadap Indeks DMF-T pada Siswa-siswi Sekolah Dasar Baletbaru I dan Baletbaru II Sukowono Jember (Relationship between Salivary pH and Viscosity to DMF-T Index of Pupils in Baletbaru I and Baletbaru II Elementary School)

0 46 5

Institutional Change and its Effect to Performance of Water Usage Assocition in Irrigation Water Managements

0 21 7

The Effectiveness of Computer-Assisted Language Learning in Teaching Past Tense to the Tenth Grade Students of SMAN 5 Tangerang Selatan

4 116 138

the Effectiveness of songs to increase students' vocabuloary at second grade students' of SMP Al Huda JAkarta

3 29 100

The effectiveness of classroom debate to improve students' speaking skilll (a quasi-experimental study at the elevent year student of SMAN 3 south Tangerang)

1 33 122

Kerjasama ASEAN-China melalui ASEAN-China cooperative response to dangerous drugs (ACCORD) dalam menanggulangi perdagangan di Segitiga Emas

2 36 164

The Effect of 95% Ethanol Extract of Javanese Long Pepper (Piper retrofractum Vahl.) to Total Cholesterol and Triglyceride Levels in Male Sprague Dawley Rats (Rattus novergicus) Administrated by High Fat Diet

2 21 50

Factors Related to Somatosensory Amplification of Patients with Epigas- tric Pain

0 0 15

The Concept and Value of the Teaching of Karma Yoga According to the Bhagavadgita Book

0 0 9

Pemanfaatan Permainan Tradisional sebagai Media Pembelajaran Anak Usia Dini untuk Mengembangkan Aspek Moral dan Bahasa Anak Utilization of Traditional Games as Media Learning Early Childhood to Develop Aspects of Moral and Language Children Irfan Haris

0 0 11