JPH0652503B2 - Inference processor - Google Patents

Inference processor

Info

Publication number
JPH0652503B2
JPH0652503B2 JP63261434A JP26143488A JPH0652503B2 JP H0652503 B2 JPH0652503 B2 JP H0652503B2 JP 63261434 A JP63261434 A JP 63261434A JP 26143488 A JP26143488 A JP 26143488A JP H0652503 B2 JPH0652503 B2 JP H0652503B2
Authority
JP
Japan
Prior art keywords
strongly connected
rule
production
meta
inference
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP63261434A
Other languages
Japanese (ja)
Other versions
JPH02109131A (en
Inventor
顕司 小野
Original Assignee
工業技術院長
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 工業技術院長 filed Critical 工業技術院長
Priority to JP63261434A priority Critical patent/JPH0652503B2/en
Publication of JPH02109131A publication Critical patent/JPH02109131A/en
Publication of JPH0652503B2 publication Critical patent/JPH0652503B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、プロダクションルールの実行によって推論処
理を進めていく推論処理装置に係わり、特に推論処理の
過程で適用可能なルールを予め明らかにしておくことに
より推論処理の高速化を図る推論処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION Object of the Invention (Industrial field of application) The present invention relates to an inference processing apparatus that advances inference processing by executing production rules, and in particular rules applicable in the process of inference processing. The present invention relates to an inference processing device that speeds up inference processing by clarifying in advance.

(従来の技術) プロダクションルールを用いて推論処理を実行するシス
テムでは、推論処理に際して与えられる現在の状態に関
する情報及び推論途中で導かれる結論にマッチングする
条件を持つプロダクションルールを、多数のプロダクシ
ョンルールから順次抽出し、これらルールを適用しなが
ら最終的な結論を導く処理が行われる。このような処理
では、推論の過程において、次に適用可能なルールを高
速に抽出できることが、推論処理の高速化を図るうえで
有効である。
(Prior Art) In a system that executes inference processing by using production rules, a production rule having a condition that matches information about the current state given during the inference processing and a conclusion drawn during the inference process is generated from a large number of production rules. A process of deriving a final conclusion is performed while sequentially extracting and applying these rules. In such processing, it is effective to speed up the inference processing so that the next applicable rule can be extracted at high speed in the inference process.

従来、プロダクションルールを速やかに抽出できる方式
として、プロダクションルールの各条件部と実行部とを
調べ、どの実行部の実行によって得られる結論が次のど
の条件を成立させるか、つまりどのルールの適用が次に
どのルールの適用を可能にするかという関係をテーブル
若しくはネットワークのかたちで予め準備しておき、推
論時には、これらの関係を参照して次に適用可能なルー
ルを順次選択していくことにより、推論処理の高速化を
図るようにした方式が提案されている(特開昭60−7203
号及び特開昭62−19940 号)。
Conventionally, as a method for quickly extracting a production rule, each condition part and execution part of the production rule are examined, and which of the following conditions is satisfied by the conclusion obtained by the execution of which execution part, that is, which rule is applied? Next, prepare in advance the relationship as to which rule can be applied in the form of a table or network, and at the time of inference, refer to these relationships and select the next applicable rule sequentially. , A method for speeding up inference processing has been proposed (JP-A-60-7203).
And JP-A-62-19940).

しかしながら、これらの方式では、単に個々のルール間
の適用可能関係のみを記述したものであるため、次に適
用可能なルールを選択する処理しか高速化することはで
きない。従って、例えばある状態から他の状態へ導くこ
とが可能であるか、或はある結論を導くまでにはどのル
ールを適用したら良いかといった、大局的な推論の方向
付けを示唆することができず、無駄なルールを実行する
ことによって推論処理のより一層の高速化を図ることが
困難であった。
However, in these methods, since only applicable relationships between individual rules are described, only the process of selecting the next applicable rule can be speeded up. Therefore, it is not possible to suggest the direction of global reasoning, for example, whether it is possible to lead from one state to another state, or which rule should be applied before reaching a certain conclusion. However, it was difficult to further speed up the inference process by executing useless rules.

(発明が解決しようとする課題) このように、従来の推論処理装置では、推論の大局的な
方向付けがなされなかったため、無駄なプロダクション
ルールの実行が推論処理のより一層の高速化を妨げると
いう問題があった。
(Problems to be Solved by the Invention) As described above, in the conventional inference processing apparatus, the global direction of inference was not performed, so that wasteful execution of production rules hinders further speeding up of inference processing. There was a problem.

