0% found this document useful (0 votes)
1K views

Final Report Isp543

The document outlines rules for troubleshooting common computer issues related to hardware such as screens, ribbons, hard disks, RAM, temperature, audio, and keyboards. It provides over 20 rules to diagnose issues and determine whether components need to be tightened, repaired, replaced, or if the computer needs reformatting or replacing. The rules form an initial knowledge base for an expert system to help users troubleshoot and solve computer problems.

Uploaded by

Alya Nazri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

Final Report Isp543

The document outlines rules for troubleshooting common computer issues related to hardware such as screens, ribbons, hard disks, RAM, temperature, audio, and keyboards. It provides over 20 rules to diagnose issues and determine whether components need to be tightened, repaired, replaced, or if the computer needs reformatting or replacing. The rules form an initial knowledge base for an expert system to help users troubleshoot and solve computer problems.

Uploaded by

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

CS2593B

ISP543
KNOWLEDGE BASED SYSTEMS

SEMESTER FEBRUARY 2019 – JUNE 2019

PROJECT TITLE: COMPUTER TROUBLESHOOTING


SYSTEM

Prepared by:

STUDENT NAME STUDENT ID


MUHAMMAD HAFEEZ BIN MOHAMED AZMAN 2019328849
AINOL ROZAIMI BIN ABD RASHID 2019725917
ALYA NUR ADLINA BINTI AHMAD NAZRI 2019316915
NUR AQILAH BINTI HAMDAN 2019707245
SITI NUR AIN AINI BINTI SUHAIMI 2019717995

Prepared for:

DR. AZLIZA BINTI MOHD ALI

(Leave this part blank. For lecturer’s comments only)

Remarks:
Table of Contents

Definition and Short Form ...................................................................................................................... 3


1.0 Introduction ................................................................................................................................. 4
2.0 Problem Statement ...................................................................................................................... 5
3.0 Objective ..................................................................................................................................... 5
4.0 Methodology ............................................................................................................................... 6
4.1 Knowledge Acquisition........................................................................................................... 6
4.2 Knowledge Representation ..................................................................................................... 7
4.2.1 Semantic Networks ......................................................................................................... 7
4.2.2 Decision Tree .................................................................................................................. 8
4.2.3 Rules ............................................................................................................................. 10
4.3 Knowledge Base ................................................................................................................... 14
4.3.1 Rules ............................................................................................................................. 14
4.4 Inference Engine ................................................................................................................... 28
4.4.1 Forward Chaining ......................................................................................................... 28
4.4.2 Backward Chaining ....................................................................................................... 29
4.5 Working Memory.................................................................................................................. 30
4.6 User Interface ........................................................................................................................ 33
5.0 Testing and Result..................................................................................................................... 34
6.0 Conclusion ................................................................................................................................ 41

2
Definition and Short Form

Table below shows the definition to explain more about the short form words that being used
in this report.

No. Short Form Definition


1. IT Information Technology
2. ICT Information and Communication Technology
3. RAM Random Access Memory
4. BIOS Basic Input Output System
5. VGA Video Graphics Array
6. DVI Digital Visual Interface
7. HDMI High Definition Multimedia Interface
8. USB Universal Serial Bus
9. DC Direct Current
10. LED Light-Emitting Diode
Table 1: Definition and Short Form

3
1.0 Introduction

Troubleshooting is the process of identifying and fixing problems. Computer


troubleshooting may involve hardware or software and sometimes can be both. Computer
systems often gives us problems from time to time. These problems requires the IT/ICT experts
to be solved. The traditional ways to solve the problems taking a long time and high cost to
reach the solution.

This expert system will help user to find the solution with specific answer for specific
problem. It will include troubleshooting for maintenance, fault indication, and many more. This
expert system can save time, energy, cost as it helps user to find the cause of the problem within
few minutes. Hence, this expert system is very essential because it have ability to find faults
and suggest appropriate solutions based on the knowledge stored in the knowledge base.

4
2.0 Problem Statement

1. In computer domain, the experts were limited in number but the demand for the experts
were high.
2. Every computer part have its own troubleshooting mechanisms but there are limited
numbers of troubleshooting resources.
3. Some people do not really know about computer hardware and software.
4. People tend to get scammed by unfaithful IT technician, as they do not know about their
computer’s problems.
5. People have no time to meet the experts.

3.0 Objective

To develop computer troubleshooting expert system.

5
4.0 Methodology

The methods that we used on developing our project are knowledge acquisition, knowledge
representation which consists of semantic networks, decision tree, and rules, knowledge base,
inference engine which is categorized in two types of chaining; forward and backward, working
memory and user interface.

4.1 Knowledge Acquisition

6
4.2 Knowledge Representation

4.2.1 Semantic Networks

