Artificial Intelligence

CIS 342

The College of Saint Rose David Goldschmidt, Ph.D.

then B is true with probability P .Uncertainty  Uncertainty is the lack of exact knowledge that would enable us to reach a fully reliable solution – Classical logic assumes perfect knowledge exists: IF A is true THEN B is true  Describing uncertainty: – If A is true.

Fuzzy Logic  Expert knowledge often uses vague and inexact terms Fuzzy Logic describes fuzziness by specifying degrees –  e. speed.g. etc. intelligence. distance. beauty. degrees of height. temperature. .

temperatures above 85 are “hot”.g.Fuzzy Logic  Boolean logic uses sharp distinctions – e. temperatures less than 85 are “cold”  Fuzzy logic attempts to smooth such sharp distinctions between terms – Use real numbers between 0 and 1 to represent the possibility that a given statement is true or false .

(b) Multi-valued Logic .4 0.Fuzzy Logic  Concept of a continuum – 1937 paper: “Vagueness: an exercise in logical analysis” (Max Black) Identify vagueness as a matter of probability 01 0 1 1 0 0 0.2 0.8 1 1 – 0 (a) Boolean Logic.6 0.

Fuzzy Logic  1965 paper: “Fuzzy Sets” (Lotfi Zadeh) – Apply natural language terms to a formal system of mathematical logic  Fuzzy Logic is a set of mathematical principles for knowledge representation based on degrees of membership .

6 0. 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 0 01 0 1 1 0 0 0.4 0. (b) Multi-valued Logic .Fuzzy Logic  Unlike Boolean logic.2 0.8 1 1 (a) Boolean Logic.

Fuzzy Sets  Fundamental to mathematics. a set is a collection of distinct objects – A fuzzy set is a set whose elements have varying degrees of membership .

Fuzzy Sets  A comparison of crisp and fuzzy sets depicting height .

cm .0 0.8 0.Fuzzy Sets  A crisp (or Boolean) set is too sharp – Low applicability to real-world knowledge/concepts Crisp Sets Degree of Membership 1.2 0.4 0.6 0.0 150 Degree of 160 170 I’m short? I’m tall! 180 190 200 210 Height.

8 0.8  A fuzzy set provides a natural fit 0.6 0.Degree of Membership 1.0 0.4 0.2 .0 Crisp Sets Fuzzy Sets 0. cm Fuzzy Sets Degree of Membership 1.0 150 160 170 180 190 200 210 Height.6 0.2 0.0 – 150 160 170 180 190 200 210 High applicability to real-world knowledge/concepts Height.4 0. cm 0.

0 150 160 170 180 190 200 210 Height.Degree of Membership 1.8 0.8   X-axis is the universe of discourse.2 0. all possible values 0. cm Degree of Membership 1.2 .6 0.0 0.6 0.0 Crisp Sets Fuzzy Sets 0. cm Fuzzy Sets 0.4 0.4 0.0 150 160 170 180 190 200 210 Y-axis is the degree of membership Height.

the characteristic function of A fA(x): X → {0. crisp set A over X is defined by function fA(x). 1} where fA(x) = 1.Fuzzy Sets  Let X be the universe of discourse – – Denote its elements as x In classical set theory. if x  A . if x  A 0.

the membership function of A mA(x): X → [0.Fuzzy Sets  Let X be the universe of discourse – – Denote its elements as x In fuzzy set theory. fuzzy set A over X is defined by function mA(x). 1] where mA(x) = 1. if x is not in A 0 < mA(x) < 1. if x is entirely in A mA(x) = 0. if x is partly in A .

Representing Fuzzy Sets m (x ) X Fuzzy SubsetA 1 0 Crisp SubsetA Fuzziness x .

0 150 Degreeof 160 170 180 Fuzzy Sets 190 200 210 Height.4 0.8 0.6 0. cm Short CrispSets Average Tall .Representing Fuzzy Sets  Representing height using three crisp sets: Degreeof Memb ership 1.2 0.0 0.

6 Short Average Tall Representing Fuzzy Sets 0.2 0.0 0.0 150 160 170 Short Average Tall 180 190 200 210 .0 0.4 0.8 0.1.0  150 160 170 using 180three190 200 Representing height fuzzy sets: Fuzzy Sets 210 Height.4 0.8 0.2 0. cm Degreeof Memb ership 1.6 0.

8 0.2 Short CrispSets write a function or method to calculate degree of membership (HINT: Average use analytic geometry) Tall In-Class Exercise  What’s the degree of membership 0. cm 200 210 .6 0.0 0.0 170 190 for 150 Steven 160 and Bob in each 180 fuzzy set? Degreeof Memb ership 1.6 0.2 0.0 150 160 170 180 190 Short Average Tall Fuzzy Sets 200 210 Height.0 0.4 0.Degreeof Memb ership 1.8 0.4 0.