本発明は、かかる問題点に鑑みなされたもので、推論処
理の大局的な方向付けを与えて効率良くプロダクション
ルールを実行することができ、これにより推論処理の高
速化を図ることができる推論処理装置を提供することを
目的とする。
The present invention has been made in view of the above problems, and can give a global orientation of inference processing to efficiently execute a production rule, thereby increasing the speed of inference processing. The purpose is to provide a device.

[発明の構成] (課題を解決するための手段) 本発明に係る推論処理装置は、次に適用可能なプロダク
ションルールを順次抽出して推論処理を進めていく推論
処理装置において、条件部と実行部の対からなる複数の
プロダクションルールを記憶するルール記憶部と、この
ルール記憶部に格納されたプロダクションルール中で扱
われている各変数のとり得る全ての組合わせに対しノー
ドを設定する設定手段と、この設定手段で設定されたノ
ード間の遷移条件を満たすプロダクションルールによっ
て当該ノード間を結合して有向グラフ行列を求める結合
手段と、この結合手段で求められた有向グラフ行列を強
連結成分に分解する分解手段と、この分解手段で得られ
た各強連結成分の変数の値から当該強連結成分に対応す
る条件を求める条件演算手段と、各強連結成分間の遷移
条件を満たすプロダクションルールを用いて有向グラフ
行列を求め、どのプロダクションルールの次にどのプロ
ダクションルールが適用できるかを示すメタ知識として
登録する登録手段とを備える強連結成分分解部と、この
強連結成分分解部で求められた各強連結成分を、その強
連結グラフ中の任意のノードを通る任意の閉路の長さの
最大公約数を周期として、かつ前記プロダクションルー
ルを適宜分割することにより当該周期を増やした上で、
複数の類に分割し、これらの類の変数条件及び各期間の
遷移条件を満たすプロダクションルールをメタ知識とし
て求める類別部と、前記強連結成分分解部及び前記類別
部で求められたメタ知識を記憶するメタ知識記憶部と、
このメタ知識記憶部に記憶されたメタ知識の次に適用可
能なプロダクションルールを示す情報に基づいて現在の
状態と目的とする状態との隔りを認識して、さらにこの
目的とする状態に接近するためのプロダクションルール
の適用を計る大局的な推論の方向付けを行ない、これに
基づいて前記ルール記憶部に記憶された次に適用可能な
プロダクションルールを抽出し、推論処理を実行する推
論部とを具備したことを特徴とする。
[Structure of the Invention] (Means for Solving the Problem) An inference processing device according to the present invention is configured to execute a condition part and an execution in an inference processing device that sequentially extracts applicable production rules and advances inference processing. A rule storage unit that stores a plurality of production rules composed of pairs of sets, and a setting unit that sets nodes for all possible combinations of variables handled in the production rules stored in the rule storage unit And a connecting means for connecting the nodes by a production rule satisfying the transition condition between the nodes set by the setting means to obtain a directed graph matrix, and a directed graph matrix obtained by the connecting means is decomposed into strongly connected components. Decomposition means and conditional operation for obtaining a condition corresponding to the strongly connected component from the value of the variable of each strongly connected component obtained by this decomposition means Strongly connected with a step and a registration means for obtaining a directed graph matrix using a production rule satisfying the transition condition between strongly connected components and registering it as meta-knowledge indicating which production rule can be applied next to which production rule. The component decomposition part, and each strongly connected component obtained by the strongly connected component decomposition part, with the period of the greatest common divisor of the length of any closed circuit passing through any node in the strongly connected graph, and the production rule After increasing the period by dividing appropriately,
A classification part that divides into a plurality of classes and obtains a production rule that satisfies the variable conditions of these classes and transition conditions of each period as meta-knowledge, and the meta-knowledge obtained by the strongly connected component decomposition part and the classification part is stored. A meta-knowledge storage section
By recognizing the separation between the current state and the target state based on the information indicating the production rule applicable next to the meta knowledge stored in the meta knowledge storage unit, the target state is further approached. Direction of global inference to measure the application of the production rule for, to extract the next applicable production rule stored in the rule storage unit based on this, and an inference unit that executes inference processing. Is provided.

