Download presentation
Presentation is loading. Please wait.
1
Artificial Intelligence CIS 342
The College of Saint Rose David Goldschmidt, Ph.D.
2
Fuzzy Logic Expert knowledge often uses vague and inexact terms
Fuzzy Logic describes fuzziness by specifying degrees e.g. degrees of height, speed, distance, temperature, beauty, intelligence, etc.
3
Fuzzy Logic Unlike Boolean logic, fuzzy logic is multi-valued
Fuzzy logic represents degrees of membership and degrees of truth Things can be part true and part false at the same time
4
Linguistic Variables A linguistic variable is a fuzzy variable
e.g. the fact “John is tall” implies linguistic variable “John” takes the linguistic value “tall” Use linguistic variables to form fuzzy rules: IF ‘project duration’ is long THEN risk is high IF risk is very high THEN ‘project funding’ is very low
5
Qualifiers & Hedges What about linguistic values with qualifiers?
e.g. very tall, extremely short, etc. Hedges are qualifying terms that modify the shape of fuzzy sets e.g. very, somewhat, quite, slightly, extremely, etc.
6
Representing Hedges
7
Representing Hedges
8
Representing Hedges
9
Representing Hedges
10
Linguistic Variables & Hedges
write a function or method called very() that modifies the degree of membership e.g. double x = very( tall( 185 ) ); Linguistic Variables & Hedges
11
Crisp Set Operations Crisp set operations developed by Georg Cantor in the late 19th century:
12
Crisp Set Operations Crisp set operations developed by Georg Cantor in the late 19th century (continued):
13
Fuzzy Set Operations Complement
To what degree do elements not belong to this set? m¬A(x) = 1 – mA(x)
14
Fuzzy Set Operations Containment Which sets belong to other sets?
Each element of the fuzzy subset has smaller membership than in the containing set
15
mA∩B(x) = min[ mA(x), mB(x) ]
Fuzzy Set Operations Intersection To what degree is the element in both sets? mA∩B(x) = min[ mA(x), mB(x) ]
16
mAB(x) = max[ mA(x), mB(x) ]
Fuzzy Set Operations Union To what degree is the element in either or both sets? mAB(x) = max[ mA(x), mB(x) ]
17
Fuzzy Rules 1965 paper: “Fuzzy Sets” (Lotfi Zadeh)
Apply natural language terms to a formal system of mathematical logic 1973 paper outlined a new approach to capturing human knowledge and designing expert systems using fuzzy rules
18
Fuzzy Rules A fuzzy rule is a conditional statement in the familiar form: IF x is A THEN y is B x and y are linguistic variables A and B are linguistic values determined by fuzzy sets on the universe of discourses X and Y, respectively
19
Linguistic Variables A linguistic variable is a fuzzy variable
e.g. the fact “John is tall” implies linguistic variable “John” takes the linguistic value “tall” Use linguistic variables to form fuzzy rules: IF ‘project duration’ is long THEN ‘risk’ is high IF risk is very high THEN ‘project funding’ is very low
20
Fuzzy Expert Systems A fuzzy expert system is an expert system that uses fuzzy rules, fuzzy logic, and fuzzy sets Many rules in a fuzzy logic system will fire to some extent If the antecedent is true to some degree of membership, then the consequent is true to the same degree
21
Fuzzy Expert Systems Two distinct fuzzy sets describing tall and heavy:
22
Fuzzy Expert Systems IF height is tall THEN weight is heavy
23
Fuzzy Expert Systems Other examples (multiple antecedents):
e.g. IF ‘project duration’ is long AND ‘project staffing’ is large AND ‘project funding’ is inadequate THEN risk is high e.g. IF service is excellent OR food is delicious THEN tip is generous
24
Fuzzy Expert Systems Other examples (multiple consequents):
e.g. IF temperature is hot THEN ‘hot water’ is reduced; ‘cold water’ is increased
25
Fuzzy Inference Named after Ebrahim Mamdani, the Mamdani method for fuzzy inference is: 1. Fuzzify the input variables 2. Evaluate the rules 3. Aggregate the rule outputs 4. Defuzzify
26
Fuzzy Inference – Example
x, y, and z are linguistic variables A1, A2, and A3 are linguistic values on X B1 and B2 are linguistic values on Y C1, C2, and C3 are linguistic values on Z Fuzzy Inference – Example Rule 1: IF x is A3 OR y is B1 THEN z is C1 Rule 2: IF x is A2 AND y is B2 THEN z is C2 Rule 3: IF x is A1 THEN z is C3 Rule 1: IF ‘project funding’ is adequate OR ‘project staffing’ is small THEN risk is low Rule 2: IF ‘project funding’ is marginal AND ‘project staffing’ is large THEN risk is normal Rule 3: IF ‘project funding’ is inadequate THEN risk is high
27
Fuzzy Inference – Example
1. Fuzzification project funding project staffing inadequate small marginal large
28
Fuzzy Inference – Example
2. Rule 1 evaluation risk project staffing project funding adequate small low
29
Fuzzy Inference – Example
2. Rule 2 evaluation project funding project staffing risk marginal large normal
30
Fuzzy Inference – Example
2. Rule 3 evaluation risk project funding inadequate high
31
Fuzzy Inference – Example
3. Aggregation of the rule outputs risk low normal high
32
Fuzzy Inference – Example
4. Defuzzification e.g. use the centroid method in which a vertical line slices the aggregate set into two equal halves How can we calculate this?
33
Fuzzy Inference – Example
4. Defuzzification Calculate the centre of gravity (cog): x dx
34
Fuzzy Inference – Example
4. Defuzzification Use a reasonable sampling of points
35
Applications of Fuzzy Logic
Why use fuzzy expert systems or fuzzy control systems? Apply fuzziness (and therefore accuracy) to linguistically defined terms and rules Lack of crisp or concrete mathematical models exist When do you avoid fuzzy expert systems? Traditional approaches produce acceptable results Crisp or concrete mathematical models exist and are easily implemented
36
Applications of Fuzzy Logic
Real-world applications include: Control of robots, engines, automobiles, elevators, etc. Cruise-control in automobiles Temperature control Reduce vibrations in camcorders Handwriting recognition, OCR Predictive and diagnostic systems (e.g. cancer)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.