Assignment No 2 Artificial Intelligence Submitted to


Assignment No 2
Artificial Intelligence

Submitted to:
Mam FakhraSubmitted by:
Syeda Ayesha Gular (17240819-020)
Arish Naeem (17240819-022)
Rukhma Iqbal (17240819-019)
Campus: MargarClass: M.SC (CS-3rd)
Q: 1 Write a complete documentary on AI’s Expert System. Explain the following:
What is an expert system?
Expert System: The expert systems are the computer applications that are that are designed and developed to solve the complex problems in some particular domain, at the level of extra ordinary human expertise and intelligence.

Characteristics of expert Systems:
Following are some characteristics of expert systems:
Understandable
Highly responsive
Reliable
High performance
Capabilities of expert systems:
Some capabilities related to expert systems are listed below:
Explaining
Diagnosing
Interpreting input
Predicting results
Suggesting alternative options to a problem
Deriving a problem
Components of Expert System:
The components of an expert system are mentioned below:
Knowledge base
Interface engine
User interface
Expert System Limitations:
Expert systems are limited for the following:
Difficult knowledge acquisition
Expert system is difficult to maintain
High development cost
Five examples of Expert Systems:
Important examples related to expert systems included:
Schools
Chess Game
CaditMineral prospecting
Hospitals
Medical PXDES
Benefits and downsides of using Expert System.

Benefits of using an expert system are as follow:
Less Production Cost: The cost of expert systems is not high. Production cost is reasonable. This benefit of expert system makes them affordable.
Speed: The speed of expert system is very great and high. They reduce the amount of work. They do all the work in very short time and do efficient work.
Less Error Rate: Expert System is more intelligent than human, so they have less chances of error as compared to humans. Error rate is very less in expert systems.

Memory: It is the major benefit of using the expert system. Expert system has a lot of memory to store a huge amount of information, knowledge and data. And they all are accessible to them. There is no any chance of data loss.

Availability: Expert systems are all the time available. They have no need of drinking, sleeping or eating. They are available 24 hours.
Downsides of Expert Systems:
Downsides or Disadvantages of using an expert system are as follows:
Time: To set up an expert system takes a lot of time. It required a huge amount of time to acquire the knowledge that is needed to develop an expert system.

Emotionless: Expert systems are empty with any kind of emotions like human. Human have some feelings and human act and behave according to the situation but the expert systems have no emotion and feelings.

Data integrity: The expert systems are the systems that are developed by the human. So, expert system does not learn and act itself. We have to update the expert systems manually. So, data integrity is an important downside of using an expert system.

Specific: It is an important downside of the expert systems that they are specific. Expert systems are designed and developed according to some particular need. They can work only for some specific purposes whereas human experts can do all kind of work.

Differentiate between Rule based and Knowledge Based Expert System:
Rule based system Knowledge based system
It can process data rules. It can process data rules and knowledge.

It resulted as real-time decision Its output leads for information decisions.

Has a broad logic in domain scope Has a deep logic in domain scope
It usually used for initiative rules. It ordinarily used for departmental rules.

It is best for basic business rules. It is model for complex business rules
Rule represent in the system using IF-THEN structure It represent knowledge explicit via tools rather than the via code
Q2. Part-A Prove using forward chaining as well as backward chaining
Forward chaining
Using conflict strategy we will fire the in order they appear starting from first rule.

Facts(fact database) Rules triggered Rules fire(in order)
A,B,F 1,2 1
A,B,C,F 2 2
A,B,C,D,F 3 3
A,B,C,D,E,F 4,5 4
A,B,C,D,E,F,G 5 5
A,B,C,D,E,F,G,H 6 Stop
Rule1 added C in our database fact.

After this rule 2 is fired which leads us to the D in db facts.

Rule3 is triggered which adds E to our database facts.

Rule4 adds G and rule5 fires H. Hence H is our Goal.

Backward chaining
In backward chaining we will use goals database in addition to facts and rules database.

Facts Goals Rules matched
A,B,F H 5
A,B,F E 3
A,B,F C,D 1
A,B,C,F D 2
A,B,C,D,F STOP
Part-B Prove using Backward Chaining …Who is a Frog???
Using Forward chaining lets suppose:
Rules:
Rule1: If X crocks (A) AND eats flies (B) THEN X is frog(C) = A ? B ? C
Rule2: If X chirps (D) AND sings (E) THEN X is canary (F) = D ? E ? F
Rule3: if X is frog (C) THEN it is green (G) = C ? G
Rule4: if X is canary (F) THEN it is yellow(H) = F ? H
Facts:
Fact1: Fritz crocks = A
Fact2: Fritz eats flies = B
Fact3: Tweety chirps =D
Fact4: Tweety is yellow = H
Our goal is C
Facts Rules triggered Rules fire(in order)
A,B,D,H 1 1
A,B,C,D,H 2 STOP
Using backwards chaining:
In backward chaining we will use goals database in addition to facts and rules database.

Facts Goals Rules matched
A,B,D,H C 1
A,B,C,D,H Stop
Goal is achieved.