(作用) 本発明によれば、強連結成分分解部において各強連結成
分間の遷移条件を満たすプロダクションルールがメタ知
識として求められ、更に類別部において上記各強連結成
分を更に分解して得られた類間の遷移条件を満たすプロ
ダクションルールがメタ知識として求められる。そし
て、これらメタ知識によって推論の大局的な方向付けを
行ない、このメタ知識に基づいて最終結論を導くまでの
プロダクションルールの適用順序を決定し、該順序に基
づいて前記ルール記憶部に記憶されたプロダクションル
ールを抽出し、推論処理を実行することが可能であるた
め、無駄なプロダクションルールの実行を防止して推論
処理のより一層の高速化を図ることができる。
(Operation) According to the present invention, a production rule that satisfies the transition condition between strongly connected components is obtained as meta-knowledge in the strongly connected component decomposition unit, and further obtained by further decomposing each strongly connected component in the classification unit. Production rules that satisfy the transition conditions between classes are required as meta-knowledge. Then, the meta-knowledge is used to determine the general direction of the inference, the order of application of the production rules until the final conclusion is reached is determined based on the meta-knowledge, and the order is stored in the rule storage unit based on the order. Since it is possible to extract the production rules and execute the inference processing, it is possible to prevent unnecessary execution of the production rules and further speed up the inference processing.

なお、類別部が前記プロダクションルールを適宜分割し
て各強連結成分の周期を増やしたうえで各強連結成分を
分類するものであると、強連結成分を分類できないよう
なケースでも分類が可能になり、大局的な推論の方向付
けを行なううえで極めて有効なメタ知識が得られること
になる。
If the classification unit appropriately divides the production rule to increase the period of each strongly connected component and then classifies each strongly connected component, classification is possible even in the case where the strongly connected component cannot be classified. Thus, extremely effective meta-knowledge can be obtained in directing the global reasoning.

(実施例) 以下、図面を参照しながら本発明の一実施例について説
明する。
Embodiment An embodiment of the present invention will be described below with reference to the drawings.

第1図は本実施例に係る推論処理装置の構成を示すブロ
ック図である。即ち、この推論処理装置は、ルール記憶
部11、強連結成分分解部12、類別部13、メタ知識
記憶部14、推論部15及び状態記憶部16にて構成さ
れている。
FIG. 1 is a block diagram showing the arrangement of an inference processing apparatus according to this embodiment. That is, this inference processing apparatus is composed of a rule storage unit 11, a strongly connected component decomposition unit 12, a classification unit 13, a meta-knowledge storage unit 14, an inference unit 15, and a state storage unit 16.

ルール記憶部11は、条件部と実行部の対からなる複数
のプロダクションルールを記憶する。
The rule storage unit 11 stores a plurality of production rules including a pair of a condition unit and an execution unit.

強連結成分分解部12は、ルール記憶部11に記憶され
たプロダクションルールを、推論部15での推論処理に
先立って抽出してメタ知識を生成する。ここでは、ルー
ル記憶部11に格納されたプロダクションルール中で扱
われている各変数のとり得る全ての状態間の遷移条件を
満たすプロダクションルールを、有向グラフ行列として
求め、更に上記有向グラフ行列を強連結成分分解して各
強連結成分の変数条件及び各強連結成分間の遷移条件を
満たすプロダクションルールをメタ知識として得るよう
にしている。
The strongly connected component decomposition unit 12 extracts the production rule stored in the rule storage unit 11 before the inference processing by the inference unit 15 to generate meta-knowledge. Here, a production rule satisfying the transition conditions between all possible states of each variable handled in the production rule stored in the rule storage unit 11 is obtained as a directed graph matrix, and the directed graph matrix is further connected to the strongly connected component. The production rules that are decomposed and satisfy the variable condition of each strongly connected component and the transition condition between each strongly connected component are obtained as meta-knowledge.

類別部13は、強連結成分分解部12で求められた各強
連結成分に対してその周期を計算し、その値に基づいて
強連結成分を複数の類に分割する。その後、これらの類
の変数条件及び各類間の遷移条件を満たすプロダクショ
ンルールをメタ知識として求める。
The classification unit 13 calculates the period of each strongly connected component obtained by the strongly connected component decomposition unit 12, and divides the strongly connected component into a plurality of classes based on the value. Then, the production rules satisfying the variable conditions of these classes and the transition conditions between the classes are obtained as meta-knowledge.

メタ知識記憶部14は、強連結成分分解部12及び類別
部13で求められた上記メタ知識を格納する。
The meta-knowledge storage unit 14 stores the meta-knowledge obtained by the strongly connected component decomposition unit 12 and the classification unit 13.

推論部15は、ルール記憶部11に記憶されたプロダク
ションルールを順次読み出して推論処理を実行していく
もので、与えられたある状態から目標とする他の状態に
至る推論過程を、メタ知識記憶部14に格納されたメタ
知識に基づいて大局的に判断し、効率良くプロダクショ
ンルールを実行していく。
The inference unit 15 sequentially reads out the production rules stored in the rule storage unit 11 and executes inference processing. The inference unit 15 stores the inference process from a given state to another target state as a meta-knowledge memory. A global decision is made based on the meta-knowledge stored in the section 14, and the production rules are executed efficiently.

