Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fuzzy Logic Artificial Intelligence Chapter 9. Outline Crisp Logic Fuzzy Logic Fuzzy Logic Applications Conclusion “traditional logic”: {true,false}

Similar presentations


Presentation on theme: "Fuzzy Logic Artificial Intelligence Chapter 9. Outline Crisp Logic Fuzzy Logic Fuzzy Logic Applications Conclusion “traditional logic”: {true,false}"— Presentation transcript:

1 Fuzzy Logic Artificial Intelligence Chapter 9

2 Outline Crisp Logic Fuzzy Logic Fuzzy Logic Applications Conclusion “traditional logic”: {true,false}

3 Crisp Logic Crisp logic is concerned with absolutes-true or false, there is no in-between. Example: Rule: If the temperature is higher than 80F, it is hot; otherwise, it is not hot. Cases: Temperature = 100F Temperature = 80.1F Temperature = 79.9F Temperature = 50F Not hot Hot

4 Membership function of crisp logic 80FTemperature HOT 1 If temperature >= 80F, it is hot (1 or true); If temperature < 80F, it is not hot (0 or false). 0 True False

5 Drawbacks of crisp logic The membership function of crisp logic fails to distinguish between members of the same set.

6 Conception of Fuzzy Logic Many decision-making and problem-solving tasks are too complex to be defined precisely however, people succeed by using imprecise knowledge Fuzzy logic resembles human reasoning in its use of approximate information and uncertainty to generate decisions.

7 Natural Language Consider: Joe is tall -- what is tall? Joe is very tall -- what does this differ from tall? Natural language (like most other activities in life and indeed the universe) is not easily translated into the absolute terms of 0 and 1. “ false ” “ true ”

8 Fuzzy Logic An approach to uncertainty that combines real values [0…1] and logic operations Fuzzy logic is based on the ideas of fuzzy set theory and fuzzy set membership often found in natural (e.g., spoken) language.

9 Example: “Young” Example: Ann is 28, 0.8 in set “Young” Bob is 35, 0.1 in set “Young” Charlie is 23, 1.0 in set “Young” Unlike statistics and probabilities, the degree is not describing probabilities that the item is in the set, but instead describes to what extent the item is the set.

10 Membership function of fuzzy logic Age 254055 YoungOld 1 Middle 0.5 DOM Degree of Membership Fuzzy values Fuzzy values have associated degrees of membership in the set. 0

11 Crisp set vs. Fuzzy set A traditional crisp setA fuzzy set

12 Crisp set vs. Fuzzy set

13 Benefits of fuzzy logic You want the value to switch gradually as Young becomes Middle and Middle becomes Old. This is the idea of fuzzy logic. the label “fuzzy logic” is used in two senses: (a) narrow sense: fuzzy logic is a logical system (b) wide sense: fuzzy logic is coextensive with fuzzy set theory Applications Control Business Finance

14 Fuzzy in control Control Rules: 1.If (speed is low) and (shift is high) then (-3) 2.If (speed is high) and (shift is low) then (+3) 3.If (throtis low) and (speed is high) then (+3) 4.If (throtis low) and (speed is low) then (+1) 5.If (throtis high) and (speed is high) then (-1) 6.If (throtis high) and (speed is low) then (-3)

15 Fuzzy Set Operations Fuzzy union (  ): the union of two fuzzy sets is the maximum (MAX) of each element from two sets. E.g. A = {1.0, 0.20, 0.75} B = {0.2, 0.45, 0.50} A  B = {MAX(1.0, 0.2), MAX(0.20, 0.45), MAX(0.75, 0.50)} = {1.0, 0.45, 0.75}

16 Fuzzy Set Operations Fuzzy intersection (  ): the intersection of two fuzzy sets is just the MIN of each element from the two sets. E.g. A = {1.0, 0.20, 0.75} B = {0.2, 0.45, 0.50} A  B = {MIN(1.0, 0.2), MIN(0.20, 0.45), MIN(0.75, 0.50)} = {0.2, 0.20, 0.50}