7
4.2.2 Decision Tree

8
9
4.2.3 Rules

Rule 1 Rule 8
If laptop screen is jumble, If the temperature is high
Then check the ribbon Then clean the air passage in the
computer/laptop
Rule 2
If ribbon is loose Rule 9
Then tighten the ribbon If temperature is okay
And the hard disk is okay
Rule 3 Then check the RAM
If ribbon is damaged
Then change the ribbon Rule 10
If the RAM is in bad condition
Rule 4 Then change the RAM
If the laptop screen is jumbled
And the ribbon has problems Rule 11
Then change to a new screen If the RAM is okay
And the hard disk is okay
Rule 5 And the temperature is okay
If the laptop got blue screen Then change to new computer
Then check the hard disk
Rule 12
Rule 6 If the computer has black screen
If the hard disk is at fault Then check screen backlit
Then change or repair the hard disk
Rule 13
Rule 7 If screen backlit is bad
If the hard disk is okay And computer is old
Then check the temperature of Then fix the backlit
computer

10
Rule 14 Rule 20
If screen backlit is okay If speaker makes weird noise
And computer is old Then check the audio jack
Then fix the screen led
Rule 21
Rule 15 If audio jack is loose
If the screen backlit is okay Then tighten the connection of audio
And screen led is okay jack
And computer is old
Then there are issues with BIOS Rule 22
If audio jack is okay
Rule 16 Then speaker is damaged
If there are no issues with BIOS
Then format the computer Rule 23
If speaker is damaged
Rule 17 Then buy a new speaker
If the screen is black
And the computer is new Rule 24
Then change the computer If the character displayed is different
from what user typed
Rule 18 Then keyboard is failed
If the screen is blurry or fuzzy
Then VGA/DVI/HDMI connector is Rule 25
loose If keyboard is failed
Or keyboard have missing keys
Rule 19 Then fix the keyboard
If the VGA connector is loose
Then plug the VGA/DVI/HDMI Rule 26
properly and tightly If the keyboard cannot be fixed
Then buy new keyboard

11
Rule 27 Rule 34
If the devices are plugged into the If software configuration
USB port Then setting the mouse setting
And the devices cannot be ejected configuration
Then a file is open on the device
Rule 35
Rule 28 If the mouse does not function
If a file is open on the device And the mouse is wireless
Then close the file Then change to new battery

Rule 29 Rule 36
If the devices are plugged into the If the mouse does not function
USB port And battery is changed
And the devices are not recognized Then buy new mouse
Then USB port is loose
Rule 37
Rule 30 If the mouse does not function
If USB port is loose And the mouse is wired
Then tighten the USB Port Then check the connection with USB
port
Rule 31
If the mouse is not smooth Rule 38
Then there are dusts in the sensor area If the mouse does not function
And the connection with USB port is
Rule 32 good
If there are dusts in the sensor area Then buy new mouse
Then clean the surface
Rule 39
Rule 33 If the battery does not last long
If the mouse is too fast or too slow Then battery is at fault
Or the mouse faces double clicking
Then software configuration

12
Rule 40 Rule 47
If battery at fault If the fan produces loud sound
Then change battery And the fan is overheated
Then the dust or foreign particles are
Rule 41 dragged into the fan
If the battery is not charging properly
And DC power connector failed Rule 48
Then buy a new DC connector power If the dust or foreign particles are
dragged into the fan
Rule 42 Then clean the fan from dust
If battery at fault
And the battery is flat Rule 49
Then buy a new battery If the fan is overheated
And thermal paste > 5 years
Rule 43 Else thermal paste has expired
If there are strange noises produced
Then the hard disk is at fault Rule 50
If thermal paste has expired
Rule 44 Then clean the old thermal paste and
If the hard disk is at fault apply the new one
Then there is a mechanical failure on
hard disk

Rule 45
If there is a mechanical failure on hard
disk
Then fix the hard disk

Rule 46
If there is a mechanical failure on hard
disk
And hard disk cannot be fix
Then Replace with a new hard disk

13
4.3 Knowledge Base