状態記憶部16は、初期状態や推論部15における推論
処理の途中状態を格納する。
The state storage unit 16 stores the initial state and the intermediate state of the inference processing in the inference unit 15.

次に以上のように構成された推論処理装置の動作につい
て説明する。
Next, the operation of the inference processing device configured as described above will be described.

いま、ルール記憶部11には、第2図に示すような6つ
のプロダクションルールが格納されているとする。ここ
でx,yは変数、a,b,cはそれぞれ状態を示してい
る。
It is now assumed that the rule storage unit 11 stores six production rules as shown in FIG. Here, x and y are variables, and a, b and c are states.

まず、推論処理に先立って、強連結成分分解部12は第
3図に示すようなアルゴリズムに従ってプロダクション
ルールからメタ知識を生成する。
First, prior to the inference process, the strongly connected component decomposition unit 12 generates meta-knowledge from the production rule according to the algorithm shown in FIG.

ステップS1 まずルール記憶部11に格納された全てのプロダクショ
ンルールの条件部と実行部とを調べ、ルール中に扱われ
ている各変数のとり得る値を全て取出し、それらの全て
の組合わせに対し、ノード番号を1′から順に付与して
いく。ここで最大の番号をnとする。例えば、第2図の
ルールについては、変数x,yについてとり得る状態が
a,b,cの3通りであるから、変数x,yのとり得る
状態の全ての組合わせは、第4図に示す通り9通りであ
る。従って、この9通りの組合わせに1′から9′まで
ノード番号を付与する。
Step S1 First, the condition parts and execution parts of all the production rules stored in the rule storage part 11 are examined, all possible values of each variable handled in the rule are extracted, and all combinations thereof are extracted. , Node numbers are sequentially assigned from 1 '. Here, the maximum number is n. For example, in the rule of FIG. 2, there are three possible states for variables x and y, a, b, and c. Therefore, all combinations of possible states for variables x and y are shown in FIG. There are 9 ways as shown. Therefore, node numbers 1'to 9'are assigned to these nine combinations.

ステップS2 次に求められた各ノードの条件から有向グラフ行列を生
成する。即ち、第4図に示した9つのノード間を、これ
らノード間の遷移条件を満たすルールによって結合する
と、第5図に示すような有向グラフ行列が得られる。こ
の行列は、ノード番号jからノード番号kへと遷移可能
なルール番号iを記述している。
Step S2 Next, a directed graph matrix is generated from the obtained conditions of each node. That is, by connecting the nine nodes shown in FIG. 4 by a rule satisfying the transition condition between these nodes, a directed graph matrix as shown in FIG. 5 is obtained. This matrix describes the rule number i that can transit from the node number j to the node number k.

この行列の求めるため、ステップS2では、サイズがn
×nの行列(テーブル)Aを用意し、ノード番号jの状
態が第i番目のルールの条件部を満たし、そのルールの
実行結果としてノード番号kの状態が得られるとき、行
列Aの(ij)成分にルール番号iを登録し、それ以外
の部分には0を登録するという処理を全てのプロダクシ
ョンルールについて行なう。
In order to obtain this matrix, the size is n in step S2.
When a matrix (table) A of × n is prepared and the state of the node number j satisfies the condition part of the i-th rule and the state of the node number k is obtained as the execution result of the rule, (ij of the matrix A is ) The process of registering the rule number i in the component and registering 0 in the other parts is performed for all production rules.

ステップS3 ここでは有向グラフ行列を強連結成分へ分解する。第4
図の例では、ノード2′〜ノード8′が強連結成分とし
てまとめられ、第6図のようになる。有向グラフ行列に
対する強連結成分分解の手法としては行と列の同時入替
え法が知られている。この手法は、行列の例えば上下の
部分が全て0になるように、行の入替えと列の入替えと
を同時に行ない、行列の対角上に集まった要素を強連結
成分とするものである。
Step S3 Here, the directed graph matrix is decomposed into strongly connected components. Fourth
In the example of the figure, nodes 2'to 8'are grouped as a strongly connected component, as shown in FIG. As a method of strongly connected component decomposition for a directed graph matrix, a simultaneous row and column permutation method is known. In this method, rows are exchanged and columns are exchanged at the same time so that, for example, the upper and lower parts of the matrix are all 0, and the elements gathered on the diagonal of the matrix are strongly connected components.

