L # 3.4.2 – Rule Based Systems in Artificial Intelligence – Artificial Intelligence Full Course

2. Rule-Based Systems

Definition:
Rule-Based Systems make decisions or infer conclusions based on a predefined set of IF-THEN rules. These systems do not “learn” from data like machine learning but instead operate on logical reasoning.

Structure:

IF <condition> THEN <action>

Example:

IF temperature > 100°C THEN alert = "Overheat"
  • If the temperature rises above a certain point, the system detects it.
  • If it does, it generates an alert.

Key Components:

  1. Knowledge Base:
    Contains the set of IF-THEN rules.
    Example:
    • IF oil level < 20% THEN alert = “Low oil”
    • IF pressure > 150 PSI THEN action = “Shut down pump”
  2. Inference Engine:
    The part of the system that applies the rules to the data.
    • It checks the current input/facts (like sensor data).
    • It matches these facts to conditions in the rules.
    • It executes actions when conditions are met.

What is Sensor Data?

Sensor data means information collected by sensors — devices that detect physical conditions like temperature, pressure, speed, light, motion, etc.

In Rule-Based Systems:

Sensors are used to monitor real-world conditions, and the data they collect is used as input for the system to make decisions.

Examples of Sensor Data:

Type of Sensor What It AssessesSample Information
Sensor for temperature110°C is the heat level temperature
Sensor for pressure160 PSI (pounds per square inch) is the fluid/gas pressure
Sensor for oil levelThe amount of oil in the machine15% oil level
A motion sensorIdentification of movement motion = detected
A light sensorLevel of ambient light Low light

How It’s Used:

  1. Sensor collects data (e.g., oil level = 15%)
  2. Inference engine reads that data
  3. Checks against rules:
    • IF oil level < 20% THEN alert = "Low oil"
  4. Takes action (e.g., shows alert)

In Short:

Sensor data = real-world input for a rule-based system to make logical decisions.

What is Logical Reasoning?

Logical reasoning means using rules and facts to reach a conclusion in a step-by-step, rational way — just like how humans think logically.

In the context of Rule-Based Systems, logical reasoning means:

Following IF-THEN rules to make decisions based on given information (data or facts).

Example:

Assume we have the following rule:

"Overheat" is the alert if the temperature is higher than 100°C.

And the current fact is:

temperature = 110°C

The system uses logical reasoning to check:

  • Is 110 > 100? Yes → So the rule applies.
  • Therefore, trigger the action: alert = “Overheat”.

Why it’s called logical?

Because the decision was made by applying logic — no guessing, no learning — just pure step-by-step evaluation of conditions.

Use Cases:

  • Thermostats:
    IF temperature < 18°C THEN turn_on = “Heater”
  • Industrial Automation:
    IF conveyor belt speed > threshold THEN reduce_speed()
  • Diagnostic equipment (for automobiles, machinery, and medical devices):
    “Engine Overheating” will be the alert if engine_temp is greater than 120°C.
  • Access Control Systems:
    IF ID not in database THEN deny_access
  • Smart Home Systems:
    IF motion_detected AND time = night THEN turn_on = “Lights”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top