Sunteți pe pagina 1din 34

Artificial Intelligence

Lecture No. 32
Dr. Asad Ali Safi

Assistant Professor,
Department of Computer Science,
COMSATS Institute of Information Technology (CIIT)
Islamabad, Pakistan.
Summary of Previous Lecture
• Genetic algorithms
• GA Requirements
• Theory of Evolution
• GA Strengths
• GA Weaknesses
Today’s Lecture
• Fuzzy Logic
• Fuzzy Membership Sets
• Fuzzy Linguistic Variables
• Fuzzy Control
What is fuzzy logic?

• Definition of fuzzy
• Fuzzy – “not clear, dissimilar, blurred”

• Definition of fuzzy logic


• A form of knowledge representation suitable for notions that
cannot be defined precisely, but which depend upon their
contexts.

• "Tall Men", "Hot Days", or "Stable Currencies"

• We Will Probably Have a Successful Business Year.

• The Experience of Expert A Shows That B Is Likely to Occur.


However, Expert C Is Convinced This Is Not True.
• "If it is sunny and warm today, I will drive fast"
• Linguistic variables:
– Temp: {freezing, cool, warm, hot}
– Cloud Cover: {overcast, partly cloudy, sunny}
– Speed: {slow, fast}
• Most words and evaluations we use in our daily
reasoning are not clearly defined in a mathematical
manner. This allows humans to reason on an
abstract level!
Where did it begin?
• The concept of Fuzzy Logic (FL) was conceived by Lotfi
Zadeh, a professor at the University of California at
Berkley, and presented not as a control methodology,
but as a way of processing data by allowing partial set
membership rather than crisp set membership or non-
membership.
• This approach to set theory was not applied to control
systems until the 70's due to insufficient small-
computer capability prior to that time.
• Professor Zadeh reasoned that people do not require
precise, numerical information input, and yet they are
capable of highly adaptive control.
Problem solving
• FL is a problem-solving control system methodology
that lends itself to implementation in systems ranging
from simple, small, embedded micro-controllers to
large, networked, multi-channel PC or workstation-
based data acquisition and control systems.
• It can be implemented in hardware, software, or a
combination of both.
• FL provides a simple way to arrive at a definite
conclusion based upon vague, ambiguous, imprecise,
noisy, or missing input information.
• FL's approach to control problems mimics how a
person would make decisions.
Fuzzy Logic (FL) vs Conventional
control methods
• Crisp (Traditional) Variables:
• Crisp variables represent precise quantities:
– x = 3.1415296
– A {0,1}
• A proposition is either True or False
– ABC
• King(Richard)  Greedy(Richard)  Evil(Richard)
• Richard is either greedy or he isn't:
– Greedy(Richard) {0,1}
Fuzzy Logic (FL) vs Conventional
control methods
• FL incorporates a simple, rule-based IF X AND Y
THEN Z approach to a solving control problem
rather than attempting to model a system
mathematically.
• The FL model is empirically-based, relying on an
operator's experience rather than their technical
understanding of the system.
– terms like "IF (process is too cool) AND (process is
getting colder) THEN (add heat to the process)" or
– "IF (process is too hot) AND (process is heating
rapidly) THEN (cool the process quickly)" are used.
Fuzzy Logic (FL) vs Conventional
control methods
• These terms are imprecise and yet very
descriptive of what must actually happen.
• Consider what you do in the shower if the
temperature is too cold: you will make the
water comfortable very quickly with little
trouble. FL is capable of mimicking this type of
behavior but at very high rate.
Fuzzy Sets
• What if Richard is only somewhat greedy?
• Fuzzy Sets can represent the degree to which
a quality is possessed.
• Fuzzy Sets (Simple Fuzzy Variables) have
values in the range of [0,1]
• Greedy(Richard) = 0.7
• Question: How evil is Richard?
Fuzzy Linguistic Variables
• Fuzzy Linguistic Variables are used to
represent qualities spanning a particular
spectrum
• Temp: {Freezing, Cool, Warm, Hot}
• Membership Function
• Question: What is the temperature?
• Answer: It is warm.
• Question: How warm is it?
Membership function
• The membership function is a graphical representation of
the magnitude of participation of each input.
• It associates a weighting with each of the inputs that are
processed, define functional overlap between inputs, and
ultimately determines an output response.
• The rules use the input membership values as weighting
factors to determine their influence on the fuzzy output
sets of the final output conclusion.
• Once the functions are inferred, scaled, and combined,
they are defuzzified into a crisp output which drives the
system.
• There are different membership functions associated with
each input and output response.
• Create FL membership functions that define
the meaning (values) of Input/Output terms
used in the rules

The features of a membership function


Membership Functions
• Temp: {Freezing, Cool, Warm, Hot}
• Degree of Truth or "Membership"

Freezing Cool Warm Hot
1

0
10 30 50 70 90 110
Temp. (F°)
Membership Functions
• How cool is 36 F° ?
Freezing Cool Warm Hot
1

0
10 30 50 70 90 110
Temp. (F°)
Inputs: Temperature
• Temp: {Freezing, Cool, Warm, Hot}
Freezing Cool Warm Hot
1

0
10 30 50 70 90 110
Temp. (F°)
Inputs: Temperature, Cloud Cover
• Temp: {Freezing, Cool, Warm, Hot}
Freezing Cool Warm Hot
1

0
10 30 50 70 90 110
Temp. (F°)

• Cover: {Sunny, Partly, Overcast}


Sunny Partly Cloudy Overcast
1

0
0 20 40 60 80 100
Cloud Cover (%)
Output: Speed
• Speed: {Slow, Fast}

Slow Fast
1

