Assignment 1 Intro To Ai

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

STIN1013 Introduction to Artificial Intelligence_A231 Assignment 1 Report

ACANTHUS

AHMAD ABBAS BIN ABU DZARR [301909.], HARRIZ BIN AHMAD FAUZI [301699] and
LEYSHHANN KARTHIGESAN A/L [302426]
School of Computing, College of Arts and Sciences
Universiti Utara Malaysia

1.0 INTRODUCTION

Acanthus is a plant variety that relies on Water, Soil, and Air for its growth. It comprises
several species, including Mollis, Spinosus, and Montanus. Acanthus Mollis, originating from
the Mediterranean and known as Bear’s Breeches, exhibits either white or pink colors.
Among its variations, Tasmanian Angel requires moderate maintenance, showcases vibrant
leaves, and is resistant to deer. Another variant, Rue Ledan, is low-maintenance, displaying
a combination of white and green hues while being able to withstand butterflies. Acanthus
Spinosus, native to Europe and the Mediterranean and also recognized as Spiny Bear’s
Breeches, features purple and white tones. Its variants, Summer Beauty and Holland Day,
differ in their maintenance needs and colors. Summer Beauty, moderately maintained,
flaunts colorful leaves and is resistant to rabbits. In contrast, Holland Day, a low-
maintenance plant, presents itself with black and green hues.

Acanthus Montanus, originating from West Central Africa, presents itself with dark green
and whitish to pale purple colors. This species includes variations like Morning Candle and
Mountain Spike Thorn, each distinct in maintenance requirements and appearance. Morning
Candle, requiring low maintenance, demonstrates tolerance towards butterflies and displays
a combination of white and purple shades. Mountain Spike Thorn exhibits a color palette of
green with whitish tones and features slender, lance-shaped, and pointed bracts.
STIN1013 Introduction to Artificial Intelligence_A231 Assignment 1 Report

2.0 Semantic Network


Da rk Gre e n, whitish to
pa le purple
We s t,
Wa te r Soil Air Centra l
Ta sma nia n Africa
devil
Mont anus Mounta in Thistle
De er
Lake Spike
Thorn
Need of Need of Need of
tole ra te

Specie s of Specie s of
Specie s of

Mounta in
Morning Spike Thorn
Low
Candle
Ta sma nia n
ACANTHUS
Angel Night
Candle Gree n, whitis h
gre en

Me dium SPECIES OF Butte rflies


Color of lea f

Specie s of
Va rient of

White or pink White, purple


thre adlike, bra cts sma ll, la nce
Purple sha pe d, pointe d.
white

Colorful MOLLIS Na tive Me dite rrane a n Europe,


Mediterranean
re gion Spinosus

Spiny be a r·s
bre eche s
Va rient of Be a r·s Bre e che s
Va rient of Holla nd
Night

Low Ma inte na nce Rue Le da n tole ra te Butte rfly


Summer
Tolera nce ra bbit
bea ut y
me dium
Holla nd Da y
colorful
White ,gree n

Rue se da n Wint er bea ut y low


bla ck , gre e n
STIN1013 Introduction to Artificial Intelligence_A231 Assignment 1 Report

3.0 FOPL RULES AND FACTS

Rules

R1: isa (X, acanthus)  needs(X,water) needs(X,soil)  needs(X,air)

R2: isa (X,mollis)  isa (X,montanus) isa (X,spinosus) isa(X,acanthus)


Montanus
R3: isa (X,morning_candle)  isa (X, mountain_spike_thorn )isa(X,montanus)
R4: Color (X, green, whitish_green)  shape (X, threadlike, bracts, small_lance_shaped,
pointed)isa (X, mountain_spike_thorn)
R5: maintenance (X, low)  tolerance (X, butterflies)  color(X, white, purple)isa(X,
morning_candle )
Spinosus
R6: isa (X, summer_beauty)  isa (X, holland_day)isa(X,spinosus)
R7: maintenance(X,low)  color(X,black,green) isa (X, holland day)
R8: Color(X,colourful )  maintenance(X, medium) tolerance(X,rabbit) isa(X,summer
beauty)
Mollis
R9: isa (X, tasmanian_angel)  isa (X,rue_ledan)isa (X,mollis)
R10: Color (X, colorful)  maintenance (X, medium)  tolerate (X, deer)isa (X,
tasmanian_angel)
R11: Color (X, white, green)  maintenance (X,low)  tolerate (X,butterfly) isa(X,
ruel_ledan)
STIN1013 Introduction to Artificial Intelligence_A231 Assignment 1 Report

Facts
Montanus
F1: colour (lake_ spike_ thorn, green, whitish_ green)
F2: shape (lake_spike_thorn, threadlike, bracts_small, lance_shaped, pointed.)

F3: color (night_candle, white, purple)


F4: tolerance (night_candle, butterflies)
F5: maintenance (night_candle, low)
Spinosus
F6: color (holland_night, black, green)
F7: maintenance (holland_night, low)

F8: color of leaf (winter_beauty, colourful)


F9: tolerance (winter_beauty, rabbit)
F10: maintenance (winter_beauty, medium)

Mollis
F11: color of leaf (tasmanian_devil, colorful)
F12: tolerate (tasmanian_devil, deer)
F13: maintenance (tasmanian_devil, medium)

F14:color(rue_sedan ,white,green)
F15:maintenance(rue_sedan, low)
F16:tolerate(rue_sedan,butterfly)
STIN1013 Introduction to Artificial Intelligence_A231 Assignment 1 Report