4.3.1 Rules
CLIPS> (defrule MAIN::laptopDiagnosis CLIPS> (defrule MAIN::screenOn
=> (laptopScreen)
(printout t " ___________________________" crlf) =>
(printout t "| WELCOME TO PC (printout t "What is your PC's problem?" crlf)
TROUBLESHOOTING SYSTEM " crlf) (printout t "Key in: " crlf)
(printout t "|___________________________" crlf) (printout t "1. screen" crlf)(printout t "2. speaker" crlf)
(printout t "Can your laptop be turned on? (1-yes, 0- (printout t "3. keyboard" crlf)(printout t "4. usb" crlf)
no)" crlf) (printout t "5. mouse" crlf)
(printout t "Your Answer: ") (printout t "Or smash button '0' to check your problem
(bind ?x (read)) one-by-one" crlf)
(if (= ?x 1) (printout t "Answer: ")
then (bind ?ans (read))
(assert (laptopScreen)) (if (= ?ans 1)
else then (assert(screen yes))
(assert (laptopBattery)))) )
(if (eq ?ans 2)
CLIPS> (defrule MAIN::userOn then (assert(screen no))
(user dontknow) )
=> (if (eq ?ans 5)
(printout t "Do you have screen problem? (1-Yes, 0- then (assert(usbport no))
No)" crlf) )
(bind ?x (read)) (if (eq ?ans 3)
(if (= ?x 1) then (assert(speaker no))
then (assert(screen yes)) )
else (assert(screen no)))) (if (eq ?ans 4)
then (assert(keyboard no))
CLIPS> (defrule MAIN::newDevice )
(backlit bad) (device new) (if (!= ?ans 1 2 3 4 5)
=> then (assert(user dontknow))))
(printout t "We recommend you claim the warranty."
crlf))

14
CLIPS> (defrule MAIN::jumbledScreen CLIPS> (defrule MAIN::blueScreen
(screen yes) (jumbled no)
=> =>
(printout t "Do you have jumbled screen? (1-yes, 0- (printout t "Do you encountered blue screen
no)" crlf) problem before? (1-yes, 0-no)" crlf)
(bind ?x (read)) (bind ?x (read))
(if (= ?x 1) (if (= ?x 1)
then then
(assert (jumbled yes)) (assert (bluescreen yes))
else else
(assert (jumbled no)))) (assert (bluescreen no))))

CLIPS> (defrule MAIN::jumbledProblem CLIPS> (defrule MAIN::blueScreenProblem


(jumbled yes) (bluescreen yes)
=> =>
(printout t " Screen ribbon has problems. Tighten the (printout t "Does it happens frequently? (1-yes, 0-
ribbon properly. Does it work? (1-yes, 0-no)" crlf) no)" crlf)
(bind ?x (read)) (bind ?x (read))
(if (= ?x 1) (if (= ?x 1)
then then
(assert (ribbon work)) (assert (bsencounter yes))
else else
(assert (ribbon damage)))) (assert (bsencounter no))))

CLIPS> (defrule MAIN::ribbonFine CLIPS> (defrule MAIN::blueScreenFaulty


(ribbon work) (bsencounter yes)
=> =>
(printout t " Glad to help. Thank you :)" crlf)) (printout t "You might need to check your hard disk.
Does it working fine? (1-yes, 0-no)" crlf)
CLIPS> (defrule MAIN::ribbonProblem (bind ?x (read))
(ribbon damage) (if (= ?x 1)
(jumbled yes) then
=> (assert (harddisk fine))
(printout t " Ribbon damaged. Change the ribbon or else
change new Screen." crlf)) (assert (harddisk no))))

15
CLIPS> (defrule MAIN::hardDiskProblem CLIPS> (defrule MAIN::ramProblem
(harddisk no) (ram bad)
=> =>
(printout t "You need to repair the hard disk or (printout t "Change to a new RAM. Hope this will
change to a new one. Hope this can help you, have a help you, have a good day!" crlf))
good day!" crlf))
CLIPS> (defrule MAIN::ramFine
CLIPS> (defrule MAIN::hardDiskFine (ram fine)
(harddisk fine) (harddisk fine)
=> (temp normal)
(printout t "Please check your computer =>
temperature. It is high or normal? (1-High, 0- (printout t "You might reconsider to repair your
Normal)" crlf) motherboard, but we highly RECOMMEND you to
(bind ?x (read)) buy a new laptop/devices. Hope this will help you,
(if (= ?x 1) have a good day!" crlf))
then
(assert (temp high)) CLIPS> (defrule MAIN::blackScreen
else (bluescreen no)
(assert (temp normal)))) =>
(printout t "Do you have black screen problem? (1-
CLIPS> (defrule MAIN::compTempHigh yes, 0-no)" crlf)
(temp high) (bind ?x (read))
=> (if (= ?x 1)
(printout t "You may need to clean the air passage in then
the computer. Hope this can help you, have a good (assert (blackscreen yes))
day!" crlf)) else
(assert (blackscreen no))))
CLIPS> (defrule MAIN::compTempNorm
(temp normal) CLIPS> (defrule MAIN::blackScreenProblem
(harddisk fine) (blackscreen yes)
=> =>
(printout t "There is might be a problem in your (printout t "Please check the backlit, is it good? (1-
RAM. Does it working fine? (1-Fine, 0-Bad)" crlf) yes, 0-no)" crlf)
(bind ?x (read)) (bind ?x (read))
(if (= ?x 1) (if (= ?x 1)
then then
(assert (ram fine)) (assert (backlit fine))
else else
(assert (ram bad)))) (assert (backlit bad))))

16
CLIPS> (defrule MAIN::blackScreenPC CLIPS> (defrule MAIN::biosProblem
(blackscreen yes) (backlit fine)
=> (led fine)
(printout t "Your device old or new? (1-new, 0-old)" (device old)
crlf) =>
(bind ?x (read)) (printout t "There is an issue with BIOS, check your
(if (= ?x 1) BIOS settings." crlf)
then (printout t "Did it solve your problem? (1-yes, 0-
(assert (device new)) no)" crlf)
else (bind ?x (read))
(assert (device old)))) (if (= ?x 1)
then
CLIPS> (defrule MAIN::backlitBad (assert (bios issue))
(backlit bad) else
(device old) (assert (bios fine))))
=>
(printout t "You need to fix the backlit Hope this will CLIPS> (defrule MAIN::biosFine
help you, have a good day!" crlf)) (bios fine)
=>
CLIPS> (defrule MAIN::ledProblem (printout t "We recommend you to format your
(backlit fine) computer. Hope this will help you, have a good day!"
(device old) crlf)
=> )
(printout t "Fix the screen led, is it in a good shape?
(1-yes, 0-no)" crlf) CLIPS> (defrule MAIN::changePC
(bind ?x (read)) (blackscreen yes)
(if (= ?x 1) (led fine)
then (backlit fine)
(assert (led fine)) (device new)
else =>
(assert (led bad)))) (printout t "There is a problem with your device,
claim the warranty or buy a new one." crlf))
CLIPS> (defrule MAIN::biosIssue
(bios issue) CLIPS> (defrule MAIN::blurryWorking
=> (fuzzy yes)
(printout t "Hope this will help you, have a good =>
day!" crlf) (printout t "Thanks for using our system, have a
) good day!" crlf))

17
CLIPS> (defrule MAIN::blurryScreen CLIPS> (defrule MAIN::keyboardProblem
(blackscreen no) (keyboard yes)
=> =>
(printout t "You might have blurry screen or fuzzy (printout t "Is the character displayed different from
screen. Please check your VGA/HDMI/DVI what you typed? (1-yes, 0-no)" crlf)
connector and tighten them properly. Does this help? (bind ?k (read))
(1-yes, 0-no) " crlf) (if (= ?k 1)
(bind ?x (read)) then
(if (= ?x 1) (assert (keyboardType yes))
then else
(assert (fuzzy yes)) (assert (keyboardType no))))
else
(assert (fuzzy no)))) CLIPS> (defrule MAIN::keyboardFailedYes
(keyboardType yes)
CLIPS> (defrule MAIN::blurryNotWork =>
(fuzzy no) (printout t "The keyboard is failed. Have you fix the
=> keyboard? (1-yes, 0-no)" crlf)
(printout t "Replace the connector with a new one, (bind ?k (read))
have a good day!" crlf)) (if (= ?k 1)
then
CLIPS> (defrule MAIN::keyboards (assert (keyboardFix yes))
(speaker no) else
=> (assert (keyboardFix no))))
(printout t "Do you have problem with your
keyboard? (1-yes, 0-no)" crlf) CLIPS> (defrule MAIN::keyboardFixedYes
(bind ?k (read)) (keyboardFix yes)
(if (= ?k 1) =>
then (printout t "Can the keyboard be fixed? (1-yes, 0-
(assert (keyboard yes)) no)" crlf)
else (bind ?k (read))
(assert (keyboard no)))) (if (= ?k 1)
then
CLIPS> (defrule MAIN::keyboardFailedNo (assert (canFix yes))
(keyboardType no) else
=> (assert (canFix no))))
(printout t "Problem cannot be detected." crlf))

18
CLIPS> (defrule MAIN::keyboardFixedNo CLIPS> (defrule MAIN::noiseSpeakerProducedYes
(keyboardFix no) (noiseSpeaker yes)
=> =>
(printout t "Fix the keyboard first." crlf)) (printout t "Have you check the audio jack? (1-yes,
0-no)" crlf)
CLIPS> (defrule MAIN::damagedKeyboardYes (bind ?s (read))
(canFix yes) (if (= ?s 1)
=> then
(printout t "The keyboard problem is solved." crlf)) (assert (speakerChecked yes))
else
CLIPS> (defrule MAIN::damagedKeyboardNo (assert (speakerChecked no))))
(canFix no)
=> CLIPS> (defrule MAIN::noiseSpeakerProducedNo
(printout t "Buy new keyboard." crlf)) (noiseSpeaker no)
=>
CLIPS> (defrule MAIN::speakers (printout t "Problem cannot be detected." crlf))
(screen no)
=> CLIPS> (defrule MAIN::audioJackLooseYes
(printout t "Do you have problem with your speaker? (speakerChecked yes)
(1-yes, 0-no)" crlf) =>
(bind ?s (read)) (printout t "Is the audio jack loose? (1-yes, 0-no)"
(if (= ?s 1) crlf)
then (bind ?s (read))
(assert (speaker yes)) (if (= ?s 1)
else then
(assert (speaker no)))) (assert (audioJack yes))
else
CLIPS> (defrule MAIN::speakerProblem (assert (audioJack no))))
(speaker yes)
=> CLIPS> (defrule MAIN::audioJackLooseNo
(printout t "Is there any weird noise produced? (1- (speakerChecked no)
yes, 0-no)" crlf) =>
(bind ?s (read)) (printout t "Check the audio jack first." crlf))
(if (= ?s 1)
then CLIPS> (defrule MAIN::audioJackOkayYes
(assert (noiseSpeaker yes)) (audioJack yes)
else =>
(assert (noiseSpeaker no)))) (printout t "Tighten the connection of audio jack."
crlf))

19
CLIPS> (defrule MAIN::audioJackOkayNo CLIPS> (defrule MAIN::deviceHasPluggedYes
(audioJack no) (devicePlugged yes)
=> =>
(printout t "The speaker is damaged. Buy new (printout t "Can the device be ejected? (1-yes, 0-
speaker." crlf)) no)" crlf)
(bind ?u (read))
CLIPS> (defrule MAIN::usbPort (if (= ?u 1)
(keyboard no) then
=> (assert (deviceEjected yes))
(printout t "Do you have problem with your USB else
port? (1-yes, 0-no)" crlf) (assert (deviceEjected no))))
(bind ?u (read))
(if (= ?u 1) CLIPS> (defrule MAIN::deviceCanEjectYes
then (deviceEjected yes)
(assert (usbport yes)) =>
else (printout t "Do the popup message says that the
(assert (usbport no)))) device is not recognized? (1-yes, 0-no)" crlf)
(bind ?u (read))
CLIPS> (defrule MAIN::usbPortProblem (if (= ?u 1)
(usbport yes) then
=> (assert (deviceNotRecognized yes))
(printout t "Is there any devices plugged into the else
USB port? (1-yes, 0-no)" crlf) (assert (deviceNotRecognized no))))
(bind ?u (read))
(if (= ?u 1) CLIPS> (defrule MAIN::deviceCanEjectNo
then (deviceEjected no)
(assert (devicePlugged yes)) =>
else (printout t "Are they any files being opened? (1-yes,
(assert (devicePlugged no)))) 0-no)" crlf)
(bind ?u (read))
CLIPS> (defrule MAIN::deviceHasPluggedNo (if (= ?u 1)
(devicePlugged no) then
=> (assert (fileOpened yes))
(printout t "Problem cannot be detected." crlf)) else
(assert (fileOpened no))))

20
CLIPS> (defrule MAIN::deviceRecognizeYes CLIPS> (defrule MAIN::mouseProblem1
(deviceNotRecognized yes) (mouse yes)
=> =>
(printout t "The USB port is loose. Tighten the USB (printout t "Is your mouse problem about not being
port." crlf)) smooth? (1-yes , 0-no)" crlf)
(bind ?x (read))
CLIPS> (defrule MAIN::deviceRecognizeNo (if (= ?x 1)
(deviceNotRecognized no) then
=> (assert (mouse notSmooth))
(printout t "The problem cannot be detected." crlf)) else
(assert (mouse notSmoothProblem))))
CLIPS> (defrule MAIN::fileIsOpenedYes
(fileOpened yes) CLIPS> (defrule MAIN::smoothProblem
=> (mouse notSmooth)
(printout t "Close the file." crlf)) =>
(printout t "You might need to check the sensor area.
CLIPS> (defrule MAIN::fileIsOpenedNo Clean the surface of sensor area. Does it work? (1-yes
(fileOpened no) , 0-no)" crlf)
=> (bind ?x (read))
(printout t "The problem cannot be detected." crlf)) (if (= ?x 1)
then
CLIPS> (defrule MAIN::mouseProblem (assert (mouse smoothNow))
(usbport no) else
=> (assert (mouse smoothNotYet))))
(printout t "Do you have problem with your mouse?
(1-yes, 0-no)" crlf) CLIPS> (defrule MAIN::smoothFixed
(bind ?x (read)) (mouse smoothNow)
(if (= ?x 1) =>
then (printout t "Good job. Work's done. " crlf))
(assert (mouse yes))
else CLIPS> (defrule MAIN::smoothNotFixed
(assert (mouse no)))) (mouse smoothNotYet)
=>
CLIPS> (defrule MAIN::notMouseProblem (printout t "Mouse is faulty. Time to change to a new
(mouse no) mouse. " crlf))
=>
(printout t "Okay. No problem " crlf))

21
CLIPS> (defrule MAIN::mouseProblem2 CLIPS> (defrule MAIN::fixSoftware2
(mouse notSmoothProblem) (software dont)
=> =>
(printout t "Is your mouse problem about mouse (printout t "Sorry. You need to get a new mouse"
pointing too fast or too slow ? or it have problem with crlf))
double clicking? (1-yes, 0-no)" crlf)
(bind ?x (read)) CLIPS> (defrule MAIN::mouseProblem3
(if (= ?x 1) (mouse notSpeedyProblem)
then =>
(assert (mouse speedyYes)) (printout t "Does your mouse not functioning and it's
else wireless? (1-yes , 0-no)" crlf)
(assert (mouse notSpeedyProblem)))) (bind ?x (read))
(if (= ?x 1)
CLIPS> (defrule MAIN::speedyProblem then
(mouse speedyYes) (assert (mouse wirelessNotFunctioning))
=> else
(printout t " There is problem with the software (assert (mouse notWireless))))
configurations. " crlf)
(assert (softwareConfiguration))) CLIPS> (defrule MAIN::mouseNotfunction1
(mouse wirelessNotFunctioning)
CLIPS> (defrule MAIN::speedSoftware =>
(softwareConfiguration) (printout t "You need to replace the battery. Does it
=> work ? (1-yes , 0-no) " crlf)
(printout t " Adjust the settings in the mouse (bind ?x (read))
software configurations. Does it work? (1-yes, 0-no) " (if (= ?x 1)
crlf) then
(bind ?x (read)) (assert (mouse wirelessFixed))
(if (= ?x 1) else
then (assert (mouse wirelessNotFixed))))
(assert (software work))
else CLIPS> (defrule MAIN::mouseNotfunction2
(assert (software dont)))) (mouse wirelessFixed)
=>
CLIPS> (defrule MAIN::fixSoftware (printout t "Goodjob. Your mouse is working. Glad
(software work) to help. " crlf))
=>
(printout t "Goodjob , Glad to help. Thankyou "
crlf))

22
CLIPS> (defrule MAIN::mouseNotfunction3 CLIPS> (defrule MAIN::mouseNotfunction7
(mouse wirelessNotFixed) (mouse wiredFixed)
=> =>
(printout t "Sorry but you need to buy a new mouse. (printout t "Goodjob. Your mouse is working. Glad
" crlf)) to help. " crlf))

CLIPS> (defrule MAIN::mouseNotfunction4 CLIPS> (defrule MAIN::mouseNotfunction8


(mouse notWireless) (mouse wiredNotFixed)
=> =>
(printout t "Does your mouse not functioning and it's (printout t "Sorry but you need to buy a new mouse.
a wired mouse ? (1-yes , 0-no)" crlf) " crlf))
(bind ?x (read))
(if (= ?x 1) CLIPS> (defrule MAIN::screenOff
then (laptopBattery)
(assert (mouse wiredNotFunction)) =>
else (printout t "What is your PC's problem?"
(assert (mouse wiredNoProblem)))) crlf)
(printout t "Key in: " crlf)
CLIPS> (defrule MAIN::mouseNotfunction5 (printout t "1. battery" crlf)(printout t "2.
(mouse wiredNoProblem) hard disk" crlf)
=> (printout t "3. fan" crlf)
(printout t "Then there's no problem. Have a nice (printout t "Or smash button '0' to check your
one. " crlf)) problem one-by-one" crlf)
(printout t "Answer: ")
CLIPS> (defrule MAIN::mouseNotfunction6 (bind ?ans (read))
(mouse wiredNotFunctioning) (if (= ?ans 1)
=> then (assert(battery yes))
(printout t "You might want to check the connection )
to USB Port. Try to adjust. Does it work? (1-yes, 0- (if (eq ?ans 2)
no) " crlf) then (assert(hard_Disk yes))
(bind ?x (read)) )
(if (= ?x 1) (if (eq ?ans 3)
then then (assert(fan yes))
(assert (mouse wiredFixed)) )
else (if (!= ?ans 1 2 3)
(assert (mouse wiredNotFixed)))) then (assert(useroff dontknow))))

23
CLIPS> (defrule MAIN::userOff CLIPS> (defrule MAIN::batteryProblem3
(useroff dontknow) (lastlong yes)
=> =>
(printout t "Do you have problem with your battery? (printout t "Battery is at fault. Change the battery to
(1-yes, 0-no)" crlf) new one. Does it work? (1-yes, 0-no)" crlf)
(bind ?b (read)) (bind ?x (read))
(if (= ?b 1) (if (= ?x 1)
then then
(assert (battery yes)) (assert (battery work))
else else
(assert (battery no)))) (assert (battery damage))))

CLIPS> (defrule MAIN::batteryProblem1 CLIPS> (defrule MAIN::batteryProblem4


(battery yes) (battery work)
=> =>
(printout t "Does the current flowed in? (1-yes, 0- (printout t " Glad to help. Thank you :)" crlf))
no)" crlf)
(bind ?x (read)) CLIPS> (defrule MAIN::batteryProblem5
(if (= ?x 1) (battery damage)
then =>
(assert (current yes)) (printout t "Is your battery not charging properly and
else DC power not connected? (1-yes, 0-no)" crlf)
(assert (current no)))) (bind ?x (read))
(if (= ?x 1)
CLIPS> (defrule MAIN::batteryProblem2 then
(current yes) (assert (current no))
=> else
(printout t "Does your battery do not last long? (1- (assert (dc no))))
yes, 0-no)" crlf)
(bind ?x (read)) CLIPS> (defrule MAIN::batteryProblem6
(if (= ?x 1) (dc yes)
then =>
(assert (lastlong yes)) (printout t "Buy a new DC connector power." crlf))
else
(assert (battery damage))))

24
CLIPS> (defrule MAIN::batteryProblem7 CLIPS> (defrule MAIN::hardDisk_Problem
(dc no) (hard_Disk yes)
=> =>
(printout t "Is your battery at fault and flat? (1-yes, (printout t "Is there any strange noise produced? (1-
0-no)" crlf) yes, 0-no)" crlf)
(bind ?x (read)) (bind ?h (read))
(if (= ?x 1) (if (= ?h 1)
then then
(assert (flat yes)) (assert (noise yes))
else else
(assert (flat no)))) (assert (noise no))))

CLIPS> (defrule MAIN::batteryProblem8 CLIPS> (defrule MAIN::noiseProducedYes


(flat yes) (noise yes)
=> =>
(printout t "Buy a new battery." crlf)) (printout t "The hard disk is at fault. There is a
mechanical failure on hard disk. Have you fix the hard
CLIPS> (defrule MAIN::batteryProblem9 disk? (1-yes, 0-no)" crlf)
(flat no) (bind ?h (read))
(current no) (if (= ?h 1)
=> then
(printout t "You might have problem in different pc (assert (hardDiskFixed yes))
components." crlf)) else
(assert (hardDiskFixed no))))
CLIPS> (defrule MAIN::hardDisk
(battery no) CLIPS> (defrule MAIN::noiseProducedNo
=> (noise no)
(printout t "Do you have problem with your hard =>
disk? (1-yes, 0-no)" crlf) (printout t "Problem cannot be detected." crlf))
(bind ?h (read))
(if (= ?h 1) CLIPS> (defrule MAIN::fixHardDiskNo
then (hardDiskFixed no)
(assert (hard_Disk yes)) =>
else (printout t "Fix the hard disk." crlf))
(assert (hard_Disk no))))

25
CLIPS> (defrule MAIN::fixHardDiskYes CLIPS> (defrule MAIN::fanSound
(hardDiskFixed yes) (fan yes)
=> =>
(printout t "Can the hard disk be fixed? (1-yes, 0- (printout t "Does the fan produces loud sound and is
no)" crlf) overheated? (1-yes, 0-no)" crlf)
(bind ?h (read)) (bind ?x (read))
(if (= ?h 1) (if (= ?x 1)
then then
(assert (canFixed yes)) (assert (sound yes))
else else
(assert (canFixed no)))) (assert (sound no))))

CLIPS> (defrule MAIN::damagedHardDiskYes CLIPS> (defrule MAIN::dustDragged


(canFixed yes) (sound yes)
=> =>
(printout t "The hard disk problem is solved." crlf)) (printout t "Are there dust or foreign particles
dragged into the fan? (1-yes, 0-no)" crlf)
CLIPS> (defrule MAIN::damagedHardDiskNo (bind ?x (read))
(canFixed no) (if (= ?x 1)
=> then
(printout t "Replace with a new hard disk." crlf)) (assert (dragged yes))
else
CLIPS> (defrule MAIN::fanProblem (assert (sound no))))
(hard_Disk no)
=> CLIPS> (defrule MAIN::dustDragged1
(printout t "Do you have problem with the fan? (1- (dragged yes)
yes, 0-no)" crlf) =>
(bind ?x (read)) (printout t crlf)
(if (= ?x 1) (printout t "SOLUTION: Clean the fan from dust."
then crlf))
(assert (fan yes))
else CLIPS> (defrule MAIN::overheated
(printout t "There is no more components." crlf))) (sound no)
=>
CLIPS> (defrule MAIN::thermalPaste (printout t " Is the fan overheated and the thermal
(heat yes) paste is more than 5 years? (1-yes, 0-no)" crlf)
=> (bind ?x (read))
(printout t " Clean the old thermal paste and apply (if (= ?x 1)
new one" crlf))

26
CLIPS> (defrule restart then
(restartSys true) (assert (heat yes))
=> else
(printout t crlf) (assert (noise no))))
(printout t crlf)
(printout t "Do you want to continue with
other diagnosis? (1-yes,0-no) " crlf)
(bind ?x (read))
(printout t crlf)

(if (= ?x 1)
then (retract *)(assert(restartSys
true))
else(assert(restartSys false))))

27
4.4 Inference Engine

4.4.1 Forward Chaining

F1: Battery does not last long

F2: Battery is flat

New facts generated

F3: Battery at fault

F4: Buy a new battery (Hypothesis)

F1  R39

F3 + F2  R42

28
4.4.2 Backward Chaining

Hypothesis: Clean old thermal paste and apply new one (R50)

Stack
S1: Thermal paste has expired (R49)

Facts
F1: Fan is overheated
F2: Thermal paste > 5 years
F3: Thermal paste has expired
F4: Clean the old thermal paste and apply new one

F1 + F2  R49
F3  R50

29
4.5 Working Memory
List of facts

F1: Laptop screen is jumbled

F2: Ribbon is loose

F3: Ribbon is damaged

F4: ribbon has problems

F5: Laptop got blue screen

F6: Hard disk fault

F7: Hard disk okay

F8: Temperature is high

F9: Temperature is okay

F10: Hard disk is okay

F11: RAM is in bad condition

F12: Laptop has black screen

F13: Back screen is bad

F14: Laptop is old

F15: Screen backlit is okay

F16: Screen led is okay

F17: Laptop is new

F18: Screen is blurry or fuzzy

F19: VGA connector is loose

F20: Speaker makes weird noise

F21: Audio jack is loose

F22: Audio jack is okay

30
F23: Speaker is damaged

F24: Character displayed is different from what user typed

F25: Keyboard failed

F26: Keyboard have missing keys

F27: Devices are plugged into USB port

F28: Devices cannot be ejected

F29: File is open on the device

F30: Devices are not recognized

F31: USB port is loose

F32: Mouse is not smooth

F33: There are dusts in the sensor area

F34: Mouse too fast/slow

F35: Mouse faces double clicking

F36: Software configuration

F37: Mouse does not function

F38: Mouse is wireless

F39: Battery is changed

F40: Mouse is wired

F41: Battery does not last long

F42: Battery at fault

F43: Battery not charging properly

F44: DC power connector failed

F45: Battery flat

F46: Mechanical failure on hard disk

31
F47: Fan produces loud sound

F48: Fan is overheated

F49: Dust or foreign particles are dragged into the fan

F50: Thermal paste > 5 years

F51: Thermal paste has expired

32
4.6 User Interface

33
5.0 Testing and Result

Laptop can be turned on

By running this program for a first time, it will ask question whether your laptop can be turned
on or not. User must enter 1 for yes or 0 for no.

When user enter 1 for yes, it will display list of problems that may had occurred for this part.
User need to prompt number of problem if they already discovered their problem or user can
enter 0 if they want to go thru the questions one by one until they found the solution.

34
Example for screen problem.

Example for speaker problem.

35
Example for keyboard problem.

Example for USB port problem.

36
Example for mouse problem.

If user entered for 0 in previous question, it will be shown as above. This program will ask
user questions until they encountered with their problem.

37
Laptop cannot be turned on

When user enter 0 for cannot be turned on, it will display list of problems that may had occurred
for this part. User need to prompt number of problem if they already discovered their problem
or user can enter 0 if they want to go thru the questions one by one until they found the solution.

Example for battery problem.

38
Example for hard disk problem.

Example for fan problem.

39
If user entered for 0 in previous question, it will be shown as above. This program will ask user
questions until they encountered with their problem.

At the end of every solution, program will ask user if they want to restart the diagnosis or abort.
If user enter 1 for yes, it will bring back user to the main question.

40
6.0 Conclusion

Based on our knowledge base and documentation earlier, we can safely conclude that all
our team members are finally understood all required elements and how to code them. By
knowing each rules more deeply, we can easily use this organized information for our next
implementation phase.

By having a clear semantic net, decision tree and rules as our knowledge representation,
we can spent more of our next implementation time with developing a clear program
functionality, where we can combine rules that we had created in design phase and use it to
build a robust program where all rules are clearly linked with each other’s.

By using all of our knowledge representation inside this report, we can create a program
without much problem by using guiding from lecturer and friends even though we discovered
that CLIPS apps is lacking of user-friendly.

41

You might also like