0% found this document useful (0 votes)
140 views

SBP - Rule Based System Forward Chaining

This document discusses rule-based systems and provides examples of how forward chaining inference works. It contains the following information: 1. Rule-based systems use IF-THEN rules and work by matching facts to rule antecedents and drawing conclusions. 2. An example of a theatre planning system is provided to illustrate forward chaining. The system applies rules to facts in working memory to conclude the action to take. 3. A fruit identification example knowledge base is given containing 11 rules. Forward chaining is demonstrated on a sample fact list to identify the fruit.

Uploaded by

TU Elektro
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
140 views

SBP - Rule Based System Forward Chaining

This document discusses rule-based systems and provides examples of how forward chaining inference works. It contains the following information: 1. Rule-based systems use IF-THEN rules and work by matching facts to rule antecedents and drawing conclusions. 2. An example of a theatre planning system is provided to illustrate forward chaining. The system applies rules to facts in working memory to conclude the action to take. 3. A fruit identification example knowledge base is given containing 11 rules. Forward chaining is demonstrated on a sample fact list to identify the fruit.

Uploaded by

TU Elektro
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Sistem Berbasis Pengetahuan

Rule Based System


Rita Rahmawati, S.T, M.T
Ria Chaniago, S.T, M.T

1
Rule Based System
● rule-based systems are built around rules like the following:
Rule Rn if condition 1
condition 2
...
then action 1
action 2

IF antecedent THEN consequent


Rule Based System Architecture
Rule Based System Architecture

● Knowledge Based → Mengandung seluruh fakta dalam bentuk RULES


● Working Memory → Mengandung fakta - fakta yang sudah diketahui
pada state saat ini.
● Inference Engine → Mengimplementasi semua proses inferensi
(mengambil kesimpulan)
○ Mencari rules pada knowledge base
○ Mencocokan fakta pada Working Memories
○ Menarik kesimpulan
● User Interface → Menyediakan interaksi / interview untuk mendapat input

4
Knowledge Base / Facts

Comet Is-a Horse


Prancer Is-a Horse
Comet Is-a-parent-of Dasher
Comet Is-a-parent-of Prancer
Prancer Is Fast
Dasher Is-a-parent-of Thunder
Thunder Is Fast
Thunder Is-a Horse
Dasher Is-a Horse
Forward Chaining

●Forward chaining is a data driven method


●Inference rules are applied by matching facts to the antecedents of consequence
relations in the knowledge base
●The application of inference rules results in new knowledge (from the
consequences of the relations matched), which is then added to the knowledge
base.
●Modus Ponen!
○ P→Q
○P
-----------------------

Konklusi Q
Forward Chain
● The process uses a down-up approach (bottom to top).
● It starts from an initial state and uses facts to make a conclusion.
● This approach is data-driven.
● It’s employed in expert systems and production rule system.

8
Example : Theatre

T1 if distance > 5 miles then means = drive


T2 if distance > 1 miles and time < 15 minutes then means = drive
T3 if distance > 1 miles and time > 15 minutes then means = walk
T4 if means = drive and location = downtown then action = take a cab
T5 if means = drive and location != downtown then action = drive your car
T6 if means = walk and weather = bad then action = take a coat andd walk
T7 if means = walk and weather = good then action = walk
Assertions: (in Working Memory)
● A1: The theatre is located 6 miles away
● A2: The weather is bad
● A3: The theatre's location is downtown
● A4: The film starts in 10 minutes.
● Action?

Cycl Rules Rule Selected Add to Working


e Memory
1 T1, T2 T1 A1, A2, A3, A4, means
is ‘drive’
2 T1, T2, T4 T2
3 T1, T2, T4 T4 Action “take a cab”
stop
R1 IF Shape = long and Color= green or yellow THEN Fruit = banana

R2 IF Shape = round or oblong and Diameter > 4 inches THEN Fruitclass=vine

R3 IF Shape = round or oblong and Diameter < 4 inches THEN Fruitclass=tree

R4 IF Seedcount = 1 THEN Seedclass=stonefruit

R5 IF Seedcount>1 THEN Seedclass=multiple

R6 IF FruitClass= vine and Color= green THEN Fruit= watermelon

R7 IF FruitClass= vine and Surface= rough and Color= tan THEN Fruit=honeydew

R8 IF FruitClass= vine and Surface= smooth and Color= yellow THEN Fruit= cantaloupe

R9 IF FruitClass= tree and Color= orange and Seedclass= stonefruit THEN Fruit= apricot

R10 IF FruitClass= tree and Color= orange and Seeedclass= multiple THEN Fruit =orange

R11 IF FruitClass= tree and Color= red or yellow or green and Seedclass=multiple THEN Fruit= apple

12
•Given a fact list:
•– Diameter = 3 inch,
•– Shape = round,
•– SeedCount > 1,
•– Color = yellow,
• – Surface = smooth

•Forward chaining = what is this fruit?


13
Tugas Eksplorasi
● Tugas Mandiri
● Kumpulkan dalam google class room kode irpskw4
● Jumat 16 April 2021, pukul 5 sore

14

You might also like