ステップS4 求められた各強連結成分について、そこに含まれるノー
ド番号に対応する変数の値の条件の論理和をとり、その
強連結成分に対応する条件とする。例えば、第6図に示
す強連結成分はノード2′〜8′を含むので、強連結成
分の条件は、 (x=b)v(x≠y) である。
Step S4 For each strongly connected component thus obtained, the logical sum of the conditions of the values of the variables corresponding to the node numbers included therein is taken to obtain the condition corresponding to that strongly connected component. For example, since the strongly connected component shown in FIG. 6 includes nodes 2'-8 ', the condition of the strongly connected component is (x = b) v (x ≠ y).

ステップS5 次に強連結成分間の遷移条件を満たすプロダクションル
ールを用いて有向グラフ行列を求める。即ち、求められ
た強連結成分の個数をmとしてまずサイズがm×mのテ
ーブルを用意し、ノードaが第c強連結成分に属し、ノ
ードbが第d強連結成分に属するならば、テーブル(c
d)成分のところへ先に求められた強連結成分分解行列
の(ab)成分に登録されているルール番号を登録す
る。この操作をステップS3で求めた強連結成分分解行
列の各行列成分について行なう。このグラフ行列はメタ
知識としてメタ知識記憶部14に格納される。
Step S5 Next, a directed graph matrix is obtained using a production rule that satisfies the transition condition between strongly connected components. That is, a table having a size of m × m is first prepared, where m is the number of strongly connected components obtained, and if the node a belongs to the cth strongly connected component and the node b belongs to the dth strongly connected component, the table (C
The rule number registered in the (ab) component of the strongly connected component decomposition matrix obtained earlier is registered in the d) component. This operation is performed for each matrix component of the strongly connected component decomposition matrix obtained in step S3. This graph matrix is stored in the meta-knowledge storage unit 14 as meta-knowledge.

次に、類別部13は、求められた強連結成分の周期を計
算する。ここで、強連結成分の周期とは、強連結グラフ
中の任意のノードを通る任意の閉路の長さの最大公約数
のことである。この値は、グラフ中のどのノードについ
ても同じ値をとる。この周期が2以上の数であれば、強
連結成分を更に分割することができる。
Next, the classification unit 13 calculates the calculated cycle of the strongly connected component. Here, the period of the strongly connected component is the greatest common divisor of the length of any closed circuit passing through any node in the strongly connected graph. This value is the same for every node in the graph. If this period is a number of 2 or more, the strongly connected component can be further divided.

いま、第6図の強連結成分についてこの周期を計算する
と、ノード3′を通る閉路3′→7′→6′→3′の長
さが“3”、閉路3′→5′→2′→4′→6′→3′
の長さが“5”であるから、周期は“1”である。従っ
て、このままでは強連結成分をこれ以上分解することは
できない。そこで、適当ないくつかのプロダクションル
ールを分割することによってその周期を大きくすること
を試みる。ここでは、例えば第7図に示すように、ルー
ル6をルール6−1とルール6−2とに分割する。
Now, when this cycle is calculated for the strongly connected components in FIG. 6, the length of the closed path 3 '→ 7' → 6 '→ 3' passing through the node 3'is "3", and the closed path 3 '→ 5' → 2 '. → 4 '→ 6' → 3 '
The period is "1" because the length of "" is "5". Therefore, as it is, the strongly connected component cannot be decomposed any more. Therefore, we try to increase the cycle by dividing some suitable production rules. Here, for example, as shown in FIG. 7, rule 6 is divided into rule 6-1 and rule 6-2.

第8図は、こうして得られた新しいプロダクションルー
ルの組からなる強連結成分のグラフ表現である。ルール
6を分解したことにより、新たにノード10′が追加さ
れている。これにより、ノード3′を通る閉路3′→1
0′→5′→2′→4′→6′→3′の長さが“6”と
なり、この有向グラフの周期は“3”になる。したがっ
て、この強連結成分はノード5′、6′、8′からなる
類Iと、ノード2′、3′からなる類IIと、ノード
4′、7′、10′からなる類IIIとに分類することが
できる。これらの類とルールとの関係を第9図に示す。
FIG. 8 is a graphical representation of a strongly connected component composed of a set of new production rules obtained in this way. By decomposing the rule 6, a node 10 'is newly added. As a result, the closed circuit 3 '→ 1 passing through the node 3'
The length of 0 ′ → 5 ′ → 2 ′ → 4 ′ → 6 ′ → 3 ′ becomes “6”, and the period of this directed graph becomes “3”. Therefore, this strongly connected component is classified into a class I consisting of nodes 5 ', 6', 8 ', a class II consisting of nodes 2', 3 ', and a class III consisting of nodes 4', 7 ', 10'. can do. The relationship between these types and rules is shown in FIG.