Forward Chaining
CYCLE 1
R1: isa (X, acanthus)  needs(X,water) needs(X,soil)  needs(X,air) -skip
R2: isa (X,mollis)  isa (X,montanus) isa (X,spinosus) isa(X,acanthus)-skip
R3: isa (X,morning candle)  isa (X, mountain spike thorn )isa(X,montanus)-skip

R4: color (lake_spike_thorn, green, whitish_green)  shape (lake_spike_thorn, threadlike, bracts,


small_lance_shaped, pointed)isa (X, mountain_spike_thorn)

F1: colour (lake_spike_thorn, green, whitish_green) ----- X/lake spike thorn


F2: shape (lake_spike_thorn, threadlike, bracts_small, lance_shaped, pointed.) --- X/lake spike thorn

F17: isa (lake_spike_thorn, mountain_spike_thorn) …. R6 FIRED

R5: maintenance (night_candle, low)  tolerance (night_candle, butterflies)  color(night_candle, white,


purple)isa(night_candle, morning_candle)

F5: maintenance (night_candle, low) ---X/night candle


F4: tolerance (night_candle, butterflies) --- X/ night candle
F3: color (night_candle, white, purple) --- X/ night candle

F18: isa (night_candle, morning candle) … R5 FIRED

R6: isa (X, summer_beauty)  isa (X, holland_day)isa(X,spinosus)--- skip


R7: maintenance (holland_night,low)  color(holland_night,black,green) isa (holland_night, holland day)

F7: maintenance (holland_night, low) ----- X/holland night


F6: color (holland_night, black, green) ---- X/ holland night

F19: isa (holland_night, holland day) … R7 FIRED

R8: color (winter_beauty, colorful)  maintenance (winter_beauty, medium)  tolerance (winter_beauty, rabbit) 
isa (winter_beauty, summer_beauty)

F8: color_of_leaf (winter_beauty, colorful) ---- X/winter_beauty


F9: tolerance (winter_beauty, rabbit) ---- X/winter_beauty
F10: maintenance (winter_beauty, medium) ---- X/winter_beauty

F20: isa (winter_beauty, summer_beauty) … R8 FIRED

R9: isa (X, tasmanian_angel)  isa (X,rue_ledan)isa (X,mollis) ---- skip

R10: color (tasmanian_devil, colorful)  maintenance (tasmanian_devil, medium)  tolerance (tasmanian_devil,


deer)  isa (tasmanian_devil, tasmanian_angel)
F11: color (tasmanian_devil, deer) ---- X/tasmanian_devil
F12: maintenance (tasmanian_devil, medium) ---- X/tasmanian_devil
F13: tolerance (tasmanian_devil, deer) ---- X/tasmanian_devil

F21: isa (tasmanian_devil, tasmanian_angel) ---- X/tasmanian_devil R10 FIRED


R11: color (rue_sedan, white, green)  maintenance (rue_sedan, low)  tolerance (rue_sedan, butterfly)  isa
STIN1013 Introduction to Artificial Intelligence_A231 Assignment 1 Report

(rue_sedan, rue_ledan)
F14: color (rue_sedan, white,green) ---- X/rue_sedan
F15: maintenance (rue_sedan, low) ----X/rue_sedan
F16: tolerance (rue_sedan, butterfly) ----X/rue_sedan

F22: isa (rue_sedan,rue_ledan) ---- X/rue_sedan R11 FIRED

Cycle 2

R1: isa (X, acanthus)  needs(X,water) needs(X,soil)  needs(X,air) ---- skip


R2: isa (X,mollis)  isa (X,montanus) isa (X,spinosus) isa(X,acanthus) ---- skip
R3: isa (night_candle, morning_candle)  isa (lake_spike_thorn, mountain_spike_thorn ) isa (X, montanus)

F17: isa (lake_spike_thorn, mountain_spike_thorn)


F18: isa (night_candle, morning_candle)

F23: isa (night_candle, montanus) FIRED

R6: isa (winter_beauty, summer beauty)  isa (holland_night, holland day)  isa(X,spinosus)

F19: isa (holland_night, holland_day)


F20: isa (winter_beauty, summer_beauty)

F24: isa (winter_beauty, spinosus) ---- X/winter beauty R6 FIRED

R9: isa (tasmanian_devil, tasmanian_angel)  isa (rue_sedan, rue ledan)isa (X,mollis)


F21: isa (tasmanian_devil, tasmanian_angel) ---- X/tasmanian_devil
F22: isa (rue_sedan,rue_ledan) ---- X/rue_sedan

F25: isa (tasmanian_devil, mollis) ---- X/ tasmanian_devil… R9 FIRED

Cycle 3
R2: isa (tasmanian_devil, mollis)  isa (night_candle ,montanus) isa (winter_beauty, spinosus)  isa(mollis,
montanus, acanthus)

F23: isa (night candle, montanus) ---- X/morning_candle


F24: isa (winter beauty, spinosus) ---- X/summer_beauty
F25: isa (tasmanian devil, mollis) ---- X/tasmanian_angel

F26: isa (mollis, acanthus) … R2 FIRED

Cycle 4

R1: isa (mollis, acanthus)  needs (mollis, water)  needs(mollis,soil)  needs(mollis,air)


F26: isa (mollis, acanthus)

F27: isa (mollis, acanthus)  needs(mollis, water)  needs (mollis, soil)  needs(mollis, air) R1 … FIRED
STIN1013 Introduction to Artificial Intelligence_A231 Assignment 1 Report

4.0 PROLOG PROGRAM AND OUTPUT

PROLOG PROGRAM:
STIN1013 Introduction to Artificial Intelligence_A231 Assignment 1 Report

OUTPUT:

You might also like