Introduction To Rule - Based Systems
Introduction To Rule - Based Systems
Systems
By Dr. Samta Gajbhiye
Definition of Rule Based System
Rule-based system in artificial intelligence has brought us one step
closer to the dream of creating machines that can reason and make
decisions like humans.
6
Components of a rules-based system
7
Components of a rules-based system Cont…
A typical rule-based system has seven basic components:
2. The database
▪ The database has a set of facts that are used to compare against the IF (condition)
part of the rules that are held in the knowledge base.
3. Explanation facilities
▪ The expert system needs to be able to explain its reasoning and justify its advice,
analysis, or conclusion.
4. User interface
▪ Through which the user seeking a solution to a problem communicates with the
expert system.
8
Components of a rules-based system Cont…
5. External interface
▪ The external interface enables an expert system to work with external data files
and programs that are written in conventional programming languages like C,
Pascal, FORTRAN and Basic.
6. Working memory
▪ Performs the reasoning through which the expert system comes to a solution.
▪ The job of the inference engine is to link the rules that are defined in the
knowledge base with the facts that are stored in the database.
▪ It infers information or performs required actions on the basis of input and the rule
base that's present in the knowledge base.
9
Components of a rules-based system
Cont…
✔ Match - A section of the production rule system gets matched with the contents
of the working memory to gain a conflict, where there are several instances of
the satisfied productions.
10
Advantages of using a rule-based approach
One of the main advantages of using a rule-based approach is its transparency and
interpretability. Since the rules are derived from the knowledge of human experts, the
decision-making process can be easily understood and explained.
It can be easier to maintain and update compared to other AI models that use more complex
algorithms.
In the rule-based approach, the rules can be easily modified or updated based on new
information or changing requirements. This makes it more flexible and adaptable to changes
in the environment.
11
Disadvantages of using a rule-based approach
2. If a situation is not covered by the rules, the system may not be able to provide an
accurate solution.
3. Additionally, in cases where the rules are incomplete or incorrect, the system may
provide inaccurate or incomplete solutions
12
How impactful are rule-based expert systems on
their respective industries?
The impact of rule-based expert systems on their respective industries can be significant.
Rule-based systems can provide faster and more accurate decision-making, resulting in
increased efficiency and productivity.
They can also provide consistent and reliable solutions, reducing the risk of errors and
improving overall quality.
Additionally, rule-based expert systems can reduce the need for human experts in certain
areas, resulting in cost savings and increased scalability.
Note that rule-based expert systems are not always a replacement for human experts, and
should be used as a tool to enhance human decision-making.
13
Machine learning : Alternative Approach
A system designed to achieve AI utilizing the power of machine learning (ML) is known as
a machine learning model.
Machine learning systems are designed to define its own set of rules based on data outputs
it has access to, without human intervention.
By only taking the outputs from data or experts, ML systems thus utilise a probabilistic
approach: one that takes into account variations and probabilities to create informed
results.
Rules-based systems:
▪ Suited to projects and applications that require small amounts of data and simple,
straightforward rules.
▪ Great for repetitive processes that require little-to-no human decision making, such
as fault analysis, email routing using triggers, and basic searching, among many
others.
▪ Great if you need information quickly, as the limited parameters of the systems allow
for speedy results.
▪ Used in processes where errors cannot be tolerated, such as medical diagnosis and
finance processing.
15
Choosing the right approach Cont….
Machine learning systems:
▪ Used when large volumes of relevant data records are available for making more
accurate predictions.
▪ For any processes that have multiple factors, situations, numerous potential outcomes,
ML systems are your best bet.
▪ ML systems are used when you are required to predict an outcome but do not
necessarily know how to do so.
▪ For example, ML systems are great for sales lead qualifications and customer support
automated responses — any situations that have multi-variables.
▪ YouTube and Netflix auto-suggestions: algorithms learn from your activity and are
trained to assess your preferences and suggest content based on your preferences.
16
Choosing the right approach Cont….
Best of both
▪ There are some systems available that combine rules-based AI systems with ML
▪ This comes in the form of rule-based machine learning (RBML) systems that are able
Summary
▪ If you are in need of precision within a relatively small framework parameter then
▪ If, on the other hand, you have access to large amounts of data and need to predict
something, then ML systems are your best bet.
▪ If, however, you have business needs that require both precision and large data
processing used to inform predictions and forecasting, then a hybrid approach may
17
very well be what you are after.
Comparison with other AI approaches
Include machine learning, deep learning, and natural language processing.
Key differences between the rule-based approach and other AI approaches:
▪ Machine learning: Machine learning is an approach in AI that involves the use of
algorithms to learn patterns from data. In machine learning, the system is trained on a
large dataset and uses statistical models to make predictions or decisions about new
data.
▪ Deep learning: Deep learning is a subset of machine learning that involves the use of
neural networks to learn from data. In deep learning, the system is trained on a large
dataset using multiple layers of artificial neurons. Deep learning is often used in
applications that require image recognition, speech recognition, and natural language
processing.
▪ Natural language processing: Interaction between computers and humans using natural
language.
✔ NLP involves the use of algorithms and techniques to analyze, understand, and
generate human language and often used in applications such as chatbots, virtual
18
assistants, and sentiment analysis.
Rules of Inference
20
Rules of Inference Cont…..
⚫ Some of the compound statements are equivalent to each other, which can be proved using
truth table:
⚫ Hence from the above truth table, we can prove that P → Q is equivalent to ¬ Q → ¬ P, and Q→
P is equivalent to ¬ P → ¬ Q.
21
Rules of Inference Cont…..
Types of Inference rules:
1. Modus Ponens:
Example:
23
Rules of Inference Cont…..
3. Hypothetical Syllogism
The Hypothetical Syllogism rule state that if P→R is true whenever P→Q
is true, and Q→R is true. It can be represented as the following notation:
P → Q, Q→ R
P→R
Example:
24
Rules of Inference Cont…..
4. Disjunctive Syllogism:
The Disjunctive syllogism rule state that if P∨Q is true, and ¬P is true,
then Q will be true. It can be represented as:
Example:
Proof by truth-table:
25
Rules of Inference Cont…..
5. Addition:
The Addition rule is one the common inference rule, and it states that
If P is true, then P∨Q will be true.
Example:
⚫ Proof by Truth-Table:
26
Rules of Inference Cont…..
6. Simplification:
Proof by Truth-Table:
27
Rules of Inference Cont…..
7. Resolution:
The Resolution rule state that if P∨Q and ¬ P∧R is true, then Q∨R
will also be true.
It can be represented as
Proof by Truth-Table:
28
Applications of Rule-based Systems
29
examination, can then flag the transaction.
Applications of Rule-based Systems
Cont…
30
Rule-based expert system examples
31
Rule-based expert system examples
Cont..
system that uses credit history and other financial data to assess
creditworthiness.
chemistry.
which looks like the shadow. This shadow identifies the type and
degree of harm.
stages.
34
Thank You
35