第10図に、周期nの強連結グラフを周期m(但しn≧
m)のグラフに拡張しながらノードの類別をも行なうア
ルゴリズムを示す。このアルゴリズムでは、グラフ中の
各ノードに対して、そのノードを始点とするノードを順
次辿りながら、類別番号を順番に付与していく(S11
〜S14,S16〜S20)。そして、この過程で、同
一のノードに異なる類別番号が付与されたら、そのノー
ドに至る経路に形式的なノードを追加する(S15)。
そして、各ノードについて追加したノード数を集計し
(S18)、その値の最も少ないものを解とする(S2
1)。
FIG. 10 shows a strongly connected graph of cycle n with cycle m (where n ≧
An algorithm for classifying nodes while expanding the graph of m) is shown. In this algorithm, the classification number is sequentially assigned to each node in the graph while sequentially tracing the nodes starting from the node (S11).
-S14, S16-S20). Then, in this process, if different classification numbers are given to the same node, a formal node is added to the route to the node (S15).
Then, the number of added nodes for each node is totaled (S18), and the one with the smallest value is taken as the solution (S2).
1).

この分類により、第9図の各類間の遷移条件を満たすプ
ロダクションルールをメタ知識としてメタ知識記憶部1
4に記憶する。
With this classification, the meta-knowledge storage unit 1 uses the production rules satisfying the transition condition between the classes in FIG. 9 as meta-knowledge.
Store in 4.

以上の処理の結果、求められたグラフをメタ知識とする
ことにより大局的な推論処理の方向を知ることができ
る。
As a result of the above processing, the direction of global inference processing can be known by using the obtained graph as meta-knowledge.

推論の過程では、推論部15は、これらのメタ知識によ
って推論の大局的な方向付けを行ない、これに基づき、
推論の途中結果を状態記憶部16に格納しながらルール
記憶部11のプロダクションルールを順次実行してい
く。
In the process of inference, the inference unit 15 performs a global orientation of inference based on these meta-knowledges, and based on this,
The production rules of the rule storage unit 11 are sequentially executed while storing the intermediate result of the inference in the state storage unit 16.

例えば、いま、推論の初期状態がx=a,y=aである
とし、この状態からx=c,y=aが推論結果として導
き得るかどうかを知りたい場合、強連結成分分解部12
によって得られたメタ知識を用いると、第6図における
ルール3とルール4のいずれかを先ず始めに適用すれば
良いというような大局的な推論方針を決定することがで
きる。
For example, assuming that the initial state of inference is x = a, y = a and it is desired to know whether x = c, y = a can be derived as an inference result from this state, the strongly connected component decomposition unit 12
By using the meta-knowledge obtained by, it is possible to determine a global inference policy such that either rule 3 or rule 4 in FIG. 6 should be applied first.

また、類別部13により求められたメタ知識を用いれ
ば、例えば現在の推論の状態が第9図の類Iに属する場
合、適用可能なルールはルール1とルール5の2つしか
ないことや、目標とする状態が類IIIに属するならば、
それに至るまでのルールの適用回数は、 n=3×i+2 (i=0,1,…) であること等が分る。また、例えば後ろ向き推論の終了
条件のチェックは、通常、ルールの適用の度に行われて
いるが、推論の初期状態に対応するノードと終了条件を
満たす状態に対応するノードが各々どの類に属するもの
かが分っていれば、終了条件のチェックは、周期をnと
してルールのn回の適用毎に行なうだけで済む。
Further, if the meta-knowledge obtained by the classification unit 13 is used, for example, when the current inference state belongs to class I in FIG. 9, there are only two applicable rules, rule 1 and rule 5, If the target state belongs to class III,
It can be seen that the number of times the rule is applied up to that is n = 3 × i + 2 (i = 0, 1, ...). Further, for example, the checking of the ending condition of backward inference is usually performed every time the rule is applied, but to which kind of node the node corresponding to the initial state of inference and the node corresponding to the state satisfying the ending condition belong respectively. If it is known, the end condition need only be checked every n times the rule is applied with the cycle being n.

