0% found this document useful (0 votes)
3 views7 pages

Samta Rule Based System Notes.docx

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 7

Rule Based Systems

A rule-based system is a system that applies human-made rules to store, sort and
manipulate data. In doing so, it mimics human intelligence.
Rule-based systems require a set of facts or source of data, and a set of rules for manipulating
that data. These rules are sometimes referred to as ‘If statements’ as they tend to follow the line of
‘IF X happens THEN do Y’.
The steps can be simplified to:

● First comes the data or new business event


● Then comes the analysis: the part where the system conditionally processes the data
against its rules
● Then comes any subsequent automated follow-up actions

Some of the important elements of rule-based systems include:

A set of facts
These facts are assertions or anything that is relevant to the beginning state of the system.

Set of Rules
This set contains all the actions that should be performed within the scope of a problem and
defines how to act on the assertion set. In the set of rules facts are represented in an IF-THEN
form.

Termination Criteria or Interpreter


This determines whether a solution exists or not and figures out when the process should be
terminated.
⮚ What are the characteristics of rule-based systems?
Some of the features of rule-based systems are:

1. They are made up of the combined knowledge of human experts in the problem domain.
2. They represent knowledge in a very declarative manner.
3. They make it possible to use various knowledge representations paradigms.
4. They support the implementation of non-deterministic search and control strategies.
5. They help in describing fragmentary, ill-structured, heuristic, judgemental knowledge.
6. They are robust and have the ability to operate using uncertain or incomplete knowledge.
7. They can help with rule based decision making.

⮚ How does a rule based system in AI work?


Rule-based systems outlines triggers & the actions that should follow (or are triggered). For
example, a trigger might be an email containing the word “invoice”. An action might then be to
forward the email to the finance team.

These rules most often take the form of "if" statements. "IF" outlines the trigger, "THEN" specifies
the action to complete. So, if you want to create a rule-based system capable of handling 100
different actions, you’d have to write 100 different rules. If you want to then update the system and
add actions, then you would need to write new rules.

In short, you use rules to tell a machine what to do, and the machine will do exactly as you
tell it. From there, rule-based systems will execute the actions until you tell it to stop.

But remember: if you tell it to do something incorrectly, it will do it incorrectly.

⮚ What are the main components of a rules-based system?

A typical rule-based system has seven basic components:

The knowledge base


It holds the domain knowledge that is necessary for problem solving. In a rules-based system, the
knowledge gets represented as a set of rules. Every rule specifies a relation, recommendation,
directive, strategy or heuristic and has the IF (condition) THEN (action) structure. As soon as the
condition part of the rule is satisfied, the rule gets triggered and the action part gets executed.

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.

The inference engine


The inference engine is used to perform 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. The inference engine is also known as the
semantic reasoner. It infers information or performs required actions on the basis of input and the
rule base that's present in the knowledge base. The semantic reasoner involves a
match-resolve-act cycle that works like this:

● 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.
● Conflict-Resolution - After the production system is matched, one of the production
instances in the conflict is selected for execution for the purpose of determining the
progress of the process.
● Act - The production instance selected in the previous stage is s executed, impacting the
contents of the working memory.

Explanation facilities
The explanation facilities make it possible for the user to ask the expert system how a specific
conclusion was reached and why a specific fact is required. The expert system needs to be able to
explain its reasoning and justify its advice, analysis, or conclusion.

User interface
The user interface is the means through which the user seeking a solution to a problem
communicates with the expert system. The communication should be as meaningful and friendly
as possible and the user interface should be as intuitive as possible.
These five elements are critical for any rule-based system. They are the core components of the
rule-based system. But the system might have some additional components as well. A couple of
these components could be the external interface and the working memory.

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.
Working memory
The working memory stores temporary information and data.

⮚ How are rules-based systems different from learning-based systems?


In contrast to Rule-Based Systems, Learning Systems observe data and continuously learn from
it.
That is, while Rules Based Systems quickly become out of date, Learning Systems automatically
improve over time. And Learning Systems improve without the massive expense of having people
maintain complex rules.
Learning systems find patterns and treat similar things similarly. Think of how Netflix or Hulu keep
track and learn from what you watch, and then compare it to what people like you watch to make
recommendations and keep you binge-watching. There is some complexity in execution, but it's a
much simpler concept. And a concept more in line with how humans also learn.
Finally, Learning Systems' results are necessarily more measurable. It's the only way they can
improve over time; because if they cannot measure results, they could not learn what actions are
better and what actions are worse.

⮚ Construction of rule-based systems


