Ai Unit5 Notes
Ai Unit5 Notes
Artificial Intelligence is a piece of software that simulates the behaviour and
judgement of a human or an organization that has experts in a particular domain is
known as an expert system. It does this by acquiring relevant knowledge from its
knowledge base and interpreting it according to the user’s problem. The data in the
knowledge base is added by humans that are expert in a particular domain and this
software is used by a non-expert user to acquire some information. It is widely
used in many areas such as medical diagnosis, accounting, coding, games etc.
An expert system is AI software that uses knowledge stored in a knowledge base to
solve problems that would usually require a human expert thus preserving a human
expert’s knowledge in its knowledge base. They can advise users as well as
provide explanations to them about how they reached a particular conclusion or
advice. Knowledge Engineering is the term used to define the process of building
an Expert System and its practitioners are called Knowledge Engineers. The
primary role of a knowledge engineer is to make sure that the computer possesses
all the knowledge required to solve a problem. The knowledge engineer must
choose one or more forms in which to represent the required knowledge as a
symbolic pattern in the memory of the computer.
Example : There are many examples of an expert system. Some of them are given
below –
MYCIN –
One of the earliest expert systems based on backward chaining. It can identify
various bacteria that can cause severe infections and can also recommend drugs
based on the person’s weight.
DENDRAL –
It was an artificial intelligence-based expert system used for chemical analysis.
It used a substance’s spectrographic data to predict its molecular structure.
R1/XCON –
It could select specific software to generate a computer system wished by the
user.
PXDES –
It could easily determine the type and the degree of lung cancer in a patient
based on the data.
CaDet –
It is a clinical support system that could identify cancer in its early stages in
patients.
DXplain –
It was also a clinical support system that could suggest a variety of diseases
based on the findings of the doctor.
Components of an Expert System :
Knowledge Base –
The knowledge base represents facts and rules. It consists of knowledge in a
particular domain as well as rules to solve a problem, procedures and intrinsic
data relevant to the domain.
Inference Engine –
The function of the inference engine is to fetch the relevant knowledge from the
knowledge base, interpret it and to find a solution relevant to the user’s
problem. The inference engine acquires the rules from its knowledge base and
applies them to the known facts to infer new facts. Inference engines can also
include an explanation and debugging abilities.
Knowledge Acquisition and Learning Module –
The function of this component is to allow the expert system to acquire more
and more knowledge from various sources and store it in the knowledge base.
User Interface –
This module makes it possible for a non-expert user to interact with the expert
system and find a solution to the problem.
Explanation Module –
This module helps the expert system to give the user an explanation about how
the expert system reached a particular conclusion.
The Inference Engine generally uses two strategies for acquiring knowledge from
the Knowledge Base, namely –
Forward Chaining
Backward Chaining
Forward Chaining –
Forward Chaining is a strategic process used by the Expert System to answer the
questions – What will happen next. This strategy is mostly used for managing tasks
like creating a conclusion, result or effect. Example – prediction or share market
movement status.
Forward Chaining
Backward Chaining –
Backward Chaining is a strategy used by the Expert System to answer the
questions – Why this has happened. This strategy is mostly used to find out the
root cause or reason behind it, considering what has already happened. Example –
diagnosis of stomach pain, blood cancer or dengue, etc.
Backward Chaining
Limitations :
Do not have human-like decision-making power.
Cannot possess human capabilities.
Cannot produce correct result from less amount of knowledge.
Requires excessive training.
Advantages :
Low accessibility cost.
Fast response.
Not affected by emotions, unlike humans.
Low error rate.
Capable of explaining how they reached a solution.
Disadvantages :
The expert system has no emotions.
Common sense is the main issue of the expert system.
It is developed for a specific domain.
It needs to be updated manually. It does not learn itself.
Not capable to explain the logic behind the decision.
Applications :
The application of an expert system can be found in almost all areas of business or
government. They include areas such as –
Different types of medical diagnosis like internal medicine, blood diseases and
show on.
Diagnosis of the complex electronic and electromechanical system.
Diagnosis of a software development project.
Planning experiment in biology, chemistry and molecular genetics.
Forecasting crop damage.
Diagnosis of the diesel-electric locomotive system.
Identification of chemical compound structure.
Scheduling of customer order, computer resources and various manufacturing
task.
Assessment of geologic structure from dip meter logs.
Assessment of space structure through satellite and robot.
The design of VLSI system.
Teaching students specialize task.
Expert systems success factors
The type of application
Importance of the system to business strategy
Early, key, successful development
Having a champion
Existence of an information technology strategy
Quality of domain experts
Competent knowledge engineers
Management support
Overall fit between ES and business strategy
Organizational culture may also have an effect.
Assessment of log including civil case evaluation, product liability etc.
1. Rule-Based Expert Systems: These systems use a collection of rules to make decisions. Rules
are created by human experts and guide the system’s reasoning process. An example is Mycin,
an expert system for diagnosing bacterial infections.
3. Fuzzy Expert Systems: Fuzzy expert systems handle imprecise or uncertain data using fuzzy
logic. This allows the system to reason with degrees of truth rather than binary values. Fuzzy expert
systems are useful in domains where precise measurements are difficult or subjective, such as
weather forecasting or risk assessment.
4. Neural Expert Systems: Neural expert systems utilize neural networks to learn from data through
training processes. Neural networks can recognize patterns and make predictions based on input
data. They are particularly effective in areas such as image recognition and natural language
processing.
5. Neuro-Fuzzy Expert Systems: Neuro-fuzzy expert systems combine elements of fuzzy logic and
neural networks to make decisions based on both numerical and linguistic information. These
systems excel in complex domains where uncertainty and imprecision are prevalent, such as
financial forecasting or traffic management.
Knowledge Engineering in First-order logic
What is knowledge-engineering?
The process of constructing a knowledge-base in first-order logic is called as knowledge-
engineering. In knowledge-engineering, someone who investigates a particular domain, learns
important concept of that domain, and generates a formal representation of the objects, is
known as knowledge engineer.
In this topic, we will understand the Knowledge engineering process in an electronic circuit
domain, which is already familiar. This approach is mainly suitable for creating special-
purpose knowledge base.
Following are some main steps of the knowledge-engineering process. Using these steps, we
will develop a knowledge base which will allow us to reason about digital circuit (One-bit full
adder) which is given below
At the first level or highest level, we will examine the functionality of the circuit:
At the second level, we will examine the circuit structure details such as:
3. Decide on vocabulary:
The next step of the process is to select functions, predicate, and constants to represent the
circuits, terminals, signals, and gates. Firstly we will distinguish the gates from each other and
from other objects. Each gate is represented as an object which is named by a constant, such
as, Gate(X1). The functionality of each gate is determined by its type, which is taken as
constants such as AND, OR, XOR, or NOT. Circuits will be identified by a predicate: Circuit
(C1).
For gate input, we will use the function In(1, X1) for denoting the first input terminal of the
gate, and for output terminal we will use Out (1, X1).
The function Arity(c, i, j) is used to denote that circuit c has i input, j output.
The connectivity between gates can be represented by predicate Connect(Out(1, X1), In(1,
X1)).
We use a unary predicate On (t), which is true if the signal at a terminal is on.
To encode the general knowledge about the logic circuit, we need some following rules:
o If two terminals are connected then they have the same input signal, it can be
represented as:
1. ∀ t1, t2 Terminal (t1) ∧ Terminal (t2) ∧ Connect (t1, t2) → Signal (t1) = Signal (2).
o Signal at every terminal will have either value 0 or 1, it will be represented as:
1. ∀ t Terminal (t) →Signal (t) = 1 ∨Signal (t) = 0.
o Output of AND gate will be zero if and only if any of its input is zero.
1. ∀ g Gate(g) ∧ Type(g) = XOR → Signal (Out(1, g)) = 1 ⇔ Signal (In(1, g)) ≠ Signal (In(2,
g)).
o All the gates in the above circuit have two inputs and one output (except NOT gate).
For the given circuit C1, we can encode the problem instance in atomic sentences as below:
Since in the circuit there are two XOR, two AND, and one OR gate so atomic sentences for
these gates will be:
1. For XOR gate: Type(x1)= XOR, Type(X2) = XOR
2. For AND gate: Type(A1) = AND, Type(A2)= AND
3. For OR gate: Type (O1) = OR.
In this step, we will find all the possible set of values of all the terminal for the adder circuit.
The first query will be:
What should be the combination of input which would generate the first output of circuit C1,
as 0 and a second output to be 1?
1. ∃ i1, i2, i3 Signal (In(1, C1))=i1 ∧ Signal (In(2, C1))=i2 ∧ Signal (In(3, C1))= i3
2. ∧ Signal (Out(1, C1)) =0 ∧ Signal (Out(2, C1))=1
Identification
Conceptualization
Formalization
Implementation
Testing
Challenges
Complexity of Knowledge
Knowledge possessed by experts is complex as most of it is tacit, and hence cannot be
captured without converting tacit knowledge to explicit knowledge (externalization), which is
very difficult. The only way to represent tacit knowledge is by representing only the most
relevant and important aspects of a specific expert domain.
Experts value their knowledge as it is the main source of their command or power in their
field. This makes them reluctant to share their knowledge with other experts in their own
field as well as knowledge engineers. Some experts may fail to provide full details, so that
they may remain competitive in their field, while others may fear being replaced by expert
systems.
Subjective Knowledge
When acquiring knowledge from different experts, they may provide highly arguable and
subjective knowledge. It is difficult to map this inter-subjectivity, to recognize mutual
understanding as well as conflicts, to come up with subjectivity-free domain-specific
knowledge.
Expert availability
Experts always have a tight schedule, with their expertise being critically required by their
clients, organizations and professional bodies. This makes it hard for knowledge engineers to
get valuable time with the experts, which means that the knowledge engineers have to be very
accurate when asking questions as well as representing the solutions, to make the most out of
that time. Unavailability of an expert may force the knowledge engineer to employ the
protocol analysis technique (Being present as the experts think out loud as they perform their
tasks, and recording the process for later analysis).
Rule development
Knowledge engineers need to create rules to make it easy to characterize knowledge during
knowledge acquisition. This might be difficult especially when the knowledge engineer is
drafting a rule base, stable enough to be used to gather feedback in structured knowledge
acquisition techniques