32 Lecture CSC462 x

Download Report

Transcript 32 Lecture CSC462 x

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 nonmembership.
• This approach to set theory was not applied to control
systems until the 70's due to insufficient smallcomputer 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 workstationbased 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"
•
1
Freezing
Cool
Warm
Hot
30
50
70
90
0
10
Temp. (F°)
110
Membership Functions
• How cool is 36 F° ?
1
Freezing
Cool
Warm
Hot
30
50
70
90
0
10
Temp. (F°)
110
Inputs: Temperature
• Temp: {Freezing, Cool, Warm, Hot}
1
Freezing
Cool
Warm
Hot
30
50
70
90
0
10
Temp. (F°)
110
Inputs: Temperature, Cloud Cover
• Temp: {Freezing, Cool, Warm, Hot}
1
Freezing
Cool
Warm
Hot
30
50
70
90
0
10
110
Temp. (F°)
• Cover: {Sunny, Partly, Overcast}
Partly Cloudy
Sunny
1
Overcast
0
0
20
40
60
Cloud Cover (%)
80
100
Output: Speed
• Speed: {Slow, Fast}
1
Fast
Slow
0
0
25
50
75
Speed (mph)
100
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
1
Fast
Slow
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
1
Fast
Slow
0
0
• Speed
25
50
75
Speed (mph)
= weighted mean
= (2*25+...
100
Defuzzification:
Constructing the Output
• Speed is 20% Slow and 70% Fast
1
Fast
Slow
0
0
• Speed
25
50
75
Speed (mph)
= weighted mean
= (2*25+7*75)/(9)
= 63.8 mph
100
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
Lecture 1
Lecture 2
Lecture 3
• What is Intelligence ?
• What is artificial intelligence?
• Intelligent Systems in Your Everyday Life
• How much can be a Machine Intelligent?
• Human Intelligence VS Artificial Intelligence
• Is AI dangerous?
• Weak and Strong AI
• The Turing Test approach
• Chinese Room Argument
Concluding the classes…
Lecture 4
Lecture 5
Lecture 6
• What is an Intelligent agent?
• Agents & Environments
• Performance measure, Environment, Actuators, Sensors
• Different types of Environments
• IA examples based on Environment
• Agent types
• Problem solving by searching
• What is Search?
• Problem formulation
Concluding the classes …
Lecture 7
Lecture 8
Lecture 9
•
•
•
•
Uninformed Search
Informed Search
Breadth-first searching
Depth-first search
•
•
•
•
Informed (Heuristic) search
Heuristic evaluation function
Greedy Best-First Search
A* Search
• A knowledge-based agent
• The Wumpus World
Concluding the classes …
•
Lecture 10 •
•
•
logic
Propositional logic
Pros and cons of propositional logic
First-order logic
•
Lecture 11 •
•
•
•
Knowledge
Transfer of knowledge
Types of knowledge
Organizing the Knowledge
• Inheritance in Frames
Lecture 12
• Semantic network
Concluding the classes …
Lecture 13
• Rules based Organizing of the Knowledge
• Rules can representation
• Propositional logic
Lecture 14
15 16
• Expert System
• Forward chaining and backward chaining
Lecture 1726
• CLIPS
Concluding the classes …
Lecture 27
Lecture 28
Lecture 29
• Machine learning
• Algorithm types
• Supervised
• Artificial Neural Networks
• Perceptrons
• Single Layer Perceptron
• Multi-Layer Networks
Concluding the classes …
Lecture 30
Lecture 31
Lecture 32
• Unsupervised learning
• Self Organizing Map (SOM)
• Genetic algorithms
• GA Requirements
• Theory of Evolution
• Fuzzy Logic
Material used from the following sources
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
CLIPS Userʼs Guide
Intelligent Systems by Tai-Wen Yue
Artificial Intelligence by Reema Tariq
Ihttp://en.wikipedia.org/
ntelligent Agents by Oliver Schulte
Artificial Neural Networks Dr. Duong Tuan Anh
Informed search algorithms by Min-Yen Kan
Heuristic Search by Lise Getoor
Robotics, Artificial Intelligence by Nick Vallidis
MLP by Andy Philippides
http://www.cs.columbia.edu/~kathy/cs4701
genome.tugraz.at/MedicalInformatics2/SOM.pdf
Knowledge-Based Agents by Marie des , Andreas
Schulz and Chuck Dyer
Logical Agents and First Order Logic CSC 8520
Spring 2013. Paula Matuszek
Knowledge Representation Techniques by Saroj
Kausik
Rule-based expert systems by negnevitsky pearson
education 2005
http://staff.unak.is/not/tony/teaching/ai/lectures/
05aBreadthDepth/breadthDepth.ppt
http://www.seattlerobotics.org/encoder/mar98/fu
z/flindex.html
•
•
•
•
•
•
•
•
•
•
•
•
Artificial Intelligence: A Modern Approach,
Stuart Russell and Peter Norvig, Prentice Hall.
Artificial Intelligence by Hassan Najadat Jordan
UST
Artificial Intelligence CptS440/540 EECS by Yau
Fenghui
faculty.tnstate.edu/fyao/COMP4400/AIChap1and2-4web.ppt
Solving Problems By Searching by Dr Muhamad
Tounsi PSU
Introduction to Artificial Intelligence by Eyal
Amir
www.authorstream.com/.../techi.vaby1537745-unit-ii-solving-problems.ppt
Expert Systems by Sepandar Sepehr McMaster
University
web2.aabu.edu.jo/tool/course_file/lec_notes/9
01470_exp_system1.ppt
Informed Search and Exploration by Michael
Scherger
Artificial neural networks by HCMC University of
Technology
What is an Intelligent Agent ? By Based on
Tutorials Monique Calisti ..