10-22 Developing Expert Systems

Lecture
8
Artificial Intelligence
Intelligent agents
McGraw-Hill/Irwin
Copyright © 2008
2008,The
TheMcGraw-Hill
McGraw-HillCompanies,
Companies,Inc.
Inc.All
Allrights
rightsreserved.
reserved.
Learning Objectives
• Identify how
• neural networks
• fuzzy logic
• genetic algorithms
• virtual reality, and
• intelligent agents
can be used in business and understand the concepts related
to each of these technologies
• Give examples of several ways expert systems can be
used in business decision-making situations
10-2
Case 2: Automated Decision Making
• AI is best suited for
• Decisions that must be made quickly and
frequently, using electronic data
• Highly structured decision criteria
• High-quality data
• Common users of AI
• Transportation industry
• Hotels
• Investment firms and lenders
10-3
Artificial Intelligence (AI)
• AI is a field of science and technology based on
•
•
•
•
•
•
Computer science
Biology
Psychology
Linguistics
Mathematics
Engineering
• The goal of AI is to develop computers than can
simulate the ability to think
• And see, hear, walk, talk, and feel as well
10-4
Attributes of Intelligent Behavior
• A major goal of AI is to create computer
functions with features normally associate with
intelligent behavior of human beings
•
•
•
•
•
•
Think and reason
Use reason to solve problems
Learn or understand from experience
Acquire and apply knowledge
Exhibit creativity and imagination
Deal with complex or perplexing situations
10-5
Attributes of Intelligent Behavior
• Features of intelligent behavior (continued)
• Respond quickly and successfully to new
situations
• Recognize the relative importance of
elements in a situation
• Handle ambiguous, incomplete, or
erroneous information
10-6
Domains of Artificial Intelligence
AI applications can be grouped under there major areas:
10-7
Cognitive Science
• It focuses on how the human brain works
and how humans think and learn.
• AI in this area is based on research in biology,
neurology, physiology, mathematics and other
disciplines.
• Applications in the cognitive science of AI
•
•
•
•
•
•
•
Expert systems
Knowledge-based systems
Adaptive learning systems
Fuzzy logic systems
Neural networks
Genetic algorithm software
Intelligent agents
10-8
Robotics
• AI, engineering, and physiology are the basic
disciplines of robotics
• Produces robot machines with computer
intelligence and humanlike physical capabilities
• This area include applications designed to
give robots the powers of
•
•
•
•
•
Sight or visual perception
Touch or tactile capabilities
Dexterity, or skill in handling and manipulation
Locomotion, or the physical ability to move
Navigation, or the intelligence to properly find
one’s way to a destination
10-9
Natural Interfaces
• Major parts in the area of AI and the development of
natural interfaces
• Natural languages
• Speech recognition
• Virtual reality – using multisensory human-computer
interfaces that enable human users to experience
computer-simulated objects, spaces, activities, and
“worlds” as if they actually exists.
• Involves research and development in
•
•
•
•
Linguistics
Psychology
Computer science
Other disciplines
10-10
Latest Commercial Applications of AI
• Decision Support
• Rule based AI technologies for automatic
approval of bank loans
• Information Retrieval
• Database mining for marketing trend analysis and
financial forecasting
• Virtual Reality
• X-ray-like vision enabled by enhanced-reality
visualization helps surgeons
• Automated animation and sensory interfaces
allow users to interact with virtual objects
10-11
Expert Systems
• An Expert System (ES) is
• A knowledge-based information system
• Contain knowledge about a specific, complex
application area
• Acts as an expert consultant to end users
• Expert system provide answers to questions in a
very specific problem area by making humanlike
inferences about knowledge contained in a
specialized knowledge base and explain the
reasoning process and conclusions to the user.
10-12
Components of an Expert System
• Knowledge Base
• Facts about a specific subject area
• Heuristics that express the reasoning procedures
of an expert (rules of thumb)
• Software Resources
• An inference engine processes the knowledge
and recommends a course of action
• User interface programs communicate with
the end user
• Explanation programs explain the reasoning
process to the end user
10-13
Methods of Knowledge Representation
• Case-Based
• Knowledge organized in the form of cases
• Cases are examples of past performance, occurrences, and
experiences
• Frame-Based
• A frame is a structure for representing a concept or
situation such as "living room" or "being in a living
room." Attached to a frame are several kinds of
information, for instance, definitional and descriptive
information and how to use the frame.
• http://www.cs.utexas.edu/users/qr/algy/algyexpsys/node2.html
10-14
Methods of Knowledge Representation
• Object-Based
• Knowledge represented as a network of objects
• An object is a data element that includes both
data and the methods or processes that act on
those data
• Rule-Based
• Knowledge represented in the form of rules
and statements of fact
• Rules are statements that typically take the
form of a premise and a conclusion (If, Then)
10-15
Expert System Application Categories
• Decision Management
• Loan portfolio analysis
• Employee performance evaluation
• Insurance underwriting
• Diagnostic/Troubleshooting
•
•
•
•
Equipment calibration
Help desk operations
Medical diagnosis
Software debugging
10-16
Expert System Application Categories
• Design/Configuration
• Computer option installation
• Manufacturability studies
• Communications networks
• Selection/Classification
•
•
•
•
Material selection
Delinquent account identification
Information classification
Suspect identification
• Process Monitoring/Control
10-17
Expert System Application Categories
• Process Monitoring/Control
•
•
•
•
Machine control (including robotics)
Inventory control
Production monitoring
Chemical testing
10-18
Benefits of Expert Systems
• Captures the expertise of an expert or group of
experts in a computer-based information system
•
•
•
•
•
Faster and more consistent than an expert
Can contain knowledge of multiple experts
Does not get tired or distracted
Cannot be overworked or stressed
Helps preserve and reproduce the knowledge
of human experts
10-19
Limitations of Expert Systems
• The major limitations of expert systems
•
•
•
•
•
Limited focus
Inability to learn
Maintenance problems
Development cost
Can only solve specific types of problems
in a limited domain of knowledge
10-20
Developing Expert Systems
• Suitability Criteria for Expert Systems
• Domain: the domain or subject area of
the problem is small and well-defined
• Expertise: a body of knowledge, techniques,
and intuition is needed that only a few people
possess
• Complexity: solving the problem is a complex
task that requires logical inference processing
10-21
Developing Expert Systems
• Suitability Criteria for Expert Systems
• Structure: the solution process must be able
to cope with ill-structured, uncertain, missing,
and conflicting data and a changing problem
situation
• Availability: an expert exists who is articulate,
cooperative, and supported by the management
and end users involved in the development
process
10-22
Development Tool
• Expert System Shell
• The easiest way to develop an expert system
• A software package consisting of an expert
system without its knowledge base
• Has an inference engine and user interface
programs
• Example:
http://www.lpa.co.uk/pws_exec/pws/proweb.exe
?eg=Expert+System+Shell
10-23
Knowledge Engineering
• A knowledge engineer
• Works with experts to capture the knowledge
(facts and rules of thumb) they possess
• Builds the knowledge base, and if necessary,
the rest of the expert system
• Performs a role similar to that of systems
analysts in conventional information systems
development
10-24
Neural Networks
• Computing systems modeled after the brain’s mesh-like
network of interconnected processing elements
(neurons)
• Interconnected processors operate in parallel
and interact with each other
• Allows the network to learn from the data it processes
• A neural network is a powerful data modelling tool
that is able to capture and represent complex
input/output relationships.
• The motivation for the development of neural
network technology came from the desire to
develop an artificial system that could perform
"intelligent" tasks similar to those performed by the
human brain.
10-25
How does Neural network resemble
the human brain?
• Neural networks resemble the human brain in the
following two ways:
• A neural network acquires knowledge through
learning.
• A neural network's knowledge is stored within
inter-neuron connection strengths known as
synaptic weights.
10-26
Neural Network Structure
• An ANN is a set of processing elements (units, neurons)
and connections with adjustable strengths called weights.
10-27
How do ANNs work?
•
•
Train the network
• Present data to the network
• Calculate the network output
• Compare the network output with the desired
output
• Modify the weights to reduce the error using
a training algorithm
Use the network
• Present new data to the network
• Compute the output using the weights set
during the training
10-28
ANN learning paradigms
• Supervised learning
• Given a set of example pairs (x,y) to find a
function f in the allowed class of functions that
matches the examples.
• Unsupervised learning
• Learning in which the system parameters are
adapted using only the information of the input
in a way that reflects the statistical structure of
the overall collection of input patterns.
10-29
ANN applications -1
• Function Approximation
• Problems solved with function approximation are
those where we wish to determine numeric outputs
given a set of numeric inputs. This covers a very
wide range of problems: house prices estimation
(output) given a number of metrics as input (house
size, land size, distance to nearest school.…)
• Classification
• The system learns how to categorize the input that
receives into a set of classes: medical diagnosis,
pattern recognition; speech recognition, character
recognition
10-30
ANN applications -2
• Time series Prediction
• Past values are used to predict future ones.
Commonly used in financial forecasting;
bankruptcy predictions; sales forecasting
• Data Mining
• Clustering; data visualisation; feature
extraction; data compression
10-31
Function Approximation – Age estimation
Problem: To design neural network based models
that accept low dimensional representation of unseen
image and produce an estimate of the age of the
person in the corresponding face image.
Applications
•Age specific human
computer interaction
•Age-based indexing of
face images
•Development of
automatic age
progression systems
•Understanding the
process of age
perception by humans
Face Image
Face
Parameters
Age
Estimate
PCA
22 Model Face
Parameters
10-32
Classification
numerical
outputs
numerical
inputs
Classification similar
to function approximation
except with on/off outputs
Interpret outputs
as classes
on/off output
•Similar to function approximation except that the
outputs belong to a class thus they are discrete
•on/off; sick/healthy;
•Classification problems are evaluated by threshold
the outputs of the model
10-33
Classification – Optical recognition
application
The original document is scanned
into the computer and saved as an
image. The OCR software breaks
the image into sub-images, each
containing a single character. The
sub-images are then translated from
an image format into a binary
format, where each 0 and 1
represents an individual pixel of the
sub-image. The binary data is then
fed into a neural network that has
been trained to make the
association between the character
image data and a numeric value
that corresponds to the character.
The output from the neural network
is then translated into ASCII text
and saved as a file.
10-34
Time series Prediction
Past and present values
of input parameters
Prediction Network
Function approximation
with future values
as outputs
Future values to be predicted
•Time series prediction (dynamic function approximation)
information from the past is used to determine the output
(e.g. stock prediction)
10-35
Time series Prediction – stock price prediction
• Inputs:
• Date
• Opening Price
• High
• Low
• Volume
• Closing Price
• Outputs:
• Closing Price
• Data sets:
http://www.grainmarketresearch.com/mmm.cfm
10-36
Data Mining
numerical
inputs
Data mining
No desired response
numerical
outputs
•In data mining we don’t know the answer ahead of time;
we want to extract data from the input
•clustering
•compression
•Principal Component Analysis
•This type of networks are called “unsupervised” because
there is no teaching signal
10-37
Data Mining - World Poverty Map
• http://www.cis.hut.fi/research/som-research/worldmap.html
• The Self-Organizing Map algorithm (Kohonen: SelfOrganizing Maps, Springer, 1997) is used to visualize and
interpret large high-dimensional data sets
• The data consisted of World Bank statistics of countries in
1992. 39 indicators describing various quality-of-life factors,
such as state of health, nutrition, educational services, etc,
were used. The complex joint effect of these factors can can
be visualized by organizing the countries using the selforganizing map
• Countries that had similar values of the indicators found a
place near each other on the map. The different clusters on
the map were automatically encoded with different bright
colors.
10-38
More applications
• Machine Diagnostics - Detect when a machine has
failed so that the system can automatically shut
down the machine when this occurs.
• Portfolio Management - Allocate the assets in a
portfolio in a way that maximizes return and
minimizes risk.
• Target Recognition - Military application which
uses video and/or infrared image data to determine if
an enemy target is present.
• Medical Diagnosis - Assisting doctors with their
diagnosis by analyzing the reported symptoms
and/or image data such as MRIs or X-rays.
10-39
More applications
• Credit Rating - Automatically assigning a company's or
individuals credit rating based on their financial condition.
• Targeted Marketing - Finding the set of demographics
which have the highest response rate for a particular
marketing campaign.
• Voice Recognition - Transcribing spoken words into ASCII
text.
• Quality Control - Attaching a camera or sensor to the end
of a production process to automatically inspect for defects.
• Intelligent Searching - An internet search engine that
provides the most relevant content and banner ads based on
the users' past behavior.
• Fraud Detection - Detect fraudulent credit card
transactions and automatically decline the charge.
10-40
NN resources
• Neural Nets: Dr K Gurney
http://www.shef.ac.uk/psychology/gurney/notes/contents.h
tml
• An Introduction to Neural Networks
http://www.cs.stir.ac.uk/~lss/NNIntro/InvSlides.html
• http://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=
72
• Elsevier – Neural networks
http://www.sciencedirect.com/science/journal/08936080
10-41
Intelligent Agents
• A software surrogate for an end user or a
process that fulfills a stated need or activity
• Uses built-in and learned knowledge base
to make decisions and accomplish tasks in
a way that fulfills the intentions of a user
• Also called software robots or bots
• “An agent is anything that can be viewed as
perceiving its environment through sensors and
acting upon that environment through effectors,”
(from Russell and Norvig, Artificial Intelligence:
a Modern Approach)
10-42
What is an Agent?
• The main point about agents is they are
autonomous: capable of acting independently,
exhibiting control over their internal state
• Thus: an agent is a computer system capable of
autonomous action in some environment in order
to meet its design objectives
SYSTEM
output
input
ENVIRONMENT
10-43
Intelligent Agent
• (from Woodridge and Jennings):
• autonomy: agents operate without direct intervention of
humans, and have control over their actions and internal
state;
• social ability: agents interact with other agents (and
possibly humans) through negotiation and/or cooperation,
to satisfy their deign objectives;
• reactivity: agents perceive their environment and respond
in a timely and rational fashion to changes that occur in it;
In a changed environment, intelligent agents have to
recognise opportunities and take the initiative if they are
to produce meaningful results.
• pro-activeness: agents do not simply act in response to
their environment, they are capable of taking the initiative
(generate their own goals and act to achieve them).
10-44
Other Features of Intelligent Agents
• An intelligent agent has mental properties, such as
knowledge, belief, intention, obligation. In addition, and
agent has other properties such as:
• mobility: agents can move around from one machine to
another and across different system architectures and
platforms;
• veracity: agents do not knowingly communicate false
information;
• benevolence: agents always try to do what they are asked
of;
• rationality: agents will try to achieve their goals and not
act in such a way to prevent their goals from being
achieved.
• learning/adaptation: agent improve performance over
time
10-45
Application of Agent-based computing - I
It can solve new problems.
• Openness. When components of the system are not
known in advance, change over time, and are highly
heterogeneous (e.g. programming the Internet) an agentbased approach allows to create systems that are
flexible, robust, and can adapt to the environment by
using their social skills, ability to negotiate with other
agents, and ability to take advantage of opportunities.
• Complexity. With large and complex problems, agents
offer a natural way to partition the problem into smaller
and simpler components, that are easier to develop and
maintain, and are specialized.
10-46
Application of Agent-based computing - II
• Natural Metaphor. Agents provide an easy way to
conceptualize metaphors. For instance, an e-mail
filtering program can be presented using the
metaphor of a personal digital assistant. This could
also cause problems if the reasoning done by the
agent is a black box to the user.
• Legacy systems. Modifying existing software to
keep pace with changing needs is often impossible.
Legacy software can be incorporated into agentbased software by building an “agent wrapper”
around it, to allow it to cooperate and communicate
with other agent-based software.
• http://agents.umbc.edu/introduction/jennings98.p
df
10-47
User Interface Agents
• Interface Tutors – observe user computer
operations, correct user mistakes, provide
hints/advice on efficient software use
• Presentation Agents – show information in a
variety of forms/media based on user preferences
• Network Navigation Agents – discover paths
to information, provide ways to view it based
on user preferences
• Role-Playing – play what-if games and other
roles to help users understand information and
make better decisions
10-48
Information Management Agents
• Search Agents – help users find files and
databases, search for information, and suggest
and find new types of information products,
media, resources
• Information Brokers – provide commercial
services to discover and develop information
resources that fit business or personal needs
• Information Filters – Receive, find, filter,
discard, save, forward, and notify users about
products received or desired, including e-mail,
voice mail, and other information media
10-49
Fuzzy Logic
• Fuzzy logic
• Resembles human reasoning
• Allows for approximate values and
inferences and incomplete or ambiguous data
• Uses terms such as “very high” instead of
precise measures
• Used most often in Japan
• Used in fuzzy process controllers used in
subway trains, elevators, and cars
10-50
Example of Fuzzy Logic Rules and Query
10-51
Genetic Algorithms
• Genetic algorithm software
• Uses Darwinian (survival of the fittest),
randomizing, and other mathematical functions to
simulate an evolutionary process, yielding
increasingly better solutions to a problem
• Being uses to model a variety of scientific,
technical, and business processes
• Especially useful for situations in which
thousands of solutions are possible and must be
evaluated to produce an optimal solution.
• GA Tutorial: http://cs.felk.cvut.cz/~xobitko/ga/
10-52
Virtual Reality (VR)
• Virtual reality is a computer-simulated reality
• Fast-growing area of artificial intelligence
• Originated from efforts to build natural, realistic,
multi-sensory human-computer interfaces
• Relies on multi-sensory input/output devices
• Creates a three-dimensional world through
sight, sound, and touch
• Also called telepresence
10-53
Typical VR Applications
• Current applications of virtual reality
• Computer-aided design
• Medical diagnostics and treatment
• Scientific experimentation
• Flight simulation
• Product demonstrations
• Employee training
• Entertainment
Science News
http://www.sciencedaily.com/releases/2008/03/0803
30225933.htm
10-54
Summary
• Neural networks
• Fuzzy logic
• Genetic algorithms
• Virtual reality
• Intelligent agents
10-55