Vous êtes sur la page 1sur 6

PETIT WURI NUR S

RIZA SASONGKO
MUHAMMAD NUR S

G.231.12.0156
G.231.12.0196
G.231.12.0248

A. Diketahui :
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

Dengan Fakta sebagai berikut :


Diameter = 3 inch, Shape = round, SeedCount > 1, Color = yellow, Surface = smooth
Ditanya :
a. Buktikan Fruit-Orange dengan Forward Chaining
b. Buktikan Fruit-Apple dengan Backward Chaining
Jawab :

PETIT WURI NUR S


RIZA SASONGKO
MUHAMMAD NUR S

G.231.12.0156
G.231.12.0196
G.231.12.0248

Diagram presentasi dengan hubungan or, and tree :

a.
Iterasi 1
Fakta shape =round and Diameter =3 inch memicu rule ke-3
IF(Shape=round or oblong) and (Diameter < 4 inches) THEN FruitClass=tree
Sehinggga memori kerja berubah menjadi:
Fakta:
Diameter = 3 inch
Shape = round
SeedCount > 1
Color = yellow
Surface = smooth

PETIT WURI NUR S


RIZA SASONGKO
MUHAMMAD NUR S

G.231.12.0156
G.231.12.0196
G.231.12.0248

Fakta Baru:
Fruit class=tree

Fakta seedCount>1 memicu rule ke-5


IF SeedCount>1 THEN SeedClass=multiple
Sehingga memori kerjaberubah menjadi:
Fakta:
Diameter = 3 inch
Shape = round
SeedCount > 1
Color = yellow
Surface = smooth
Fakta Baru:
Fruit Class=tree
SeedClass=multiple
Rule keR1 : 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

PETIT WURI NUR S


RIZA SASONGKO
MUHAMMAD NUR S

G.231.12.0156
G.231.12.0196
G.231.12.0248

(Color=orange) and (SeedClass=multiple) THEN Fruit=orange


R11 : IF (FruitClass=tree) and (Color=red or yellow or green) and (SeedClass=multiple)
THEN Fruit=apple
Iterasi ke-2
Fakta baru Fruit Class=treedan Color=red or yellow or greendanseedClass=multiple
memicu rule

ke-11

IF (FruitClass=tree) and (Color=red or yellow or green) and (SeedClass=multiple) THEN


Fruit=apple

Sehingga fakta kerja berubah menjadi:


Fakta:
Diameter = 3 inch
Shape = round
SeedCount > 1
Color = yellow
Surface = smooth
Fakta Baru:
Fruit Class=tree
SeedClass=multiple
Fruit=aplle
Rule keR1 : 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

PETIT WURI NUR S


RIZA SASONGKO
MUHAMMAD NUR S

G.231.12.0156
G.231.12.0196
G.231.12.0248

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 (SeedClass=multiple) THEN Fruit=orange
R11 : IF (FruitClass=tree) and (Color=red or yellow or green) and (SeedClass=multiple)
THEN Fruit=apple
Sampai di sini, fakta-fakta yang ada pada memory kerja sudah tidak bisa digunakan untuk
memicu rule-rule lagi sehingga proses dihentikan dan diperoleh kesimpulan-kesimpulan berupa
fakta-fakta yang berniali benar yang terdapat dalam memori kerja,oleh karena fakta
fruit=Orange tidak ada pada fakta maka kondisi tersebut bernilai salah.

b.
Fruit=apple?
R11: IF FruitClass= tree and Color= red or yellow orgreen and Seedclass=multiple
THEN Fruit= apple
FruitClass= tree?
R2: IF Shape = round or oblong and Diameter < 4 inches
THEN Fruitclass=tree
Shape = round or oblong ? YES (Dari fakta)
Diameter > 4 inches? YES
YES
Color= red or yellow or green? YES

PETIT WURI NUR S


RIZA SASONGKO
MUHAMMAD NUR S

G.231.12.0156
G.231.12.0196
G.231.12.0248

Seedclass=multiple YES
Jadi dengan fakta yang ada, maka dengan backward chaining terbukti bahwa fruit apple

B. Ketidakpastian Sistem Pakar Berbasis Rule


P(H|E)=P(E|H)P(H)P(E) =0.60.50.4=0.75
Jadi probabiltas dila kena demam jika ia terkena influenza p(demam|influenza) adalah 0.75
C.

Vous aimerez peut-être aussi