AI Notes
AI Notes
Definition:
Artificial Intelligence is the branch of computer science concerned with
the study of how to make computer do things which, at the moment people
do better.
Artificial Intelligence is concerned with the design of intelligence in
an artificial device.
The term was coined by McCarthy in 1956.
There are two ideas in the definition.
1. Intelligence
2. Artificial device
What is intelligence?
Accordingly there are two possibilities:
– A system with intelligence is expected to behave as intelligently as a
human
– A system with intelligence is expected to behave in the best possible
manner.
Intelligent behavior
This discussion brings us back to the question of what constitutes intelligent
behavior. Some of these tasks and applications are:
i. Perception involving image recognition and computer vision
ii. Reasoning
iii. Learning
iv. Understanding language involving natural language processing, speech
processing
v. Solving problems
vi. Robotics
Today’s AI systems have been able to achieve limited success in some of
these tasks.
• In Computer vision, the systems are capable of face recognition
• In Robotics, we have been able to make vehicles that are
mostly autonomous.
Page 1
• In Natural language processing, we have systems that are capable of
simple machine translation.
• Today’s Expert systems can carry out medical diagnosis in a narrow
domain
• Speech understanding systems are capable of recognizing several
thousand words continuous speech
• Planning and scheduling systems had been employed in
scheduling experiments .
Achievements of Artificial Intelligence:
1. ALVINN:
Autonomous Land Vehicle In a Neural Network
The system drove a car from the East Coast of USA to the west coast, a total
of about 2850 miles. Out of this about 50 miles were driven by a human,
and the rest solely by the system.
2. Deep Blue
In 1997, the Deep Blue chess program created by IBM, beat the
current world chess champion, Gary Kasparov.
3. Machine translation
A system capable of translations between people speaking different
languages
4. Autonomous agents
In space exploration, robotic space probes autonomously monitor
their surroundings, make decisions and act to achieve their goals.
NASA's Mars rovers successfully completed their primary three-month
missions in April, 2004.
5. Internet agents
The explosive growth of the internet has also led to growing interest
in internet agents to
monitor users' tasks, seek needed information, and to learn
which information is most useful.
What can AI systems NOT do yet?
• Understand natural language robustly (e.g., read and understand articles
in a newspaper)
• Surf the web
• Interpret an arbitrary visual scene
• Learn a natural language
• Construct plans in dynamic real-time domains
Page 2
• Exhibit true autonomy and intelligence
We will now look at a few famous AI system that has been developed over
the years.
Page 3
e) Robotics
A robot is an electro-mechanical device that can be programmed to perform
manual tasks. The Robotic Industries Association formally defines a robot as “a
reprogrammable multi-functional manipulator designed to move material,
parts, tools or specialized devices through variable programmed motions for
the performance of a variety of tasks.”
f) Expert System
Page 4
Gödel built on Boole's initial logic concepts to develop
mathematical representations of logic problems.
The 1990's saw major advances in all areas of AI including the following:
• machine learning, data mining
• intelligent tutoring,
• case-based reasoning,
• multi-agent planning, scheduling,
• uncertain reasoning,
• natural language understanding and translation,
• vision, virtual reality, games, and other topics.
Page 5
What is an agent? Explain agents with example?
PROBLEM SOLVING
The steps that are required to build a system to solve a particular problem are:
Consider the problem of “Playing Chess” . to build a program that could play
chess, we have to specify the starting position of the chess board, the rules that
define legal moves. And the board position that represent a win. The goal of
the winning the game, if possible, must be made explicit.
Page 6
The starting position can be described by an 8 X 8 array square in which
each element square (x,y),
(x varying from 1to 8 & y varying from1 to 8) describes the board position of an
appropriate chess coin, the goal is any board position in which the opponent
does not have a legal move and his or her “king” is under attack. The legal
moves provide the way of getting from initial state of final state.
The legal moves can be described as a set of rules consisting of two parts: A left
side that gives the current position and the right side that describes the change to
be made to the board position. An example is shown in the following figure.
The current position of a coin on the board is its STATE and the set of all
possible STATES is STATE SPACE. One or more states where the problem
terminates is FINAL STATE or GOAL STATE . The state space representation
forms the basis of most of the AI methods.
It allows for a formal definition of the problem as the need to convert some
given situation into some desired situation using a set of permissible operations.
It permits the problem to be solved with the help of known techniques and
control strategies to move through the problem space until goal state is found.
A plan is a sequence of actions. The cost of a plan is referred to as the path cost.
The path cost is a positive number, and a common path cost may be the sum of
the costs of the steps in the path.
Page 7
Example for state space problem is water jug problem.
Statement: - We are given 2 jugs, a 4 liter one and a 3- liter one. Neither have any
measuring markers on it. There is a pump that can be used to fill the jugs with
water. How can we get exactly 2 liters of water in to the 4-liter jug?
Solution:-
‘i’ represents the number of liters of water in the 4-liter jug and ‘j’ represents the
number of liters of water in the 3-liter jug. The initial state is ( 0,0) that is no
water on each jug. The goal state is to get ( 2,n) for any value of ‘n’.
• The state space for this problem can be described as the set of ordered pairs
of integers (x,y) such that x = 0, 1,2, 3 or 4 and y = 0,1,2 or 3; x represents
the number of gallons of water in the 4-gallon jug and y represents the
quantity of water in 3-gallon jug
• The start state is (0,0)
• The goal state is (2,n)
(2 litre water in 4 litre jug, n means any quantity of water in 3 litre jug, since
problem doesnot specify how many litres of water in 3 litre jug.)
{ ( i ,j ) i = 0,1,2,3,4 j = 0,1,2,3}
To solve this we have to make some assumptions not mentioned in the problem.
They are
1. We can fill a jug from the pump.
Page 8
The various operators (Production Rules) that are available to solve this
problem may be stated as given in the following figure.
Page 9
What is Production system?
• We must first reduce it to one for which a precise statement can be given.
This can be done by defining the problem’s state space (start and goal states)
and a set of operators for moving that space.
• The problem can then be solved by searching for a path through the
space from an initial state to a goal state.
• The process of solving the problem can usefully be modeled as a
production system.
• How to decide which rule to apply next during the process of searching for
a solution to a problem?
• The two requirements of good control strategy are that
– it should cause motion.
Page 10
– It should be systematic
Search in AI:
Another crucial general technique required when writing AI programs is search.
Often there is no direct way to find a solution to some problem. However, you do
know how to generate possibilities. For example, in solving a puzzle you might
know all the possible moves, but not the sequence that would lead to a solution.
When working out how to get somewhere you might know all the
roads/buses/trains, just not the best route to get you to your destination quickly.
Developing good ways to search through these possibilities for a good solution is
therefore vital. Brute force techniques, where you generate and try out every
possible solution may work, but are often very inefficient, as there are just too
many possibilities to try. Heuristic techniques are often better, where you only try
the options, which you think (based on your current best guess) are most likely to
lead to a good solution.
Page 11
****Search techniques in AI:
1.Blind search:we move through the space without worrying about what is
coming next, but recognising the answer if we see it
Page 12
We may want to search for the first answer that satisfies our goal, or we may want
to keep searching until we find the best answer.
Breadth first search is also like depth first search. Here searching progresses level
by level. Unlike depth first search, which goes deep into the tree. An operator
employed to generate all possible children of a node. Breadth first search being
the brute force search generates all the nodes for identifying the goal.
Page 13
Example for Breadth first search:
Page 14
Page 15
***Depth First Search:
The searching process in AI can be broadly classified into two major types. Viz.
Brute Force Search and Heuristics Search. Brute Force Search do not have any
domain specific knowledge. All they need is initial state, the final. state and a set
of legal operators. Depth-First Search is one the important technique of Brute
Force Search.
In Depth-First Search, search begins by expanding the initial node, i.e., by using
an operator, generate all successors of the initial node and test them.
Page 16
Algorithm for Depth first search:
Page 17
***What is Heuristic Search?
• A Heuristic is a technique that improves the efficiency of a search process,
possibly by sacrificing claims of completeness.
• Heuristics are like tour guides
• They are good to the extent that they point in generally
interesting directions;
• They are bad to the extent that they may miss points of interest to
particular individuals.
• On the average they improve the quality of the paths that are explored.
• Using Heuristics, we can hope to get good (though possibly nonoptimal )
solutions to hard problems such as a TSP in non exponential time.
• There are good general purpose heuristics that are useful in a wide variety
of problem domains.
Page 18
• Special purpose heuristics exploit domain specific knowledge
• Applying to TSP:
Heuristic Function
– the weights given to individual aspects are chosen in such a way that
• The value of the heuristic function at a given node in the search process
gives as good an estimate as possible of whether that node is on the
desired path to a solution.
Well designed heuristic functions can play an important part in efficiently guiding
a search process toward a solution.
h(n) = estimated cost of the cheapest path from node n to a goal node
Heuristic for Delhi may be straight-line distance between Bengaluru and Delhi
Page 20
Test to see if this is actually a solution by comparing the chosen point at the end
point of the chosen path to the set of acceptable goal states.
The generate - and - Test algorithm is a depth first search procedure because
complete possible solutions are generated before test. This can be implemented
states are likely to appear often in a tree; it can be implemented on a search
graph rather than a tree.
***Hill Climbing
A variant of generate and test in which feedback from the test procedure is used to
help the generator decide which direction to move in the search space.
Hill climbing often used when a good heuristic function is available for
evaluating states but
Eg. Suppose you are in an unfamiliar city without a map and you want to
get down. You simply aim for the tall buildings.
Here the heuristic function is the distance between the current location and
the location of the tall buildings and the desirable states are those in which
this distance is minimized.
Page 21
***What is Best first search?
Best first search combines the advantages of both depth first search and breadth
first search.
One way to combine the two is to follow a single path at a time, but switch path
whenever some competing path looks more promising than the current one.
At each step, we select the most promising of the nodes we have generated so far.
This is done by applying an appropriate heuristic function to each of them. We
then expand the chosen node by using the rules to generate it successors.
If one them is a solution, we can quit if not, all those new nodes are added to
the set of nodes generated so far.
Again the most promising node is selected and the process continues.
Page 22
Graphs of these types are called or graphs because each of its branches
represents an alternative problem solving path.
A is an initial node, which is expand to B,C and D. A heuristic function, say cost of
reaching the goal , is applied to each of these nodes, since D is most promising, it
is expanded next, producing two successor nodes E and F. Heuristic function is
applied to them.
Now out of the four remaining ( B,C and F) B looks more promising and hence it
is expand generating nodes G and H . Again when evaluated E appears to be the
next stop J has to be expanded giving rise to nodes I and J. In the next step J has
to be expanded, since it is more promising this process continues until a solution
is found.
1. Open – nodes that have been generated and had the heuristic
function applied to them but which have not yet been examined.
Page 23
4. It is convenient to define this function as a sum of two components g and h’
ie f’ = g + h’
5. g – is the cost of getting from the initial node to the current node.
6. h’ – estimate of the additional cost of getting from the current node to the
goal state.
7. f – Estimate of the cost of getting from the initial state to a goal state.
****Explain A* ALGORITHM
A Star algorithm is a best first graph search algorithm that finds a least cost
path from a given initial node to one goal node.
Keywords used:
Evaluation Function f(n):At any node n,it estimates the sum of the cost of the
minimal cost path from start node s to node n plus the cost of a minimal cost path
from node n to a goal node.
f(n)=g(n)+h(n)
Page 24
Where g(n)=cost of the path in the search tree from s to n;
Function f*(n):At any node n,it is the actual cost of an optimal path m node s
to node n plus the cost of an optimal path from node n to a goal node.
f*(n)=g*(n)+h*(n)
h*(n)=cost of the optimal path in the search tree from n to a goal node;
h*(n):It is the cost of the minimal cost path from n to a goal node and any path
from node n to a goal node that acheives h*(n)is an optimal path from n to a goal.
h is an estimate of h*.
A* Algorithm
Step1: Create a single node comprising at root node
Step3: If it is not then remove it from the queue load it to the list of visited nodes,
Consider its child nodes if any and evaluate them with evaluation
the function.
f(n)=g(n)+h(n) and add it to the queue and reorder the states o the basi of
n s
heuristic merit.
Page 25
****PROBLEM REDUCTION - AND - OR graphs - AO * Algorithm
When a problem can be divided into a set of sub problems, where each sub
problem can be solved separately and a combination of these will be a solution,
AND-OR graphs or AND - OR trees are used for representing the solution.
The decomposition of the problem or problem reduction generates AND arcs. One
AND are may point to any number of successor nodes. All these must be solved so
that the arc will rise to many arcs, indicating several possible solutions. Hence the
graph is known as AND - OR instead of AND. Figure shows an AND - OR graph.
An algorithm
to find a solution in an AND - OR graph must handle AND area appropriately. A*
algorithm can not search AND - OR graphs efficiently. This can be understand
from the give figure.
In figure (a) the top node A has been expanded producing two area one leading to
B and leading to C-D . the numbers at each node represent the value of f ' at that
node (cost of getting to the goal state from current state). For simplicity, it is
assumed that every operation(i.e. applying a rule) has unit cost, i.e., each are with
single successor will have a cost of 1 and each of its components.
Page 26
With the available information till now , it appears that C is the most promising
node to expand since its f ' = 3 , the lowest but going through B would be better
since to use C we must also use D' and the cost would be 9(3+4+1+1). Through
B it would be 6(5+1).
Thus the choice of the next node to expand depends not only n a value but also
on whether that node is part of the current best path form the initial mode. Figure
(b) makes this clearer.
In figure the node G appears to be the most promising node, with the least f '
value. But G is not on the current best path, since to use G we must use GH with a
cost of 9 and again this demands that arcs be used (with a cost of 27). The path
from A through B, E-F is better with a total cost of (17+1=18). Thus we can see
that to search an AND-OR graph, the following three things must be done.
1. traverse the graph starting at the initial node and following the current best
path, and accumulate the set of nodes that are on the path and have not yet
been expanded.
2. Pick one of these unexpanded nodes and expand it. Add its
successors to the graph and computer f ' (cost of the remaining
distance) for each of them.
3. Change the f ' estimate of the newly expanded node to reflect the new
information produced by its successors. Propagate this change backward
through the graph. Decide which of the current best path.
Page 27
Referring the figure. The initial node is expanded and D is Marked initially as
promising node. D is expanded producing an AND arc E-F. f ' value of D is
updated to 10. Going backwards we can see that the AND arc B-C is better . it is
now marked as current best path. B and C have to be expanded next.
This process continues until a solution is found or all paths have led to dead ends,
indicating that there is no solution. An A* algorithm the path from one node to the
other is always that of the lowest cost and it is independent of the paths through
other nodes.
Each node in G points down to its immediate successors and up to its immediate
predecessors, and also has with it the value of h' cost of a path from itself to a set
of solution nodes. The cost of getting from the start nodes to the current node "g"
is not stored as in the A* algorithm.
This is because it is not possible to compute a single such value since there may
be many paths to the same state. In AO* algorithm serves as the estimate of
goodness of a node. Also a there should value called FUTILITY is used.
The estimated cost of a solution is greater than FUTILITY then the search
is abandoned as too expensive to be practical.
2. Traverse the graph following the current path accumulating nodes that have
not yet been expanded or solved
3.Pick any of these nodes and expand it and if it has no successors call this value
FUTILITY otherwise calculate only f' for each of the successors.
5.Change the value of f' for the newly created node to reflect its successors by back
propagation.
6.Wherever possible use the most promising routes and if a node is marked as
SOLVED then mark the parent node as SOLVED.
7.If starting node is SOLVED or value greater than FUTILITY, stop, else repeat
from 2.
Most of the search strategies either reason forward or backward however, often a
mixture of the two directions is appropriate. Such mixed strategy would make it
possible to solve the major parts of problem first and solve the smaller problems
that arise when combining them together. Such a technique is called "Means - Ends
Analysis".
The means -ends analysis process centers around finding the difference between
current state and goal state. The problem space of means - ends analysis has an
initial state and one or more goal state, a set of operate with a set of preconditions
their application and difference functions that computes the difference between two
state a(i) and s(j). A problem is solved using means - ends analysis by
Page 29
3. The operator OP is applied if possible. If not the current state is solved a goal is
created and means- ends analysis is applied recursively to reduce the sub goal.
4. If the sub goal is solved state is restored and work resumed on the
original problem.
( the first AI program to use means - ends analysis was the GPS General problem
solver)
Example:
Assume the robot in this domain was given the problem of moving a desk with
two things on it from one room to another.
The difference between the start state and the goal state would be the location of
the desk.
Move * *
object
Move *
robot
Clear *
object
Get *
object
on
object
Get * *
arm
empty
Page 30
Be *
holding
object
arm empty
Page 31
Min-Max Algorithm:
Page 32
****Mini-Max with Alpha-Beta cut off
Page 33
Alpha-Beta pruning example
********End********
Page 34
Chapter 2: Knowledge and Knowledge Representation
Definition: Knowledge can be defined as the body of facts and principles
accumulated by human kind or the act, fact or state of knowing. Also knowledge is
having a familiarity with language, concepts procedures, rules, ideas, abstractions,
places, customs, beliefs, facts and associations coupled with an ability to use these
notions effectively in modeling different aspects of the world.
***Properties of knowledge:
Knowledge requires data
Knowledge is voluminous
It is hard to characterize accurately
It is constantly changing
It is differ from data by being organized in a way that corresponds to
the ways it will be used.
Certain constraints that should be kept in mind while designing AI technique to
solve any AI problem.
Knowledge captures generalizations. i.e. Situations that share
important properties are grouped together.
Knowledge can be understood by people who must provide it
although in most of the cases data can be acquired
automatically.
It can be easily modified to correct errors and to reflect
changes in the world.
It can be used in a great many situations even if it is not
totally accurate or complete.
It can be used to help overcome its own sheer bulk by
helping to narrow the range of possibilities that must usually
be considered.
Page 35
***Types of knowledge:
1. Procedural Knowledge is a compiled knowledge related to the performance
of some task. E.g. the steps used to solve an algebraic equation are expressed
as procedural knowledge.
2. Declarative Knowledge is a passives about knowledge expressed as
statements of fact about the world. E.g. personnel data in explicit pieces of
independent knowledge.
3. Heuristic Knowledge A special type of knowledge used by humans to solve
complex problems. Heuristics are the strategies, tricks or rules of thumb
used to simplify the solution of problems. Heuristics are usually acquired
with much experience. E.g. A fault in a television set located by an
experienced technician without doing numerous voltage checks.
At this junction we must distinguish knowledge and other concepts such as belief
and hypotheses.
Belief: Belief can be defined as essentially any meaning and coherent expression
that can be represented. A belief may be true or false.
Hypothesis: Hypothesis can be defined as justified belief that is not known to be
true. Through hypothesis is a belief which is backed up with some supporting
evidence, but it may still be false. Finally, we define knowledge as true justified
belief.
Two other terms which we shall occasionally use are epistemology and Meta
knowledge.
Epistemology is the study of the nature of knowledge.
Meta knowledge is knowledge about knowledge, i.e. knowledge about what we
know.
Importance of knowledge: AI has given new meaning for knowledge. It is
possible to “Package” specialized knowledge and sell it with a system that can use
it to reason and draw conclusions. Also the system, which is untiring and being a
reliable advisor that gives high level professional advice in specialized areas, such
as
Manufacturing techniques
Sound financial strategies
Ways to improve one’s health
Marketing strategies
Optimal farming plans, etc,
Page 36
Knowledge-Based System: Knowledge- based systems depend on a rich base of
knowledge to perform difficult task where as general purpose problem solves use a
limited number of laws or axioms, which are too weak to be effective in solving
problems of any complexity.
Edward feigenbaum emphasized the fact that the real power of an expert system
comes from the knowledge it possesses. E.g. MYCIN, an expert system developed
to diagnose in factious blood diseases.
Components of knowledge – based system
Written Text
Character Strings
Binary Numbers
Magnetic spots
Various Knowledge Representation Schemes
PL (Propositional Logic)
FOPL (First Order Predicate Logic)
Frames
Associative Networks
Model Logics
Object Oriented Methods etc.
Page 37
Knowledge may vague, contradictory or incomplete. Yet we would still like to be
able to reason and make decisions. Humans do remarkably well with fuzzy,
incomplete knowledge. We would also like our AI programs to demonstrate this
versatile.
Mapping between facts and representation Facts
Internal Representation (Understanding the English) Reasoning Program
(English Generation) English Representation
Page 38
Formalized Symbolic Logics
Symbol Meaning
→ Implication
or Negation
˅ OR
˅ For all
ᴲ there exists
Logic is a formal method for reasoning, which has a sound theoretical foundation.
This is especially important in our attempts to mechanize or automate the
reasoning process in that inferences should be correct and logically sound. The
Structure of PL or FOPL must be flexible enough to permit the accurate
representation of natural language reasonably well. Many concepts which can be
verbalized can be translated into symbolic representation which closely
approximates the meaning of these concepts. These symbolic structures can then be
manipulated in programs to deduce various facts to carry out a form of automated
reasoning.
In FOPL, statements from a natural language like English are translated into
symbolic structures comprises predicates functions, variables, constants, quantifies
and logical connections. The symbols from the basic building blocks for the
knowledge and their combination into valid structures are accomplished using the
syntax (rules of combination) for FOPL. Once structures have been created to
represent basic facts or procedure or other types of knowledge inference rules may
then be applied to compare, combine and transform these “assumed” structured
into new “deduced” structures. This is how automated reasoning or inference is
performed.
Page 39
Some simple facts in propositional logic
It is raining
RAINING
It is sunny
SUNNY
It is windy
WINDY
RAININ → SUNN
We can conclude from the fact that it is raining the fact that is not sunny.
But we want to represent the obvious fact stated by the classical sentence.
Gandhi is a Man.
Einstein is a Man.
Which would be a totally separate assertion and we would not be able to draw any
conclusion about similarities between Gandhi and Einstein.
It is raining.
Snow is white.
We will use capital letters sometimes followed by digits to stand for propositions.
T and F are special symbols having the values true and false respectively.
We could write (R ˄ B)
If we write
R ˅ B we mean
“It is raining or the wind is blowing or both” i,e., V indicates inclusive disjunction.
Syntax
Negation (~P)
And (P & Q)
Or (P V Q)
Implication (P Q)
Page 41
Equivalent (P ↔Q)
All formulae are generated from a finite number of the above operations:
Semantics
The semantics or meaning of a sentence is just the value true or false; that is, it is
an assignment of a truth value to the sentence. An interpretation a sentence or
group of semantics is an assignment of truth value to each proportional symbol.
Consider a statement
(P & ~Q)
Once an interpretation has been given to a statement, its truth value can be
determined. This is done by application of semantic rules to larger and layer parts
Page 42
The semantic rules are summarized in the following table where “t” and “t’”
denote any true statements, “f ” and “f ‘ ”denote any false statements and “a” is
any statement.
1 T F
2 f t
3 t & t’ f&a
4 t˅a a&f
5 a˅t f ˅ f’
6 a→t t→f
7 f→a t→f
8 t→t’ f→t
9 f→f’
Page 43
Rule 6: gives (P & ~Q) R as false
Rule 5: gives the statement value as false
Properties of Statements:
Valid: A sentence is valid if it is true for every interpretation. Valid sentences are
also called tautologies.
Equivalence: Two sentences are equivalent if they have the same truth value under
every interpretation.
Logical Consequences:
E.g. P is satisfiable but not valid since an interpretation that assigns false to P
assigns false to the sentence P.
P and ( P) are equivalent since each has the same truth values under every
interpretation.
Page 44
There are two theorems which give criteria for a statement to be a logical
consequence of a set of statements.
Idem potency P ˅ P = P, P ˄ P = P
Associativity (P ˅ Q) ˅ R = P ˅ (Q ˅ R)
(P˄ Q) ˄ R = P ˄ (Q ˄ R)
Commutativity (P ˅ Q) = (Q ˅ P)
(P˄ Q) = (Q ˄ P)
P↔Q = Q↔P
Distributivity P ˄ (Q ˅ R) = (P ˄ Q)˅(P ˄ R)
P ˅ (Q ˄ R) = (P ˅ Q)˄(P ˅ R)
De Morgan’s (P ˅ Q) = P ˄ Q
(P ˄Q) = P˅ Q
Page 45
Bi conditional elimination P↔Q = ( P→ Q) ˄ (Q → P)
****Predicate Logic:
Predicate – contents of statements.
The logic based upon the analysis of predicates in any statement is called predicate
logic.
Introduction:
Page 46
of predicates in place of propositions, the use of functions and the use of variables
together with quantifiers.
The syntax for FOPL like PL is determined by the allowable symbols and rules of
combinations. The semantics of FOPL are determined by interpretations assigned
to predicates rather than propositions. This means that an interpretation must also
assign values to other terms including constants, variables and functions.
Syntax of FOPL:
The symbols and rules of combination permitted in FOPL are defined as follows.
Connections , ˄,˅,→,↔
Constants: Fixed value terms that belong to a given domain, denoted by numbers,
words, E.g. Flight- 102, ak – 47, etc;
Variables: Terms that can assume different values over a given domain, denoted
by words.
E1: All employees earning Rs. 1, 00,000 or more per year pay taxes.
Valid Examples:
MECHANIC (Arun)
MAN( Kunal)
Page 48
Constant should not have predicate arguments.
Predicate Logic:
The Logic based upon the analysis of predicates in any statement is called
predicate logic.
E.g. Our Domain - All entities that make up the MCA Dept. in PESIT.
Dept-grade average(y)
Advisor of (z)
Predicates - HOD(x)
-----------------
-------------------
Interpretation is given to wff only when values are assigned to each term and to
each predicate symbol. If the truth values of two different wffs are same under
every interpretation they are said to be equivalent. A predicate (or wff) that has no
variable is called a ground atom.
Predicates that have variable arguments will be determined to true only if they are
true for the appropriate values of the variables.
E.g. P(x) in ˅(for all) x:P(x) is true only if it is true for every value of x in the
domain D.
Page 49
P(x) in ᴲx: P(x) is true only if it true for at least one value of x in the domain D.
a is a constant
x is a variable.
Here E is quantified with the universal quantifier ˅(for all) x. It will evaluate to
true only if it evaluates to true for all x in the domain D.
D= {1,2}
If x=1,
C(1) – true
D(1) – false
Interpretation I for x=2 from D will also evaluate the statement E to false.
Page 50
Representation of simple facts as a set of wffs in predicate Logic:
Or
˅ (for all)x: Roman (x)→[(Loyalto(x, Caesar )˅ Hate(x,
caesar)) ˄ (Loyal to (x, Caesar )˄Hate (x,Caesar)
From 7 and 8
Page 51
Statements in Symbolic form:
Page 52
If the universe for the statement “All Monkeys have tails ” consists only of
Monkeys then this statement is merely.
However, if the universe consists of objects some of which are not monkeys, a
further refinement is necessary.
“All Monkeys have tails” makes no statement about objects in the universe, which
are Monkeys? If the object is a monkey then it has or does not have a tail, the
statement is false, otherwise it is true.
“For all x, if x is a Monkey, then x has a tail” and it can be written as ((˅(for all)
x) [M(x) →P(x)].
The statement (2) means “for all x if x is a Monkey, then x has no tail” and it can
be written as (˅ (for all) x)[M(x) → P(x)]
The statement (3) means “there is an x such that x is a Monkey and x has a tail”
and can be written as (ᴲx) [M(x) ˄ P(x)]
The statement (4) means “there is an x such that x is a Monkey” and can be written
as (ᴲx) [M(x) ˄ P(x)]
Page 53
****Write the following sentences in symbolic form:
Solution:
R(x) : x is rewarded.
G(x) : x is good.
A(x) : x is ambitious.
Q(x) : x is teasing.
S(x) : x is a road.
Then
d. ‘Some one is teasing’ can be written as “Then is one x such that x is a person
and x is teasing”.
Symbolic form: (ᴲx) [P(x) ˄ Q(x)]
Page 54
e. The statement can be written as (˅ (for all) x)[s(x) → L(x)] or (ᴲ(x))[s(x)
˄ L(x)]
Associative Networks
Association networks are depicted as directed graphs with labeled nodes and
arcs or arrows. The language used in constructing a network is based on
selected domain primitives for objects and relations as well as some general
primitives.
Here, a class of objects known as bird is depicted. The class has some
properties and a specific member of the class named tweety is shown. The color
of tweety is seemed to be yellow. Associative networks were introduced by quilt
ion in the year 1968 to model the semantics of English sentences and words.
A number of arc relations have become common among users. They include as
ISA, MEMBER-OF, SUBSET-OF, AKO (a-kind of), HAS-PARTS,
INSTANCE-OF, AGENT, and ATTRIBUTES, SHARED-LIKE and so forth.
Less common arcs have also been used to express modality relations (time,
manner, and mood), linguistics case relations (theme, source, and goal), logical
connectives, quantifiers, set relations, attributes and quantification (ordinal,
count).
The ISA link is most often used to represent the fact that an object is of a certain
type. The ISA predictive has been used to exhibit the following types of
structures:
Page 56
***GENERIC- GENERIC RELATIONSHIPS
The semantics of associative networks are sometimes defined along the some
lines as that of traditional logics. In fact, some network system definitions
provide a means of mapping to and from PL or FOPL expressions. For these
systems, the semantics are based on interpretations. Thus, an interpretation
satisfies a portion of network if and only if all are relations hold in the given
portion.
Conceptual Graphs
. Recognize inconsistencies
. Recognize inconsistencies
The inference engine(IE) may tell the TMS may some sentences are contradictory.
Then TMS may find that all those sentences are believed true, and reports to the
IE which can eliminate the inconsistencies by determining the assumptions used
and changing them appropriately.
Eg. A statement that either x,y or z is guilty together with other statements that x is
not guilty, y is not guilty, and z is not guilty form a contradiction.
Page 58
Support default reasoning
Statistical reasoning
In the logical based approaches described, we have assumed that every thing
is either believed false or believed true.
However, it is often useful to represent the fact that we believe such that
something is probably true, or true with probability.
This is useful for dealing with problems where there is randomness and
unpredictability(such as in games of choice) and also for dealing with problems
where we could, if we had sufficient information, work out exactly what is true.
Probability
The basic approach statistical methods adopt to deal with uncertainty is via
the axioms of probability:
So given a pack of playing cards the probability of being dealt an ace from a full
normal deck is 4 (the number of aces) / 52 (number of cards in deck) which is 1/13.
In many problem solving systems we collect evidence as the system proceeds and
modify the behavior on the basis of the evidence. To model this behavior we need
a statistical theory and Bayesian theory is one.
P(Hi\E)=P(E\Hi)P(Hi)™
Page 59
--------------- P(E\Hn)P(Hn) [for n=1 to k]
****FUZZY LOGIC
This contrasts with the standard Boolean definition for tall people where one is
either tall or not and there must be a specific height that defines the boundary. The
same is true for very tall. In fuzzy logic, one’s tallness increases with one’s height
until the value 1 is reached. So it is a distribution.
Once set membership has been redefined in this way, it is possible to define a
reasoning system based on techniques for combining distributions.
Page 60
***Structured Representation of Knowledge
But using logical formalism complex structures of the world, objects and their
relationships, events, sequences of events etc. can not be described easily.
By using schemas, people as well as programs can exploit the fact that the real
world is not random. There are several types of schemas that have proved useful
in AI programs. They include
Frames and scripts are used very extensively in a variety of AI programs. Before
selecting any specific knowledge representation structure, the following issues
have to be considered.
All these structures share a common notion that complex entities can be describe
as a collection of attributes and associated values (hence they are often called “slot-
and –filter structures”) ie., these structures have the form of ordered triples
Page 62
****Conceptual Dependency (CD)
In the above
Double arrow indicates two may link between actor and the action
ATRANS is one of the primitive acts used by the theory . it indicates transfer of
possession
Page 63
MOVE - Movement of a body part by its owner (eg : kick)
GRASP - Grasping of an object by an actor(Eg: throw)
INGEST - Ingesting of an object by an animal (Eg: eat)
EXPEL - Expulsion of something from the body of an animal (cry)
MTRANS - Transfer of mental information(Eg: tell)
MBUILD - Building new information out of old(Eg: decide)
SPEAK - Production of sounds(Eg: say)
ATTEND - Focusing of sense organ toward a stimulus (Eg: listen)
Page 64
Unit III-PLANNING
What is planning?
Page 65
***Blocks World Planning Examples
The stacking is achieved using a robot arm which has fundamental operations and
states which can be assessed using logic and combined using logical operations.
The robot can hold one block at a time and only one block can be moved at a time.
UNSTACK(A,B)
pick up clear block A from block B;
STACK(A,B)
place block A using the arm onto clear block B;
PICKUP(A)
lift clear block A with the empty arm;
PUTDOWN(A)
place the held block A onto a free space on the table.
Page 66
and the five predicates:
ON(A,B)
block A is on block B.
ONTABLE(A)
block A is on the table.
CLEAR(A)
block A has nothing on it.
HOLDING(A)
the arm holds block A.
ARMEMPTY
the arm holds nothing
Using logic but not logical notation we can say that
If the arm is holding a block it is not empty
If block A is on the table it is not on any other block
If block A is on block B,block B is not clear.
Page 67
i. Choice of best rule
finding
then
the differences between the current states and the goal states and
ii.Rule application
Previously rules could be applied without any difficulty as complete
systems were specified and rules enabled the system to progress from one
state to the next.
Now we must be able to handle rules which only cover parts of systems.
A number of approaches to this task have been used.
STRIPS:
aapplied.
set of prerequisites that must be true before the operator can be
Page 68
Consider the following example in the Blocks World and the fundamental
operations:
STACK
Requires the arm to be holding a block A and the other block B to be clear.
Afterwards the block A is on block B and the arm is empty and these are
true ADD; The arm is not holding a block and block B is not clear;
predicates that are false DELETE;
UNSTACK
Requires that the block A is on block B; that the arm is empty and that block
A is clear. Afterwards block B is clear and the arm is holding block A ADD;
The arm is not empty and the block A is not on block B DELETE;
We have now greatly reduced the information that needs to be held. If a new
attribute is introduced we do not need to add new axioms for existing
operators. Unlike in Green's method we remove the state indicator and use a
database of predicates to indicate the current state
Thus if the last state was:
ONTABLE(B) ON(A,B) CLEAR(A)
Detecting Progress
The final solution can be detected if we can devise a predicate that is true when
the solution is found and is false otherwise. Requires a great deal of thought and
requires a proof.
Sometimes it is clear that solving a problem one way has reduced the
problem to parts that are harder than the original state.
Page 69
By moving back from the goal state to the initial state it is possible to detect
conflicts and any trail or path that involves a conflict can be pruned out.
Reducing the number of possible paths means that there are more resources
available for those left.
Supposing that the computer teacher is ill at a school there are two possible
alternatives transfer a teacher from mathematics who knows computing or
bring another one in.
Possible Problems:
If the math’s teacher is the only teacher of maths the problem is not solved.
Basic Idea to handle interactive compound goals uses goal stacks, Here the
stack contains :
Consider the following where wish to proceed from the start to goal state.
Page 70
We then split the problem into four subproblems
Two are solved as they already are true in the initial state -- ONTABLE(A),
ONTABLE(D).
1. ON(C,A)
2.
3. ON(B,D)
4.
5. ON(C,A) ON(B,D)
6.
7. ONTABLE(A)
8. ONTABLE(D)
9.
10.
11. ON(B,D)
12.
13. ON(C,A)
14. ON(C,A) ON(B,D)
15.
16. ONTABLE(A)
17. ONTABLE(D)
18.
19.
The method is to
Investigate the first node on the stack ie the top goal.
CLEAR(D)
HOLDING(B)
Page 71
CLEAR(D) HOLDING(B)
STACK (B, D)
PICKUP(C)
At this point the top goal is true and the next and thus the combined
goal leading to the application of STACK (B,D), which means that the
world model becomes
This means that we can perform PICKUP(C) and then STACK (C,A)
Now coming to the goal ON(B,D) we realise that this has already been
achieved and checking the final goal we derive the following plan
1. UNSTACK(B,A)
2. STACK (B,D)
3. PICKUP(C)
4. STACK (C,A)
This method produces a plan using good Artificial Intelligence techniques such as
heuristics to find matching goals and the A* algorithm to detect unpromising paths
which can be discarded.
Page 72
*****Sussman Anomaly
ON(A,B) ON(B,C)
1. ON(A,B)
2. ON(B,C)
3.
4. ON(A,B) ON(B,C)
5.
6.
7. ON(B,C)
8. ON(A,B)
9.
10. ON(A,B) ON(B,C)
11.
12.
Choosing path 1 and trying to get block A on block B leads to the goal stack:
13. ON(C,A)
14. CLEAR(C)
15.
16. ARMEMPTY
Page 73
17.
18. ON(C,A) CLEAR(C) ARMEMPTY
19.
20. UNSTACK(C,A)
21.
22. ARMEMPTY
23.
CLEAR(A) ARMEMPTY
PICKUP(A)
CLEAR(B) HOLDING(A)
STACK(A,B)
ON(B,C)
ON(A,B) ON(B,C)
This achieves block A on block B which was produced by putting block C on
the table.
The sequence of operators is
1. UNSTACK(C,A)
2. PUTDOWN(C)
3. PICKUP(A)
4. STACK (A,B)
Working on the next goal of ON(B,C) requires block B to be cleared so that it can
be stacked on block C. Unfortunately we need to unstack block A which we just
did. Thus the list of operators becomes
1. UNSTACK(C,A)
2. PUTDOWN(C)
3. PICKUP(A)
4. STACK (A,B)
5. UNSTACK(A,B)
6. PUTDOWN(A)
7. PICKUP(B)
Page 74
8. STACK (B,C)
To get to the state that block A is not on block B two extra operations are needed:
1. PICKUP(A)
STACK(A,B)
Steps 4 and 5 are opposites and therefore cancel each other out,
Steps 3 and 6 are opposites and therefore cancel each other out as
well. So a more efficient scheme is:
1. UNSTACK(C,A)
2. PUTDOWN(C)
3. PICKUP(B)
4. STACK (B,C)
5. PICKUP(A)
6. STACK(A,B)
Page 75
Nonlinear Planning Using Constraint Posting
suggesting operators,
trying to order them, and
In this problem means-end analysis suggests two steps with end conditions
ON(A,B) and ON(B,C) which indicates the operator STACK giving the layout
shown below where the operator is preceded by its preconditions and followed by
its post conditions:
CLEAR(B)
CLEAR(C)
*HOLDING(A) *HOLDING(B)
__________________ __________________
STACK(A,B) STACK(B,C)
Page 76
__________________ __________________
ARMEMPTY ARMEMPTY
ON(A,B) ON(B,C)
~CLEAR(B) ~ CLEAR(C)
~ HOLDING(A) ~HOLDING(B)
NOTE:
There is no order at this stage.
Unachieved preconditions are starred (*).
Both of the HOLDING preconditions are unachieved since the arm holds
nothing in the initial state.
Delete postconditions are marked by (~ ).
Many planning methods have introduced heuristics to achieve goals
or preconditions.
****Hierarchical Planning
In order to solve hard problem, a problem solver may have to generate long
plans. In order to do that efficiently, it is important to be able to eliminate some
of the details of the problem until a solution that addresses the main issue is
found. Then an attempt can be made to fill in the appropriate details.
Early attempt to do this involved the use of macro operators, in which large
operators were built from smaller ones. But in this approach no details
were eliminated from the actual descriptions of the operators.
Page 77
The ABSTRIPS approach to problem solving is as follows: First solve the problem
completely, considering only preconditions whose criticality value is the highest
possible.
Because this process explores entire plans at one level of detail before it looks at
the lower level details of any one of them, it has been called length-first search.
***Perception
We perceive our environment through many channels: sight, sound, touch, smell,
taste. Many animals processes these same perceptual capabilities , and others
also able to monitor entirely different channels.
Robots, too, can process visual and auditory information, and they can also
equipped with more exotic sensors. Such as laser rangefinders, speedometers
and radar.
Two extremely important sensory channels for human are vision and spoken
language. It is through these two faculties that we gather almost all of the
knowledge that drives our problem-solving behaviors.
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.
Page 78
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.
Image understanding is the most difficult visual task, and it has been the
subject of the most study in AI. While some aspects of image understanding reduce
to measurement analysis and pattern recognition, the entire problem remains
unsolved , because of difficulties that include the following:
2. One image may contain several objects, and some objects may partially
occlude others.
As a result, 2-D images are highly ambiguous. Given a single image, we could
construct any number of 3-D worlds that would give rise to the image . it is
impossible to decide what 3-D solid it should portray. In order to determine the most
likely interpretation of a scene , we have to apply several types of knowledge.
****Robot Architecture
Page 79
Now let us turn what happen when we put it all together-perception, cognition,
and action.
There are many decisions involved in designing an architecture that integrates
all these capabilities, among them:
What range of tasks is supported by the architecture?
What type of environment(e.g. indoor, outdoor, space) is supported?
How are complex behaviors turned into sequence of low-level action?
Is control centralized or distributed
How are numeric and symbolic representations merged
How does the architecture represent the state of the world?
How quickly can the architecture react to changes in the environment?
How does the architecture decide to plan and when to act?
3. Robot sensors are inaccurate, and their effectors are limited in precision.
4. many robots must react in real time. A robot fighter plane, for example,
cannot afford to search optimally or o stop monitoring the world during a
LISP garbage collection.
Page 80
5. the real world is unpredictable, dynamic, and uncertain. A root cannot
hope to maintain a correct and complete description of the world. This
means that a robot must consider the trade-off between devising and
executing plans. This trade-off has several aspects.
For one thing a robot may not possess enough information about the world for it
to do any useful planning. In that case, it must first engage in information
gathering activity . furthermore, once it begins executing a plan, the robot must
continually the results of its actions. If the results are unexpected, then re-planning
may be necessary.
6. Because robots must operate in the real world, searching and back tracking
can be costly.
Recent years have seen efforts to integrate research in robotics and AI. The old
idea of simply sensors and effectors to existing AI programs has given way to a
serious rethinking of basic AI algorithms in light of the problems involved in
dealing with the physical world.
*****Waltz Algorithm.
Many perceptual tasks appear to be highly complex. ttis is because the number of
interpretations that can be assigned to individual components of an input is large
and the number of combinations of those components also appears to be enormous.
But a clear analysis well reveal that many do the combinations cannot actually
occur. These natural constraints can be exploited in the understanding process to
reduce the complexity from unmanageable to manageable.
There are two important steps in the use of constraints in problem solving:
Consider for example a three dimensional line drawing . The analysis process is to
determine the object described by the lines. The geometric relationships between
Page 81
different types of line junctions helped to determine the object
types.
Conversely, convex edges produce a convexly viewed depth (greater than 180
degrees), and a boundary edge outlines a surface that obstracts other objects.
To label a concave edge, a mints sign is used. Convex edges one labeled with a
plus sign, and a right or left arrow is used to label the boundary edges. By
restricting vertices to be the intersection of three object faces, it is possible to
reduce the number of basic vertex types to only four : the L, the T , the Fork and
the Arrow.
Page 82
Valid junction labels for three-dimensional shapes.
When a three-dimensional object is viewed from all possible positions, the four
junction types, together with the valid edge labels, give rise to eighteen different
permissible junction configurations as shown in figure.
Geometric constraints, together with a consistent labeling scheme, can simplify the
object identification process. A set of labeling rules which facilitates this process
can be developed for different classes of objects. The following rules will apply for
many polyhedral objects.
2. Unbroken lines should have the same label assigned at both ends.
3. When a fork is labeled with a+ edge, it must have all three edges label as +, and
Starting with any edge having an object face on its right, the external boundary is
awing of a pyramid as given in figure3 At the right side of the pyramid are all po
D.
for that junction. An adjacent junction is then chosen, say , B and labels which are
ermissible A and B lists. In this case, the line joining B can only be a +, - or an up
arrow
g are
Page 84
Choosing junction c next, we find that t
he BC constraints are
is possible with this step. On the otherhand, the line AC must be labled as – or as
an up-
left-
eliminated to reduce the remainder to the following.
This reduction in turn, places a new restriction on BC, permitting the elimination
of one C label, since BC must now be labeled as a + only. This leaves the
remaining C labels as show in side diagram.
4. Moving now to junction d, we see that of the six possible D leadings, only
three satisfy the BD constraint of a up or a down arrow. Therefore, the
remaining
Page 85
permissible leabelings.
continuing with the above procedure, we see that further label eliminations are not
possible since all constraints have been satisfied. This process is completed by
finding the different combinations of unique labeling that can be assigned to the
figure. An enumerations of the remaining label shows that it is possible to find only
three different labeling.
***Texture:
Texture is one of the most important attributes used in image analysis and pattern
recognition. It provides surface characteristics for the analysis of many types of
images including natural scenes, remotely sensed data, and biomedical
modalities and plays an important role in the human visual system for
recognition and interpretation.
• Although there is no formal definition for texture, intuitively this
descriptor provides measures of properties such as smoothness, coarseness,
and regularity.
• Texture is one of the most important image characteristics to be found
almost anywhere in nature. It can be used to segment images into distinct
object or regions. The classification and recognition of different surfaces is
often based on texture properties.
***Computer Vision:
Page 86
• Computer vision is the science and technology of machines that see.
• Concerned with the theory for building artificial systems that
obtain information from images.
• The image data can take many forms, such as a video sequence, depth
images, views from multiple cameras, or multi-dimensional data from
a medical scanner.
Page 87
Unit IV-LEARNING
Learning element is the portion of a learning AI system that decides how to modify
the performance element and implements those modifications.
We all learn new knowledge through different methods, depending on the type of
material to be learned, the amount of relevant knowledge we already possess,
and the environment in which the learning takes place.
***There are five methods of learning. They are,
1. Memorization (rote learning)
2. Direct instruction (by being told)
3. Analogy
4. Induction
5. Deduction
This form of learning requires still more inferring than either of the
previous forms. Since difficult transformations must be made between the
known and unknown situations.
Page 88
Learning by induction is also one that is used frequently by humans. it is a
powerful form of learning like analogical learning which also require s more
inferring than the first two methods. This learning requires the use of inductive
inference, a form of invalid but useful inference.
MATCHING:So far, we have seen the process of using search to solve problems as
the application of appropriate rules to individual problem states to generate new
states to which the rules can then be applied, and so forth, until a solution is found.
Clever search involves choosing from among the rules that can be applied at a
particular point, the ones that are most likely to lead to a solution. We need to
extract from the entire collection of rules, those that can be applied at a given
point. To do so requires some kind of matching between the current state and the
preconditions of the rules.
Page 89
Sometimes , instead of searching through the rules, we can use the current state
as an index into the rules and select the matching ones immediately. In spite of
limitations, indexing in some form is very important in the efficient operation of
rules based systems.
****Expert systems
Features
An expert system is a computer program, with a set of rules encapsulating
knowledge about a particular problem domain (i.e., medicine, chemistry,
finance, flight, et cetera). These rules prescribe actions to take when certain
conditions hold, and define the effect of the action on deductions or data.
Page 90
solve a problem as a collection of rules stored in a knowledge-base are called
rule-based systems.
They are essential in robotics, natural language processing, theorem proving, and
the intelligent retrieval of information from databases. They are used in many
other human accomplishments which might be considered more practical.
Rule-based systems have been used to monitor and control traffic, to aid in
the development of flight systems, and by the federal government to prepare
budgets.
The expert system shell can be applied to many different problem domains with
little or no change. It also means that adding or modifying rules to an expert
system can effect changes in program behavior without affecting the
controlling component, the system shell.
Page 91
Rules are added to the knowledge-base by subject matter experts using text or
graphical editors that are integral to the system shell. The simple process by
which rules are added to the knowledge-base is depicted in Figure 1.
Finally, the expert system never forgets, can store and retrieve more knowledge
than any single human being can remember, and makes no errors, provided the
rules created by the subject matter experts accurately model the problem at hand.
Page 92
The shell
portion includes software modules whose purpose it is to,
Process
modules;
requests for service from system users and application layer
Support
experts;
the creation and modification of business rules by subject matter
For example, when a subject matter expert wishes to create or edit a rule,
they use the Client Interface to dispatch the Knowledge-base Editor. Other
service requests might schedule a rule, or a group of rules, for execution
by the Rule Engine.
Page 93
Rule Translator
Rules, as they are composed by subject matter experts, are not directly
executable. They must first be converted from their human-readable form
into a form that can be interpreted by the Rule Engine. Converting rules
from one form to another is a function performed by the Rule Translator.
Rule Engine
The Rule Engine interpreter traverses the AST, executing actions specified in
the rule along the way.
The shell component, Rule Object Classes, is a container for object classes
supporting,
Rule editing; AST construction;
Conversion of ASTs to rule metadata;
Conversion of rule metadata to ASTs; and
Knowledge-base operations (query, update, insert, delete).
Page 94
***Inductive learning:
Perceptron:
This consists of a single neuron with multiple inputs and a single output. It has
restricted information processing capability. The information processing is done
through a transfer function which is either linear or non-linear.
Multi-layered Perceptron (MLP):
It has a layered architecture consisting of input, hidden and output layers. Each
layer consists of a number of perceptrons. The output of each layer is transmitted
to the input of nodes in other layers through weighted links. Usually, this
transmission is done only to nodes of the next layer, leading to what are known
as feed forward networks. MLPs were proposed to extend the limited information
processing capabilities of simple percptrons, and are highly versatile in terms of
their approximation ability. Training or weight adaptation is done in MLPs using
supervised backpropagation learning.
Page 96
information processing scheme. They are thus used in applications like
speech processing where inputs are time sequences data.
Self-Organizing Maps: SOMs or Kohonen networks have a grid topology, wit
unequal grid weights. The topology of the grid provides a low dimensional
visualization of the data distribution. These are thus used in applications which
typically involve organization and human browsing of a large volume of data.
Learning is performed using a winner take all strategy in a unsupervised mode.
Applications of Neural Networks
Neural networks have broad applicability to real world business problems. They
have already been successfully applied in many industries.
Since neural networks are best at identifying patterns or trends in data, they
are well suited for prediction or forecasting needs including:
• sales forecasting
• industrial process control
• customer research
• data validation
• risk management
• target marketing
Because of their adaptive and non-linear nature they have also been used in a
number of control system application domains like,
• process control in chemical plants
• unmanned vehicles
• robotics
• consumer electronics
Neural networks are also used a number of other applications which are too hard
to model using classical techniques. These include, computer vision, path planning
and user modeling.
Page 97
Page 98
Page 99
Page 100
Unit-V
Natural Language Processing (NLP):
What is Natural Language Processing (NLP)
• The process of computer analysis of input provided in a human
language (natural language), and conversion of this input into a useful
form of representation.
• The field of NLP is primarily concerned with getting computers to perform
useful and interesting tasks with human languages.
• The field of NLP is secondarily concerned with helping us come to a better
understanding of human language.
Page 101
Natural language is extremely rich in form and structure, and very
ambiguous. How to represent meaning,
Which structures map to which meaning structures.
One input can mean many different things. Ambiguity can be at different levels.
Lexical (word level) ambiguity -- different meanings of words
Syntactic ambiguity -- different ways to parse the sentence
Interpreting partial information -- how to interpret pronouns
Contextual information -- context of the sentence may affect the meaning of that
sentence.
Many input can mean the same thing.
Interaction among components of the input is not clear.
NLP Terminology
Phonology – concerns how words are related to the sounds that realize them.
Morphology – concerns how words are constructed from more basic meaning
units called morphemes. A morpheme is the primitive unit of meaning in a
language.
Syntax – concerns how can be put together to form correct sentences and
determines what structural role each word plays in the sentence and what phrases
are subparts of other phrases.
Semantics – concerns what words mean and how these meaning combine in
sentences to form sentence meaning. The study of context-independent
meaning.
Pragmatics – concerns how sentences are used in different situations and how
use affects the interpretation of the sentence.
Discourse – concerns how the immediately preceding sentences affect the
interpretation of the next sentence. For example, interpreting pronouns and
interpreting the temporal aspects of the information.
World Knowledge – includes general knowledge about the world. What each
language user must know about the other’s beliefs and goals.
Page 102
Natural Language Generation:
Page 103
Page 104
Page 105
Page 106
Page 107
Page 108
The black cat crossed the road.
Page 109
Page 110
Page 111
Page 112
Page 113
Page 114
Page 115
Page 116
Page 117