0
0 25 50 75 100
Speed (mph)
Rules
• If it's Sunny and Warm, drive Fast
Sunny(Cover)Warm(Temp) Fast(Speed)

• If it's Cloudy and Cool, drive Slow


Cloudy(Cover)Cool(Temp) Slow(Speed)

• Driving Speed is the combination of output of


these rules...
Defuzzification:
Constructing the Output
• Speed is 20% Slow and 70% Fast
Slow Fast
1

0
0 25 50 75 100
Speed (mph)

• Find centroids: Location where membership is


100%
Defuzzification:
Constructing the Output
• Speed is 20% Slow and 70% Fast
Slow Fast
1

0
0 25 50 75 100
Speed (mph)
• Speed = weighted mean
= (2*25+...
Defuzzification:
Constructing the Output
• Speed is 20% Slow and 70% Fast
Slow Fast
1

0
0 25 50 75 100
Speed (mph)
• Speed = weighted mean
= (2*25+7*75)/(9)
= 63.8 mph
Notes: Follow-up Points
• Fuzzy Logic Control allows for the smooth
interpolation between variable centroids with
relatively few rules
• This does not work with crisp (traditional
Boolean) logic
• Provides a natural way to model some types
of human expertise in a computer program
Notes: Drawbacks to Fuzzy logic
• Requires tuning of membership functions
• Fuzzy Logic control may not scale well to large
or complex problems
• Deals with imprecision, and vagueness, but
not uncertainty
Summery of Today’s Lecture
• Fuzzy Logic
• Fuzzy Membership Sets
• Fuzzy Linguistic Variables
• Fuzzy Control
Concluding the classes
• What is Intelligence ?
Lecture 1
• What is artificial intelligence?
• Intelligent Systems in Your Everyday Life

• How much can be a Machine Intelligent?


Lecture 2 • Human Intelligence VS Artificial Intelligence
• Is AI dangerous?

• Weak and Strong AI


Lecture 3
• The Turing Test approach
• Chinese Room Argument
Concluding the classes…
• What is an Intelligent agent?
Lecture 4
• Agents & Environments
• Performance measure, Environment, Actuators, Sensors

• Different types of Environments


Lecture 5 • IA examples based on Environment
• Agent types

• Problem solving by searching


Lecture 6 • What is Search?
• Problem formulation
Concluding the classes …
• Uninformed Search
Lecture 7 • Informed Search
• Breadth-first searching
• Depth-first search

Lecture 8
• Informed (Heuristic) search
• Heuristic evaluation function
• Greedy Best-First Search
• A* Search

Lecture 9
• A knowledge-based agent
• The Wumpus World
Concluding the classes …
• logic
Lecture 10 • Propositional logic
• Pros and cons of propositional logic
• First-order logic

• Knowledge
Lecture 11 • Transfer of knowledge
• Types of knowledge
• Organizing the Knowledge

• Inheritance in Frames
Lecture 12
• Semantic network
Concluding the classes …
• Rules based Organizing of the Knowledge
Lecture 13
• Rules can representation
• Propositional logic

Lecture 14
15 16
• Expert System
• Forward chaining and backward chaining

Lecture 17-
26 • CLIPS
Concluding the classes …

Lecture 27
• Machine learning
• Algorithm types

Lecture 28 • Supervised
• Artificial Neural Networks
• Perceptrons

Lecture 29
• Single Layer Perceptron
• Multi-Layer Networks
Concluding the classes …

Lecture 30
• Unsupervised learning
• Self Organizing Map (SOM)

Lecture 31 • Genetic algorithms


• GA Requirements
• Theory of Evolution

Lecture 32
• Fuzzy Logic
Material used from the following sources
• CLIPS Userʼs Guide • Artificial Intelligence: A Modern Approach,
• Intelligent Systems by Tai-Wen Yue
Stuart Russell and Peter Norvig, Prentice Hall.
• Artificial Intelligence by Reema Tariq • Artificial Intelligence by Hassan Najadat Jordan
UST
• Ihttp://en.wikipedia.org/
• ntelligent Agents by Oliver Schulte • Artificial Intelligence CptS440/540 EECS by Yau
Fenghui
• Artificial Neural Networks Dr. Duong Tuan Anh
• Informed search algorithms by Min-Yen Kan
• faculty.tnstate.edu/fyao/COMP4400/AI-
Chap1and2-4web.ppt
• Heuristic Search by Lise Getoor
• Solving Problems By Searching by Dr Muhamad
• Robotics, Artificial Intelligence by Nick Vallidis
Tounsi PSU
• MLP by Andy Philippides
• Introduction to Artificial Intelligence by Eyal
• http://www.cs.columbia.edu/~kathy/cs4701
Amir
• genome.tugraz.at/MedicalInformatics2/SOM.pdf
• www.authorstream.com/.../techi.vaby-
• Knowledge-Based Agents by Marie des , Andreas
1537745-unit-ii-solving-problems.ppt
Schulz and Chuck Dyer
• Logical Agents and First Order Logic CSC 8520 • Expert Systems by Sepandar Sepehr McMaster
Spring 2013. Paula Matuszek University
• Knowledge Representation Techniques by Saroj • web2.aabu.edu.jo/tool/course_file/lec_notes/9
Kausik 01470_exp_system1.ppt
• Rule-based expert systems by negnevitsky pearson • Informed Search and Exploration by Michael
education 2005 Scherger
• http://staff.unak.is/not/tony/teaching/ai/lectures/ • Artificial neural networks by HCMC University of
05aBreadthDepth/breadthDepth.ppt Technology
• http://www.seattlerobotics.org/encoder/mar98/fu • What is an Intelligent Agent ? By Based on
z/flindex.html Tutorials Monique Calisti ..

S-ar putea să vă placă și