17 Fuzzy Set Operations The complement of a fuzzy variable with DOM x is (1-x). Complement ( _ c ): The complement of a fuzzy set is composed of all elements’ complement. Example. A = {1.0, 0.20, 0.75} A c = {1 – 1.0, 1 – 0.2, 1 – 0.75} = {0.0, 0.8, 0.25}

18 Crisp Relations Ordered pairs showing connection between two sets: (a,b): a is related to b (2,3) are related with the relation “<“ Relations are set themselves < = {(1,2), (2, 3), (2, 4), ….} Relations can be expressed as matrices <12 1  2   …

19 Fuzzy Relations Triples showing connection between two sets: (a,b,#): a is related to b with degree # Fuzzy relations are set themselves Fuzzy relations can be expressed as matrices …

20 Fuzzy Relations Matrices Example: Color-Ripeness relation for tomatoes R 1 (x, y)unripesemi riperipe green10.50 yellow0.310.4 Red00.21

21 Where is Fuzzy Logic used? Fuzzy logic is used directly in very few applications. Most applications of fuzzy logic use it as the underlying logic system for decision support systems.

22 Fuzzy Expert System Fuzzy expert system is a collection of membership functions and rules that are used to reason about data. Usually, the rules in a fuzzy expert system are have the following form: “if x is low and y is high then z is medium”

23 Operation of Fuzzy System Crisp Input Fuzzy Input Fuzzy Output Crisp Output Fuzzification Rule Evaluation Defuzzification Input Membership Functions Rules / Inferences Output Membership Functions

24 Fuzzification Two Inputs (x, y) and one output (z) Membership functions: low(t) = 1 - ( t / 10 ) high(t) = t / 10 LowHigh 1 0 t X=0.32Y=0.61 0.32 0.68 Low(x) = 0.68, High(x) = 0.32,Low(y) = 0.39, High(y) = 0.61 Crisp Inputs

25 Create rule base Rule 1: If x is low AND y is low Then z is high Rule 2: If x is low AND y is high Then z is low Rule 3: If x is high AND y is low Then z is low Rule 4: If x is high AND y is high Then z is high

26 Inference Rule1: low(x)=0.68, low(y)=0.39 => high(z)=MIN(0.68,0.39)=0.39 Rule2: low(x)=0.68, high(y)=0.61 => low(z)=MIN(0.68,0.61)=0.61 Rule3: high(x)=0.32, low(y)=0.39 => low(z)=MIN(0.32,0.39)=0.32 Rule4: high(x)=0.32, high(y)=0.61 => high(z)=MIN(0.32,0.61)=0.32 Rule strength

27 Composition LowHigh 1 0 t Low(z) = MAX(rule2, rule3) = MAX(0.61, 0.32) = 0.61 High(z) = MAX(rule1, rule4) = MAX(0.39, 0.32) = 0.39 0.61 0.39

28 Defuzzification Center of Gravity LowHigh 1 0 0.61 0.39 t Crisp output Center of Gravity

29 Fuzzy Relations

30 Ordered pairs showing connection between two sets Relations are sets themselves Expressed as matrices

31 Fuzzy Relations Value of the membership function, m R (x, y), for an element (x, y) of the relation R is the value at row x and column y in the relational matrix Shows degree of correspondence between x- qualities (color) and y-qualities (ripeness)

32 Fuzzy Relations Matrices Color – ripeness relation for tomatoes

33 Fuzzy Relations Matrices Ripeness - taste relation for tomatoes

34 Fuzzy Relations Matrices Color - taste relation for tomatoes

35

36

37


Download ppt "Fuzzy Logic Artificial Intelligence Chapter 9. Outline Crisp Logic Fuzzy Logic Fuzzy Logic Applications Conclusion “traditional logic”: {true,false}"

Similar presentations


Ads by Google