Lecture 08.2: Fuzzy Expert Systems
Handling vagueness and ambiguity using Fuzzy Logic, membership functions, and the four steps of Fuzzy Inference.
In classical Boolean logic, everything is crisp: a statement is either True () or False (). However, human experts rarely think in binary. An expert might say:
"Though the power transformer is slightly overloaded, I can keep this load for a while."
While another human expert easily understands this statement, a knowledge engineer faces immense difficulty representing such vague and ambiguous terms in traditional binary computer logic.
Fuzzy Logic, introduced by Lotfi Zadeh (Professor and Head of Electrical Engineering at UC Berkeley) in his landmark 1965 paper "Fuzzy sets", resolves this challenge by formalizing fuzziness—mirroring the intrinsic way people think, make decisions, and interpret natural language qualifiers.
Crisp Sets vs. Fuzzy Sets
Unlike two-valued Boolean logic, fuzzy logic is multi-valued, dealing in Degrees of Membership where truth values range continuously in the interval .
Logical Value Range: Crisp vs. Fuzzy
- Boolean (Crisp) Logic: Binary step-threshold (Black or White, ).
- Fuzzy Logic: Continuous multi-valued spectrum (Shades of Grey, ).
The Boundary Problem: Degree of Membership of 'Tall Men'
Consider evaluating a group of individuals to determine whether they belong to the set of "Tall Men". Under a crisp definition, anyone is considered tall (), and anyone is not ().
| Name | Height (cm) | Crisp Membership () | Fuzzy Membership () |
|---|---|---|---|
| Chris | 208 | 1 | 1.00 |
| Mark | 205 | 1 | 1.00 |
| John | 198 | 1 | 0.98 |
| Tom | 181 | 1 | 0.82 |
| David | 179 | 0 | 0.78 |
| Mike | 172 | 0 | 0.24 |
| Bob | 167 | 0 | 0.15 |
| Steven | 158 | 0 | 0.06 |
| Bill | 155 | 0 | 0.01 |
| Peter | 152 | 0 | 0.00 |
[!IMPORTANT] The Crisp Boundary Paradox: Under crisp logic, Tom (181 cm) is tall (), whereas David (179 cm) is NOT tall (), despite a negligible 2 cm height difference. Fuzzy set theory eliminates this artificial boundary by assigning Tom a membership degree of and David .
Set Representation & Zadeh's Notation
1. Mathematical Definitions
- Crisp Set: Membership function is strictly binary:
- Fuzzy Set: Membership function is a continuous mapping:
2. Zadeh's Notation for Discrete Fuzzy Sets
A discrete fuzzy set is represented using Zadeh's Notation:
[!CAUTION] Zadeh Notation Interpretation:
- The slash
/is not division; it links membership degree to element ().- The
+and symbols represent set union, not arithmetic addition.
- Crisp Example:
- Fuzzy Example:
3. Multi-Membership Example: Body Temperature
A patient with a body temperature of can belong to multiple fuzzy sets concurrently:
At , the patient has raised temperature to degree and strong fever to degree .
Linguistic Variables and Values
- Linguistic Variable: A variable whose values are words or natural language phrases (e.g.,
Project Funding,Project Staffing,Risk). - Linguistic Value: The fuzzy set labels qualifying the linguistic variable.
| Linguistic Variable | Typical Linguistic Values (Fuzzy Sets) |
|---|---|
| Project Funding () | Inadequate (), Marginal (), Adequate () |
| Project Staffing () | Small (), Large () |
| Risk Level () | Low (), Normal (), High () |
The Four Steps of Fuzzy Inference
Fuzzy inference formulates a mapping from crisp inputs to a crisp output through four sequential steps:
Step-by-Step Benchmark: Project Risk Evaluation (2 Inputs, 1 Output)
Rules in the Knowledge Base
| Rule ID | Abstract Formulation | Concrete Problem Formulation |
|---|---|---|
| Rule 1 | IF is OR is THEN is | IF project_funding is adequate OR project_staffing is small THEN risk is low |
| Rule 2 | IF is AND is THEN is | IF project_funding is marginal AND project_staffing is large THEN risk is normal |
| Rule 3 | IF is THEN is | IF project_funding is inadequate THEN risk is high |
Step 1: Fuzzification
Given crisp numerical inputs (project_funding) and (project_staffing), we determine their degree of membership in each linguistic fuzzy set:
- Project Funding ():
- (
inadequate) - (
marginal) - (
adequate)
- (
- Project Staffing ():
- (
small) - (
large)
- (
Step 2: Rule Evaluation
We evaluate rule antecedents using standard fuzzy logic operators:
- Fuzzy Disjunction (OR / Optimistic): Evaluated using the maximum operator ().
- Fuzzy Conjunction (AND / Pessimistic): Evaluated using the minimum operator ().
Evaluating Rule Antecedents:
- Rule 1 (Disjunction): IF is () OR is ():
- Rule 2 (Conjunction): IF is () AND is ():
- Rule 3 (Single Antecedent): IF is ():
Step 3: Aggregation
Aggregation is the process of unifying the outputs of all fuzzy rules into a single aggregate fuzzy set. Applying the evaluated antecedent truths to their respective consequent membership curves yields an overall risk output profile:
Low Risk() to degreeNormal Risk() to degreeHigh Risk() to degree
Step 4: Defuzzification
Defuzzification converts the aggregate output fuzzy set into a single crisp numerical value.
Using the Centroid Method (finding the center of gravity of the combined area under the curve), the aggregate fuzzy risk profile is converted into a definitive risk index:
Concluding Remarks
Fuzzy Expert Systems bridge the gap between human natural reasoning and precise computer algorithms. While traditional rule-based systems require rigid binary boundaries, fuzzy systems accommodate vagueness and linguistic terms seamlessly. However, designing fuzzy systems requires careful domain expertise to define membership function shapes and rule sets appropriately.
Lecture 08.1: Rule-Based Expert Systems
An introduction to Expert Systems, their architecture, and the mechanics of Forward and Backward Chaining.
Lecture 09.1: Knowledge-Based Agents and Logic
Exploring how AI agents use explicit knowledge representation, Propositional Logic, and First-Order Logic to reason about the world.