なお、類別部13として上記のようにノードを追加する
処理を行なうものを用いる場合には、追加するノードの
数をある程度制限することが望ましい。即ち、この処理
は、表現の一部を冗長にすることにより全体としては簡
潔な構成を推論過程に与えることを目指したものである
が、追加するノードの数が大きすぎるとグラフのサイズ
が大きくなり、冗長性が勝り全体の推論の効率はかえっ
て低下してしまう。例えば、追加したノード数が元のノ
ード数を上回るような場合はこのケースに相当すると考
えられる。従って、元のグラフのノード数の数%以下に
相当する数のノードの追加によって周期を大きくできる
組合わせを選択するのが良い。例えば、周期n(通常は
n=1)のグラフを周期m(n<m≦N)の各グラフに
拡張し、追加したノードの数の最も少ないものを選ぶの
も効果的である。
When the classification unit 13 that performs the process of adding a node as described above is used, it is desirable to limit the number of nodes to be added to some extent. In other words, this process aims at giving a concise structure to the inference process as a whole by making a part of the expression redundant, but if the number of nodes to be added is too large, the size of the graph becomes large. Therefore, the redundancy is predominant and the efficiency of the whole reasoning is rather reduced. For example, when the number of added nodes exceeds the number of original nodes, this case is considered to correspond to this case. Therefore, it is preferable to select a combination in which the cycle can be increased by adding the number of nodes corresponding to several percent or less of the number of nodes in the original graph. For example, it is effective to extend a graph with a cycle n (usually n = 1) to each graph with a cycle m (n <m ≦ N) and select the one with the smallest number of added nodes.

[発明の効果] 以上のように、本発明によれば、強連結成分分解部及び
類別部で得られたメタ知識を利用して大局的な推論の方
向を決定することができるので、無駄なルールの実行を
防止して推論処理の高速化を図ることができる。
[Effects of the Invention] As described above, according to the present invention, it is possible to determine the direction of global inference using the meta-knowledge obtained in the strongly connected component decomposition unit and the classification unit, which is wasteful. It is possible to prevent the rule from being executed and speed up the inference process.

【図面の簡単な説明】[Brief description of drawings]

第1図は本発明の一実施例に係る推論処理装置のブロッ
ク図、第2図は同装置におけるルール記憶部の内容を示
す図、第3図は同装置における強連結成分分解部の処理
手順を示す流れ図、第4図及び第5図は同分解部の処理
を説明するための図、第6図は同分解部で得られた強連
結グラフを示す図、第7図〜第9図は類別部での処理の
内容を説明するための図、第10図は同類別部の処理手
順を示す流れ図である。 11……ルール記憶部、12……強連結成分分解部、1
3……類別部、14……メタ知識記憶部、15……推論
部、16……状態記憶部。
FIG. 1 is a block diagram of an inference processing device according to an embodiment of the present invention, FIG. 2 is a diagram showing the contents of a rule storage unit in the device, and FIG. 3 is a processing procedure of a strongly connected component decomposition unit in the device. FIG. 4, FIG. 4 and FIG. 5 are diagrams for explaining the processing of the decomposition unit, FIG. 6 is a diagram showing a strongly connected graph obtained by the decomposition unit, and FIGS. FIG. 10 is a flowchart for explaining the contents of processing in the classification unit, and FIG. 10 is a flowchart showing the processing procedure of the classification unit. 11 ... Rule storage unit, 12 ... Strongly connected component decomposition unit, 1
3 ... Classification unit, 14 ... Meta-knowledge storage unit, 15 ... Inference unit, 16 ... State storage unit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】次に適用可能なプロダクションルールを順
次抽出して推論処理を進めていく推論処理装置におい
て、 条件部と実行部の対からなる複数のプロダクションルー
ルを記憶するルール記憶部と、 このルール記憶部に格納されたプロダクションルール中
で扱われている各変数のとり得る全ての組合わせに対し
ノードを設定する設定手段と、この設定手段で設定され
たノード間の遷移条件を満たすプロダクションルールに
よって当該ノード間を結合して有向グラフ行列を求める
結合手段と、この結合手段で求められた有向グラフ行列
を強連結成分に分解する分解手段と、この分解手段で得
られた各強連結成分の変数の値から当該強連結成分に対
応する条件を求める条件演算手段と、各強連結成分間の
遷移条件を満たすプロダクションルールを用いて有向グ
ラフ行列を求め、どのプロダクションルールの次にどの
プロダクションルールが適用できるかを示すメタ知識と
して登録する登録手段とを備える強連結成分分解部と、 この強連結成分分解部で求められた各強連結成分を、そ
の強連結グラフ中の任意のノードを通る任意の閉路の長
さの最大公約数を周期として、かつ前記プロダクション
ルールを適宜分割することにより当該周期を増やした上
で、複数の類に分割し、これらの類の変数条件及び各期
間の遷移条件を満たすプロダクションルールをメタ知識
として求める類別部と、 前記強連結成分分解部及び前記類別部で求められたメタ
知識を記憶するメタ知識記憶部と、 このメタ知識記憶部に記憶されたメタ知識の次に適用可
能なプロダクションルールを示す情報に基づいて現在の
状態を目的とする状態との隔りを認識して、さらにこの
目的とする状態に接近するためのプロダクションルール
の適用を計る大局的な推論の方向付けを行ない、これに
基づいて前記ルール記憶部に記憶された次に適用可能な
プロダクションルールを抽出し、推論処理を実行する推
論部と、 を具備したことを特徴とする推論処理装置。
1. An inference processing apparatus for sequentially extracting applicable production rules to advance inference processing, and a rule storage unit for storing a plurality of production rules each including a pair of a condition section and an execution section. Setting means for setting nodes for all possible combinations of variables handled in the production rules stored in the rule storage section, and production rules satisfying the transition conditions between nodes set by the setting means By means of combining the nodes to obtain a directed graph matrix, decomposing means for decomposing the directed graph matrix obtained by this combining into strongly connected components, and variables for each strongly connected component obtained by this decomposing means. Condition calculation means for obtaining the condition corresponding to the strongly connected component from the value, and the production route satisfying the transition condition between the strongly connected components. Is used to obtain a directed graph matrix, and a strongly connected component decomposition unit having registration means for registering as meta-knowledge indicating which production rule can be applied next to which production rule, and the strongly connected component decomposition unit. Each strongly connected component has a period which is the greatest common divisor of the length of any closed circuit passing through any node in the strongly connected graph, and the period is increased by appropriately dividing the production rule. And a meta-knowledge obtained by the strongly connected component decomposition unit and the classification unit, which stores the production rules that satisfy the variable conditions and transition conditions of each period as meta-knowledge. Based on the meta-knowledge storage unit and the information indicating the production rule that can be applied next to the meta-knowledge stored in this meta-knowledge storage unit. Recognize the gap between the current state and the desired state, and then conduct a global inference to measure the application of production rules to approach the desired state. An inference processing device, comprising: an inference unit that extracts the next applicable production rule stored in the storage unit and executes inference processing.
JP63261434A 1988-10-19 1988-10-19 Inference processor Expired - Lifetime JPH0652503B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63261434A JPH0652503B2 (en) 1988-10-19 1988-10-19 Inference processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63261434A JPH0652503B2 (en) 1988-10-19 1988-10-19 Inference processor

