0% found this document useful (0 votes)
43 views4 pages

Assignment 3

This document contains details of an assignment for a student named Muhammad Sarim taking an Artificial Intelligence course. It includes two questions, the first asking the student to design a fuzzy inference system to control an air conditioner based on temperature and humidity, and the second asking the student to write a CLIPS program to save facts about AI courses and remove the third fact using a rule.

Uploaded by

xentro clips
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views4 pages

Assignment 3

This document contains details of an assignment for a student named Muhammad Sarim taking an Artificial Intelligence course. It includes two questions, the first asking the student to design a fuzzy inference system to control an air conditioner based on temperature and humidity, and the second asking the student to write a CLIPS program to save facts about AI courses and remove the third fact using a rule.

Uploaded by

xentro clips
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

CS607

Assignment no: 2

Date: 15-1-2024

Student Name: Muhammad Sarim

Student Id: Bc200401328

Subject Name: Artificial Intelligence

Questions No. 01 Marks: 10+5=15


Design a Fuzzy Inference System (FIS) to control the operation of an Air Conditioner (AC)
based on environmental conditions. Show graphically the fuzzy inference process (Fuzzy rule IF
– Then) to decide whether to turn on or off an air conditioner based on temperature and humidity.
Provide a detailed explanation of the linguistic variables and the fuzzy rules. Your response
should follow a format similar to the given example:

“IF Temperature is cold and Humidity is high then AC is off.”

Answer

Questions No. 02 Marks: 5


Write the program in CLIPS IDE that will save the facts about Artificial Intelligence courses (at
least 5). You are required to make a fact list of courses. After loading the facts in working
memory, use the facts command to see the index of product facts. Remove 3 rd fact by using the
relevant command and again use the facts command to see the index of remaining course facts.
Just send the screenshot of your CLIPS IDE window displaying both code and output.

Answer:

(deftemplate course
(slot course-name)
(slot instructor)
(multislot duration)
(slot level)
)

(deffacts courses
(course (course-name "Artificial Intelligence Basics") (instructor "Dr. Anderson") (duration
10 weeks) (level "Beginner"))
(course (course-name "Machine Learning Fundamentals") (instructor "Prof. Thompson")
(duration 8 weeks) (level "Intermediate"))
(course (course-name "Computational Linguistics") (instructor "Dr. Garcia") (duration 6
weeks) (level "Advanced"))
(course (course-name "Ethics in Robotics") (instructor "Dr. Lee") (duration 12 weeks) (level
"Advanced"))
(course (course-name "Business Applications of AI") (instructor "Prof. Miller") (duration 7
weeks) (level "Intermediate"))
)

(defrule print-facts
=>
(facts)
)

(defrule remove-third-fact
(declare (salience -10))
?c <- (course (course-name ?name) (instructor ?inst) (duration $?dur) (level ?lvl))
=>
(retract ?c)
)
Assert commands
(assert (course (course-name "Artificial Intelligence Basics") (instructor "Dr. Anderson")
(duration 10 weeks) (level "Beginner")))
(assert (course (course-name "Machine Learning Fundamentals") (instructor "Prof.
Thompson") (duration 8 weeks) (level "Intermediate")))
(assert (course (course-name "Computational Linguistics") (instructor "Dr. Garcia") (duration
6 weeks) (level "Advanced")))
(assert (course (course-name "Ethics in Robotics") (instructor "Dr. Lee") (duration 12 weeks)
(level "Advanced")))
(assert (course (course-name "Business Applications of AI") (instructor "Prof. Miller")
(duration 7 weeks) (level "Intermediate")))
(assert (course (course-name "Advanced Data Science") (instructor "Prof. White") (duration 9
weeks) (level "Advanced")))

You might also like