Data-based construction follows a machine learning method, which is in general
domain-independent. Machine learning techniques can be categorized into two sub-types:
supervised learning and unsupervised learning.
Supervised learning means learning with assistance. This is because all instances from a data set
are labeled. This type of learning aims to predict attribute values for unknown instances by using
the known data instances. The predicted value of an attribute may be either discrete or continuous
in the construction. Therefore, supervised learning could be involved in both classification and
regression tasks that can be used for categorical prediction and numerical prediction respectively.
On the other hand, unsupervised learning means learning without any assistance. This is because
all instances from a data set are unlabeled. This type of learning aims to find earlier unknown
patterns from data sets. It includes association, which aims to find relationships among attributes
about their values, and clustering, which aims to find a group of objects that are similar from data
sets.
In general, all three types of rule-based systems can be constructed with the following steps: Data
collection->Data pre-processing->Learning from data->Testing. However, there are different
requirements for different learning tasks.
In other words, to build a high-quality model by using machine learning techniques, it is important
to find algorithms that are suitable for the chosen data sets concerning the characteristics of data.
From this point of view, data preprocessing may not be necessary if the chosen algorithms are
good fits. In addition, different types of dimensionality reduction techniques (such as feature
selection), a type of data preprocessing, may be required for different tasks. If it is a classification
or regression task, supervised feature selection techniques may be required in general.
⮚ What are advantages of the rule-based system in AI?

1. A rule-based system is generally cost-efficient and accurate in terms of its results.


2. The outputs generated by the system are dependent on rules so the output responses are
stable and not random.
3. The coverage for different circumstances is less, whatever scenarios are covered by the
Rule Based system will provide high accuracy. The error rate goes down because of the
predefined rules.
4. It's feasible to reduce the amount of risk in terms of system accuracy.
5. Optimizing the speed of the system is easier as you know all the parts. So providing instant
outputs, is not a big issue.

⮚ What are the disadvantages of the rule-based system in AI?

1. A rule-based system is built upon a lot of data, deep knowledge of the domain, and a lot of
manual work.
2. Writing and generating rules for a complex system is quite challenging and
time-consuming.
3. The self-learning capacity in a rule-based system is less as it generates the result as per
the rules.
4. Complex pattern identification is a challenging task in the Rule Based method as it takes a
lot of time and analysis.
Applications of Rule-based Systems
Healthcare, finance, and engineering are just a few examples of the sectors and applications that use
rule-based systems. Following are some instances of a rule-based system in AI:

1. Medical Diagnosis: Based on a patient's symptoms, medical history, and test findings, a rule-based
system in AI can make a diagnosis. The system can make a diagnosis by adhering to a series of
guidelines developed by medical professionals.
2. Fraud Detection: Based on particular criteria, such as the transaction's value, location, and time of
day, a rule-based system in AI can be used to spot fraudulent transactions. The system, for the
additional examination, can then flag the transaction.
3. Quality Control: A rule-based system in AI can ensure that products satisfy particular quality
standards. Based on a set of guidelines developed by quality experts, the system can check for flaws.
4. Decision support systems: They are created to aid decision-making, such as choosing which assets
to buy or what to buy.
Examples of industries that have used rule-based expert systems:

1. Healthcare: Rule-based expert systems have been used in healthcare to provide medical diagnosis
and treatment recommendations.

▪ For example, MYCIN, a rule-based expert system developed in the 1970s, was designed to assist
physicians in the diagnosis and treatment of bacterial infections.
▪ Another example is Dxplain, which uses a rule-based approach to assist physicians in diagnosing
medical conditions.

2. Finance: Rule-based expert systems used in finance to provide investment advice and financial
analysis.

▪ For example, FICO’s credit scoring system is a rule-based expert system that uses credit history
and other financial data to assess creditworthiness.
▪ Another example is the LegalRuleML, a rule-based system for legal decision making.

3. Manufacturing :- Used to improve production processes and optimize supply chain management.

▪ For example, General Electric used a rule-based expert system to optimize the production
process of its aircraft engines, resulting in significant cost savings and improved efficiency.

Below are some popular examples of the Expert System:

1. DENDRAL: It was an artificial intelligence project that was made as a chemical analysis expert
system. Used in organic chemistry to detect unknown organic molecules with the help of
their mass spectra and knowledge base of chemistry.
2. MYCIN: Earliest backward chaining expert systems designed to find the bacteria causing
infections like bacteraemia and meningitis. Also used for the recommendation of antibiotics and
the diagnosis of blood clotting diseases.
3. PXDES: used to determine the type and level of lung cancer. To determine the disease, it
takes a picture from the upper body, which looks like the shadow. This shadow identifies the type
and degree of harm.
4. CaDeT: Diagnostic support system that can detect cancer at early stages.

You might also like