Publications (2)

Publication Number Publication Date
JPH02109131A JPH02109131A (en) 1990-04-20
JPH0652503B2 true JPH0652503B2 (en) 1994-07-06

Family

ID=17361831

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63261434A Expired - Lifetime JPH0652503B2 (en) 1988-10-19 1988-10-19 Inference processor

Country Status (1)

Country Link
JP (1) JPH0652503B2 (en)

Also Published As

Publication number Publication date
JPH02109131A (en) 1990-04-20

Similar Documents

Publication Publication Date Title
Winter An algorithm for the Steiner problem in the Euclidean plane
CN106168797B (en) A kind of method that modularization obtains the useful item failure probability of nuclear power station fault tree
CN113254669B (en) Knowledge graph-based power distribution network CIM model information completion method and system
CN109743286A (en) A kind of IP type mark method and apparatus based on figure convolutional neural networks
CN115344805A (en) Material auditing method, computing equipment and storage medium
CN111708921B (en) Number selection method, device, equipment and storage medium
CN117036060A (en) Vehicle insurance fraud recognition method, device and storage medium
JPH0652503B2 (en) Inference processor
CN109697511B (en) Data reasoning method and device and computer equipment
CN115965065A (en) Model calculation method, device and equipment
JP2507593B2 (en) Inference method
JPH01284928A (en) Inference processor
CN112819160A (en) Visualization method, device, equipment and storage medium of neural network model
CN108108472B (en) Data processing method and server
CN114565815B (en) Video intelligent fusion method and system based on three-dimensional model
CN112990246B (en) Method and device for establishing isolated tree model
Gao et al. Semi-algebraic methods for multi-valued logic
Kochemazov et al. Improving the effectiveness of SAT approach in application to analysis of several discrete models of collective behavior
CN117591705B (en) Sub-table association method and device based on graph search
Kutschenreiter-Praszkiewicz Decision Rule Induction Based on the Graph Theory
Sun et al. Formalization of Transfinite Induction in Coq
CN112200406B (en) Park power distribution network energy router access planning method and device
CN113822430B (en) Event reasoning method, device, computer equipment and storage medium
Pérez et al. Extracting and re-using design patterns from genetic algorithms using case-based reasoning
JP2665120B2 (en) Multi-level summary data generation method

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term