Final UNIT-5-AI
Final UNIT-5-AI
1
Definition for learning
Learning is an area of AI that focuses on processes of self-improvement.
Information processes that improve their performance or enlarge their knowledge bases are said
to learn.
2
Why is it hard?
Intelligence implies that an organism or machine must be able to adapt to new situations.
It must be able to learn to do new things.
This requires knowledge acquisition, inference, updating/refinement of knowledge base, acquisition
of heuristics, applying faster searches, etc.
Skill refinement
One can learn by practicing, e.g playing the piano.
Knowledge acquisition
One can learn by experience and by storing the experience in a knowledge base.
One basic Example of this type is rote learning.
Taking advice
Similar to rote learning although the knowledge that is input may need to be transformed (Or
operationalised) in order to be used effectively.
Problem Solving
If we solve a problem one may learn from this experience.
The next time we see a similar problem we can solve it more efficiently.
This does not usually involve gathering new knowledge but may involve reorganization of data or
remembering how to achieve to solution
Induction
One can learn from examples.
Humans often classify things in the world without knowing explicit rules.
Usually involves a teacher or trainer to aid the classification.
Discovery
Here one learns knowledge without the aid of a teacher.
Analogy
If a system can recognize similarities in information already stored then it may be able to transfer
some knowledge to improve to solution of the task in hand.
For Example:
Consider that 'ƒ' is the target function and example is a pair (x ƒ(x)), where 'x' is input and ƒ(x)
is the output function applied to 'x'.
Given problem: Find hypothesis h such as h ≈ ƒ
So, in the following fig-a, points (x,y) are given in plane so that y = ƒ(x), and the task is to find
a function h(x) that fits the point well.
In fig-b, a piecewise-linear 'h' function is given, while the fig-c shows more complicated 'h' function.
Both the functions agree with the example points, but differ with the values of 'y' assigned to other
4
As shown in fig.(d), we have a function that apparently ignores one of the example points, but fits
others with a simple function. The true/ is unknown, so there are many choices for h, but without
further knowledge, we have no way to prefer (b), (c), or (d).
Interpret
Translate the advice into an internal representation.
Operationalise
Translated advice may still not be usable so this stage seeks to provide a representation that can be
used by the performance element.
Integrate
When knowledge is added to the knowledge base care must be taken so that bad side effects are
avoided.
E.g. Introduction of redundancy and contradictions.
Evaluate
The system must assess the new knowledge for errors, contradictions etc.
The steps can be iterated.
A training example
-- what the learning sees in the world.
5
A goal concept
-- a high level description of what the program is supposed to learn.
A operational criterion
-- a description of which concepts are usable.
A domain theory
It is a set of rules that describe relationships between objects and actions in a domain.
From this EBL computes a generalization of the training example that is sufficient not only to
describe the goal concept but also satisfies the operational criterion.
This has two steps:
Explanation
-- The domain theory is used to prune away all unimportant aspects of the training example with
respect to the goal concept.
Generalization
o the explanation is generalised as far possible while still describing the goal concept.
There are three basic methods in which a system can learn from its own experiences.
1. Learning by Parameter Adjustment
2. Learning by Macro Operators
3. Learning by Chunking
For example:
Making dinner can be described a lay the table, cook dinner, serve dinner.
We could treat laying the table as on action even though it involves a sequence of actions.
The STRIPS problem-solving employed macro-operators in it's learning phase.
Consider a blocks world example in which ON(C, B) and ON (A, TABLE) are true.
STRIPS can achieve ON(A,B) in four steps:
UNSTACK(C,B)
PUTDOWN(C)
PICKUP(A)
STACK(A,B)
STRIPS now builds a macro-operator MACROP with preconditions ON(C,B), ON(A,TABLE),
post conditions ON (A, B), ON(C,TABLE) and the four steps as its body.
MACROP can now be used in future operation.
6
But it is not very general. The above can be easily generalised with variables used in place of the
blocks.
Learning by Chunking
Chunking involves similar ideas to Macro Operators and originates from psychological ideas on
memory and problem solving.
The computational basis is in production systems .
SOAR is a system that use production rules to represent its knowledge. It also employs chunking to
learn from experience.
7. Discovery
Discovery is a restricted form of learning in which one entity acquires knowledge without the help
of a teacher.
Addition
The union of two disjoints sets and their counting function.
Multiplication
Having discovered addition and multiplication as laborious set-theoretic operations more effective
descriptions were supplied by hand.
Prime Numbers
Factorization of numbers and numbers with only one factor were discovered.
Golbach's Conjecture
Even numbers can be written as the sum of 2 primes.
E.g. 28 = 17 + 11.
7
How to employ functions, create new concepts, generalisation etc.
Hypothesis and test based search.
Agenda control of discovery process.
Common Sense
Synopsis
1. Introduction
2. Representing Qualitative information
3. Reasoning with qualitative information
4. Common sense Ontologies
5. Time
6. Space
7. Materials
8. Memory Organisation
9. Case Based Reasoning
Introduction
True Intelligent systems exhibit common sense -- they possess more than enough knowledge to
be able to work in a given environment.
Common sense systems need to support:
Descriptions of everyday objects -- Frames.
Typical sequences of everyday events -- Scripts.
Default reasoning -- Nonmonotonic logics.
8
remain difficult or impossible to solve analytically.
Systems of equations (differential etc.) might hard to derive and even impossible to solve.
Variables
-- make take on values as in a traditional physics model but with a restricted set of values, e.g.
temperature as
Quantity Spaces
-- a small set of discreet values for a variable.
Rate of Change
-- Variables take on different values at different times. A real valued rate of change can be modelled
qualitatively with a quantity space,
e.g
Expressions
-- Combination of variables.
Equations
-- Assignment of expression to variables.
States
-- Sets of variables who's values change over time.
Note that qualitative algebra is different: Say we
9
The most basic notion of time is occupied by events:
Events occur during intervals -- continuous spaces of time.
An interval has a start and end point and a duration (of time) between them.
Intervals can be related to one another -- descriptions such as is-before, is-after, meets, is met-
by, starts, is-started-by, during, contains, ends, is-ended-by and equals.
We can build a axioms with intervals to describe events in time.
Space
The Blocks World is a simple example of we can model and describe space.
However common sense notions such a place object x near object y are not accommodated.
Now objects have a spatial extent while events have a temporal extent.
So we might try to extend of common sense theory of time.
However space is 3D and there are many more relationships than those for time so it is not a
good idea.
Another approach is view objects and space at various levels of abstraction.
E.g. We can view most printed circuit boards as being a 2D object.
Choosing a representation means selecting relevant properties at particular levels of
granularity.
For instance we can define relations over spaces such as inside, adjacent etc.
We can also define relations for curves, lines, surfaces, planes and volumes.
E.g. along, across, perpendicular etc.
Materials
We need to describe properties of materials:
You cannot walk on water.
If you knock a cup of coffee over what happens?
If you pour a full kettle into a cup what happens?
You can squeeze a sponge but not a brick.
Liquids (as can be seen from above) provide many interesting points.
It is useful to think of spaces occupied by objects. Thus we can define properties such as:
Capacity -- a bound to an amount of liquid.
Amount -- volume occupied by a liquid.
Full -- if amount equals capacity.
Other properties materials can posses include:
Free -- if a space is not wholly contained inside another object.
Surround -- if enclosed by a very thin free space.
Rigid
Flexible
Particulate -- e.g. sand
Memory Organisation
Memory is central to common sense behavior and also the basis for learning.
Human memory is still not fully understood however psychologists have proposed several ideas:
Short term memory (STM) -- only a few items at a time can be held here.
Perceptual information stored directly here.
Long term memory (LTM) -- capacity for storage is very large and fairly permanent
10
Work on episodic memory grew out of scripts.
Production systems are an example of STN-LTM computer models.
Synopsis
1. Introduction: What is perception in AI?
2. Figure: Autonomous Robot
3. For example:
4. Vision:
Signal Processing:
Measurement Analysis
Pattern Recognition
image Understanding
5. Speech Recognition
6. Speaker Dependence versus Speaker Independence:
Perception is a process to interpret, acquire, select and then organize the sensory information that is
captured from the real world.
For example: Human beings have sensory receptors such as touch, taste, smell, sight and hearing. So,
the information received from these receptors is transmitted to human brain to organize the received
information.
According to the received information, action is taken by interacting with the environment to
manipulate and navigate the objects.
11
Perception and action are very important concepts in the field of Robotics. The following figures
show the complete autonomous robot.
There is one important difference between the artificial intelligence program and robot. The AI
program performs in a computer stimulated environment, while the robot performs in the physical
world.
For example:
In chess, an AI program can be able to make a move by searching different nodes and has no facility
to touch or sense the physical world.
However, the chess playing robot can make a move and grasp the pieces by interacting with the
physical world.
Vision:
Accurate machine vision opens up a new realm of computer applications. These applications include
mobile robot navigation, complex manufacturing tasks analysis of satellite images, and medical image
processing. The question is that how we can transform raw camera images into useful information about
the world.
A Video Camera provides a computer with an image represented as a two-dimensional grid of intensity
levels. Each grid element, or pixel, may store a single bit of information (that is , black/white) or many
bits(perhaps a real-valued intensity measure and color information).
A visual image is composed of thousands of pixels. What kinds of things might we want to do with such
an image? Here are four operations, in order of increasing complexity:
1. Signal Processing: - Enhancing the image, either for human consumption or as input to another
program.
2. Measurement Analysis: - For images containing a single object, determining the two dimensional
extent of the object depicted.
3. Pattern Recognition: - For single – object images, classifying the object into a category drawn from a
finite set of possibilities.
4. image Understanding :- For images containing many objects, locating the object in the image,
classifying them, and building a three-dimensional model of the scene.
12
Speech Recognition:
Natural Language understanding systems usually accept typed input, but for a number of
applications this is not acceptable.
Spoken language is a more natural form of communication in many human-computer interfaces.
Speech recognition systems have been available for some time, but their limitations have prevented
widespread used.
The five major design issues in speech systems.
These issues also provide dimensions along which systems can be compared with one another.
Synopsis
1. Introduction
2. What are Expert Systems?
3. Capabilities of Expert Systems
4. Components of Expert Systems
Knowledge Base
Inference Engine
User Interface
5. Applications of Expert System
6. Development of Expert Systems: General Steps
7. Limitations of Expert Systems
8. Advantages of Expert Systems:
9. Disadvantages of Expert Systems:
Introduction
Expert systems (ES) are one of the prominent research domains of AI.
It is introduced by the researchers at Stanford University, Computer Science Department.
Advising
Instructing and assisting human in decision making
Demonstrating
Deriving a solution
Diagnosing
Explaining
Interpreting input
Predicting results
Justifying the conclusion
Suggesting alternative options to a problem
13
They are incapable of −
Knowledge Base
It contains domain-specific and high-quality knowledge.
Knowledge is required to exhibit intelligence.
The success of any ES majorly depends upon the collection of highly accurate and precise knowledge.
What is Knowledge?
The data is collection of facts.
The information is organized as data and facts about the task domain.
Data, information, and past experience combined together are termed as knowledge.
Knowledge Acquisition
The success of any expert system majorly depends on the quality, completeness, and accuracy
14
of the information stored in the knowledge base.
The knowledge base is formed by readings from various experts, scholars, and the Knowledge
Engineers. The knowledge engineer is a person with the qualities of empathy, quick learning,
and case analyzing skills.
He acquires information from subject expert by recording, interviewing, and observing him at
work, etc. He then categorizes and organizes the information in a meaningful way, in the form
of IF-THEN-ELSE rules, to be used by interference machine.
The knowledge engineer also monitors the development of the ES.
Inference Engine
Use of efficient procedures and rules by the Inference Engine is essential in deducting a correct,
flawless solution.
In case of knowledge-based ES, the Inference Engine acquires and manipulates the knowledge
from the knowledge base to arrive at a particular solution.
In case of rule based ES, it −
Applies rules repeatedly to the facts, which are obtained from earlier rule application.
Adds new knowledge into the knowledge base if required.
Resolves rules conflict when multiple rules are applicable to a particular case.
To recommend a solution, the Inference Engine uses the following strategies −
Forward Chaining
Backward Chaining
Forward Chaining
It is a strategy of an expert system to answer the question, “What can happen next?”
Here, the Inference Engine follows the chain of conditions and derivations and finally deduces the
outcome. It considers all the facts and rules, and sorts them before concluding to a solution.
This strategy is followed for working on conclusion, result, or effect. For example, prediction of share
market status as an effect of changes in interest rates.
Backward Chaining
With this strategy, an expert system finds out the answer to the question, “Why this happened?”
On the basis of what has already happened, the Inference Engine tries to find out which conditions
could have happened in the past for this result. This strategy is followed for finding out cause or reason.
For example, diagnosis of blood cancer in humans.
15
User Interface
User interface provides interaction between user of the ES and the ES itself. It is generally
Natural Language Processing so as to be used by the user who is well-versed in the task domain.
The user of the ES need not be necessarily an expert in Artificial Intelligence.
It explains how the ES has arrived at a particular recommendation.
The explanation may appear in the following forms −
Natural language displayed on screen.
Verbal narrations in natural language.
Listing of rule numbers displayed on the screen.
Application Description
Process Control
Controlling a physical process based on monitoring.
Systems
16
Knowledge Domain Finding out faults in vehicles, computers.
There are several levels of ES technologies available. Expert systems technologies include −
Expert System Development Environment − The ES development environment includes hardware
and tools. They are −
o Workstations, minicomputers, mainframes.
o High level Symbolic Programming Languages such as LISt Programming (LISP) and PROgrammation
en LOGique (PROLOG).
o Large databases.
Tools − They reduce the effort and cost involved in developing an expert system to large extent.
o Powerful editors and debugging tools with multi-windows.
Shells − A shell is nothing but an expert system without knowledge base. A shell provides the
developers with knowledge acquisition, inference engine, user interface, and explanation facility. For
example, few shells are given below −
o Java Expert System Shell (JESS) that provides fully developed Java API for creating an expert system.
o Vidwan, a shell developed at the National Centre for Software Technology, Mumbai in 1993. It enables
knowledge encoding in the form of IF-THEN rules.
19