Artificial Intelligence - Overview
Artificial Intelligence - Overview
A computer program without AI can answer A computer program with AI can answer
the specific questions it is meant to solve. the generic questions it is meant to solve.
1
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
2
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
1945 Isaac Asimov, a Columbia University alumni, coined the term Robotics.
John McCarthy coined the term Artificial Intelligence. Demonstration of the first
1956
running AI program at Carnegie Mellon University.
The Assembly Robotics group at Edinburgh University built Freddy, the Famous
1973
Scottish Robot, capable of using vision to locate and assemble models.
1979 The first computer-controlled autonomous vehicle, Stanford Cart, was built.
1985 Harold Cohen created and demonstrated the drawing program, Aaron.
The Deep Blue Chess Program beats the then world chess champion, Garry
1997
Kasparov.
3
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
The ability of a system to calculate, reason, perceive relationships and analogies, learn from
experience, store and retrieve information from memory, solve problems, comprehend complex
ideas, use natural language fluently, classify, generalize, and adapt new situations.
Types of Intelligence
As described by Howard Gardner, an American developmental psychologist, the Intelligence
comes in multifold −
Intelligence Description Example
4
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Even if all of the premises are true in a If something is true of a class of things in
statement, inductive reasoning allows for general, it is also true for all members of that
the conclusion to be false. class.
Example − "Nita is a teacher. Nita is Example − "All women of age above 60 years
studious. Therefore, All teachers are are grandmothers. Shalini is 65 years.
studious." Therefore, Shalini is a grandmother."
Learning − It is the activity of gaining knowledge or skill by studying, practising, being
taught, or experiencing something. Learning enhances the awareness of the subjects of
the study.
The ability of learning is possessed by humans, some animals, and AI-enabled systems.
Learning is categorized as −
o Auditory Learning − It is learning by listening and hearing. For example, students
listening to recorded audio lectures.
o Episodic Learning − To learn by remembering sequences of events that one has
witnessed or experienced. This is linear and orderly.
o Motor Learning − It is learning by precise movement of muscles. For example,
picking objects, Writing, etc.
o Observational Learning − To learn by watching and imitating others. For
example, child tries to learn by mimicking her parent.
o Perceptual Learning − It is learning to recognize stimuli that one has seen before.
For example, identifying and classifying objects and situations.
o Relational Learning − It involves learning to differentiate among various stimuli
on the basis of relational properties, rather than absolute properties. For Example,
Adding „little less‟ salt at the time of cooking potatoes that came up salty last time,
when cooked with adding say a tablespoon of salt.
o Spatial Learning − It is learning through visual stimuli such as images, colors,
maps, etc. For Example, A person can create roadmap in mind before actually
following the road.
o Stimulus-Response Learning − It is learning to perform a particular behavior
when a certain stimulus is present. For example, a dog raises its ear on hearing
doorbell.
5
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Problem Solving − It is the process in which one perceives and tries to arrive at a desired
solution from a present situation by taking some path, which is blocked by known or
unknown hurdles.
Problem solving also includes decision making, which is the process of selecting the best
suitable alternative out of multiple alternatives to reach the desired goal are available.
Perception − It is the process of acquiring, interpreting, selecting, and organizing sensory
information.
Perception presumes sensing. In humans, perception is aided by sensory organs. In the
domain of AI, perception mechanism puts the data acquired by the sensors together in a
meaningful manner.
Linguistic Intelligence − It is one‟s ability to use, comprehend, speak, and write the
verbal and written language. It is important in interpersonal communication.
Difference between Human and Machine Intelligence
Humans perceive by patterns whereas the machines perceive by set of rules and data.
Humans store and recall information by patterns, machines do it by searching algorithms.
For example, the number 40404040 is easy to remember, store, and recall as its pattern is
simple.
Humans can figure out the complete object even if some part of it is missing or distorted;
whereas the machines cannot do it correctly.
ARTIFICIAL INTELLIGENCE - RESEARCH AREAS
The domain of artificial intelligence is huge in breadth and width. While proceeding, we
consider the broadly common and prospering research areas in the domain of AI −
Machine does not need training for Speech This recognition system needs training as it
Recognition as it is not speaker dependent. is person oriented.
6
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
1 Expert Systems
Examples − Flight-tracking systems, Clinical
systems.
3 Neural Networks
Examples − Pattern recognition systems such as face
recognition, character recognition, handwriting
recognition.
4 Robotics
Examples − Industrial robots for moving, spraying,
painting, precision checking, drilling, cleaning,
coating, carving, etc.
Task Classification of AI
The domain of AI is classified into Formal tasks, Mundane tasks, and Expert tasks.
7
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Planing Creativity
Robotics - Locomotive
Humans learn mundane ordinaryordinary tasks since their birth. They learn by perception,
speaking, using language, and locomotives. They learn Formal Tasks and Expert Tasks later, in
that order.
For humans, the mundane tasks are easiest to learn. The same was considered true before trying
to implement mundane tasks in machines. Earlier, all work of AI was concentrated in the
mundane task domain.
Later, it turned out that the machine requires more knowledge, complex knowledge
representation, and complicated algorithms for handling mundane tasks. This is the reason why
AI work is more prospering in the Expert Tasks domain now, as the expert task domain
needs expert knowledge without common sense, which can be easier to represent and handle.
AI - AGENTS & ENVIRONMENTS
An AI system is composed of an agent and its environment. The agents act in their environment.
The environment may contain other agents.
What are Agent and Environment?
An agent is anything that can perceive its environment through sensors and acts upon that
environment through effectors.
A human agent has sensory organs such as eyes, ears, nose, tongue and skin parallel to
the sensors, and other organs such as hands, legs, mouth, for effectors.
A robotic agent replaces cameras and infrared range finders for the sensors, and various
motors and actuators for effectors.
A software agent has encoded bit strings as its programs and actions.
8
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Agent Terminology
Performance Measure of Agent − It is the criteria, which determines how successful an
agent is.
Behavior of Agent − It is the action that agent performs after any given sequence of
percepts.
Percept − It is agent‟s perceptual inputs at a given instance.
Percept Sequence − It is the history of all that an agent has perceived till date.
Agent Function − It is a map from the precept sequence to an action.
Rationality
Rationality is nothing but status of being reasonable, sensible, and having good sense of
judgment.
Rationality is concerned with expected actions and results depending upon what the agent has
perceived. Performing actions with the aim of obtaining useful information is an important part
of rationality.
What is Ideal Rational Agent?
An ideal rational agent is the one, which is capable of doing expected actions to maximize its
performance measure, on the basis of −
Its percept sequence
Its built-in knowledge base
Rationality of an agent depends on the following four factors −
The performance measures, which determine the degree of success.
Agent‟s Percept Sequence till now.
The agent‟s prior knowledge about the environment.
The actions that the agent can carry out.
A rational agent always performs right action, where the right action means the action that
causes the agent to be most successful in the given percept sequence. The problem the agent
solves is characterized by Performance Measure, Environment, Actuators, and
Sensors PEASPEAS.
The Structure of Intelligent Agents
Agent‟s structure can be viewed as −
Agent = Architecture + Agent Program
Architecture = the machinery that an agent executes on.
Agent Program = an implementation of an agent function.
Simple Reflex Agents
They choose actions only based on the current percept.
They are rational only if a correct decision is made only on the basis of current precept.
Their environment is completely observable.
Condition-Action Rule − It is a rule that maps a state conditioncondition to an action.
9
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Nature of Environments
Some programs operate in the entirely artificial environment confined to keyboard input,
database, computer file systems and character output on a screen.
10
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
11
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Search Terminology
Problem Space − It is the environment in which the search takes
place. AsetofstatesandsetofoperatorstochangethosestatesAsetofstatesandsetofoperatorstochangetho
sestates
Problem Instance − It is Initial state + Goal state.
Problem Space Graph − It represents problem state. States are shown by nodes and
operators are shown by edges.
Depth of a problem − Length of a shortest path or shortest sequence of operators from
Initial State to goal state.
Space Complexity − The maximum number of nodes that are stored in memory.
Time Complexity − The maximum number of nodes that are created.
Admissibility − A property of an algorithm to always find an optimal solution.
Branching Factor − The average number of child nodes in the problem space graph.
Depth − Length of the shortest path from initial state to goal state.
Brute-Force Search Strategies
They are most simple, as they do not need any domain-specific knowledge. They work fine with
small number of possible states.
Requirements −
State description
A set of valid operators
Initial state
Goal state description
Breadth-First Search
It starts from the root node, explores the neighboring nodes first and moves towards the next
level neighbors. It generates one tree at a time until the solution is found. It can be implemented
using FIFO queue data structure. This method provides shortest path to the solution.
If branching
factor averagenumberofchildnodesforagivennodeaveragenumberofchildnodesforagivennode = b and
depth = d, then number of nodes at level d = bd.
The total no of nodes created in worst case is b + b2 + b3 + … + bd.
Disadvantage − Since each level of nodes is saved for creating next one, it consumes a lot of
memory space. Space requirement to store nodes is exponential.
Its complexity depends on the number of nodes. It can check duplicate nodes.
Depth-First Search
It is implemented in recursion with LIFO stack data structure. It creates the same set of nodes as
Breadth-First method, only in the different order.
As the nodes on the single path are stored in each iteration from root to leaf node, the space
requirement to store nodes is linear. With branching factor b and depth as m, the storage space
is bm.
Disadvantage − This algorithm may not terminate and go on infinitely on one path. The
solution to this issue is to choose a cut-off depth. If the ideal cut-off is d, and if chosen cut-off is
lesser than d, then this algorithm may fail. If chosen cut-off is more than d, then execution time
increases.
12
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Its complexity depends on the number of paths. It cannot check duplicate nodes.
Bidirectional Search
It searches forward from initial state and backward from goal state till both meet to identify a
common state.
The path from initial state is concatenated with the inverse path from the goal state. Each search
is done only up to half of the total path.
Uniform Cost Search
Sorting is done in increasing cost of the path to a node. It always expands the least cost node. It
is identical to Breadth First search if each transition has the same cost.
It explores paths in the increasing order of cost.
Disadvantage − There can be multiple long paths with the cost ≤ C*. Uniform Cost search must
explore them all.
Iterative Deepening Depth-First Search
It performs depth-first search to level 1, starts over, executes a complete depth-first search to
level 2, and continues in such way till the solution is found.
It never creates a node until all lower nodes are generated. It only saves a stack of nodes. The
algorithm ends when it finds a solution at depth d. The number of nodes created at depth d is
bd and at depth d-1 is bd-1.
Time bd bm bd/2 bd bd
Space bd bm bd/2 bd bd
13
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
They calculate the cost of optimal path between two states. A heuristic function for sliding-tiles
games is computed by counting number of moves that each tile makes from its goal state and
adding these number of moves for all tiles.
Pure Heuristic Search
It expands nodes in the order of their heuristic values. It creates two lists, a closed list for the
already expanded nodes and an open list for the created but unexpanded nodes.
In each iteration, a node with a minimum heuristic value is expanded, all its child nodes are
created and placed in the closed list. Then, the heuristic function is applied to the child nodes
and they are placed in the open list according to their heuristic value. The shorter paths are
saved and the longer ones are disposed.
A * Search
It is best-known form of Best First search. It avoids expanding paths that are already expensive,
but expands most promising paths first.
fnn = gnn + hnn, where
gnn the cost sofarsofar to reach the node
hnn estimated cost to get from the node to the goal
fnn estimated total cost of path through n to goal. It is implemented using priority queue
by increasing fnn.
Greedy Best First Search
It expands the node that is estimated to be closest to goal. It expands nodes based on fnn = hnn.
It is implemented using priority queue.
Disadvantage − It can get stuck in loops. It is not optimal.
Local Search Algorithms
They start from a prospective solution and then move to a neighboring solution. They can return
a valid solution even if it is interrupted at any time before they end.
Hill-Climbing Search
It is an iterative algorithm that starts with an arbitrary solution to a problem and attempts to find
a better solution by changing a single element of the solution incrementally. If the change
produces a better solution, an incremental change is taken as a new solution. This process is
repeated until there are no further improvements.
function Hill-Climbing problemproblem, returns a state that is a local maximum.
inputs: problem, a problem
local variables: current, a node
neighbor, a node
current <-Make_Node(Initial-State[problem])
loop
do neighbor <- a highest_valued successor of current
if Value[neighbor] ≤ Value[current] then
return State[current]
current <- neighbor
end
Disadvantage − This algorithm is neither complete, nor optimal.
Local Beam Search
In this algorithm, it holds k number of states at any given time. At the start, these states are
generated randomly. The successors of these k states are computed with the help of objective
function. If any of these successors is the maximum value of the objective function, then the
algorithm stops.
Otherwise
the initialkstatesandknumberofsuccessorsofthestates=2kinitialkstatesandknumberofsuccessorsofthestates=
14
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
2k states are placed in a pool. The pool is then sorted numerically. The highest k states are
selected as new initial states. This process continues until a maximum value is reached.
function BeamSearch( problem, k), returns a solution state.
start with k randomly generated states
loop
generate all successors of all k states
if any of the states = solution, then return the state
else select the k best successors
end
Simulated Annealing
Annealing is the process of heating and cooling a metal to change its internal structure for
modifying its physical properties. When the metal cools, its new structure is seized, and the
metal retains its newly obtained properties. In simulated annealing process, the temperature is
kept variable.
We initially set the temperature high and then allow it to „cool' slowly as the algorithm proceeds.
When the temperature is high, the algorithm is allowed to accept worse solutions with high
frequency.
Start
Initialize k = 0; L = integer number of variables;
From i → j, search the performance difference Δ.
If Δ <= 0 then accept else if exp−Δ/T(k−Δ/T(k) > random0,10,1 then accept;
Repeat steps 1 and 2 for Lkk steps.
k = k + 1;
Repeat steps 1 through 4 till the criteria is met.
End
Travelling Salesman Problem
In this algorithm, the objective is to find a low-cost tour that starts from a city, visits all cities
en-route exactly once and ends at the same starting city.
Start
Find out all (n -1)! Possible solutions, where n is the total number of cities.
Determine the minimum cost by finding out the cost of each of these (n -1)!
solutions.
Finally, keep the one with the minimum cost.
end
15
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
The conventional logic block that a computer can understand takes precise input and produces a
definite output as TRUE or FALSE, which is equivalent to human‟s YES or NO.
The inventor of fuzzy logic, Lotfi Zadeh, observed that unlike computers, the human decision
making includes a range of possibilities between YES and NO, such as −
CERTAINLY YES
POSSIBLY YES
CANNOT SAY
POSSIBLY NO
CERTAINLY NO
The fuzzy logic works on the levels of possibilities of input to achieve the definite output.
Implementation
It can be implemented in systems with various sizes and capabilities ranging from small
micro-controllers to large, networked, workstation-based control systems.
It can be implemented in hardware, software, or a combination of both.
Why Fuzzy Logic?
Fuzzy logic is useful for commercial and practical purposes.
It can control machines and consumer products.
It may not give accurate reasoning, but acceptable reasoning.
Fuzzy logic helps to deal with the uncertainty in engineering.
Fuzzy Logic Systems Architecture
It has four main parts as shown −
Fuzzification Module − It transforms the system inputs, which are crisp numbers, into
fuzzy sets. It splits the input signal into five steps such as −
LP x is Large Positive
MP x is Medium Positive
S x is Small
MN x is Medium Negative
LN x is Large Negative
Knowledge Base − It stores IF-THEN rules provided by experts.
Inference Engine − It simulates the human reasoning process by making fuzzy inference
on the inputs and IF-THEN rules.
Defuzzification Module − It transforms the fuzzy set obtained by the inference engine
into a crisp value.
16
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Membership functions allow you to quantify linguistic term and represent a fuzzy set
graphically. A membership function for a fuzzy set A on the universe of discourse X is defined
as μA:X → [0,1].
Here, each element of X is mapped to a value between 0 and 1. It is called membership
value or degree of membership. It quantifies the degree of membership of the element in X to
the fuzzy set A.
x axis represents the universe of discourse.
y axis represents the degrees of membership in the [0, 1] interval.
There can be multiple membership functions applicable to fuzzify a numerical value. Simple
membership functions are used as use of complex functions does not add more precision in the
output.
All membership functions for LP, MP, S, MN, and LN are shown as below −
The triangular membership function shapes are most common among various other membership
function shapes such as trapezoidal, singleton, and Gaussian.
Here, the input to 5-level fuzzifier varies from -10 volts to +10 volts. Hence the corresponding
output also changes.
Example of a Fuzzy Logic System
Let us consider an air conditioning system with 5-level fuzzy logic system. This system adjusts
the temperature of air conditioner by comparing the room temperature and the target
temperature value.
Algorithm
Define linguistic variables and terms.
Construct membership functions for them.
Construct knowledge base of rules.
Convert crisp data into fuzzy data sets using membership
functions. fuzzificationfuzzification
Evaluate rules in the rule base. InferenceEngineInferenceEngine
Combine results from each rule. InferenceEngineInferenceEngine
Convert output data into non-fuzzy values. defuzzificationdefuzzification
Logic Development
Step 1: Define linguistic variables and terms
17
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Linguistic variables are input and output variables in the form of simple words or sentences. For
room temperature, cold, warm, hot, etc., are linguistic terms.
Temperature tt = {very-cold, cold, warm, very-warm, hot}
Every member of this set is a linguistic term and it can cover some portion of overall
temperature values.
Step 2: Construct membership functions for them
The membership functions of temperature variable are as shown −
18
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
19
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
20
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Semantic Analysis − It draws the exact meaning or the dictionary meaning from the text.
The text is checked for meaningfulness. It is done by mapping syntactic structures and
objects in the task domain. The semantic analyzer disregards sentence such as “hot ice-
cream”.
Discourse Integration − The meaning of any sentence depends upon the meaning of the
sentence just before it. In addition, it also brings about the meaning of immediately
succeeding sentence.
Pragmatic Analysis − During this, what was said is re-interpreted on what it actually
meant. It involves deriving those aspects of language which require real world
knowledge.
Implementation Aspects of Syntactic Analysis
There are a number of algorithms researchers have developed for syntactic analysis, but we
consider only the following simple methods −
Context-Free Grammar
Top-Down Parser
Let us see them in detail −
Context-Free Grammar
It is the grammar that consists rules with a single symbol on the left-hand side of the rewrite
rules. Let us create grammar to parse a sentence − “The bird pecks the grains”
Articles DETDET − a | an | the
Nouns − bird | birds | grain | grains
Noun Phrase NPNP − Article + Noun | Article + Adjective + Noun
= DET N | DET ADJ N
Verbs − pecks | pecking | pecked
Verb Phrase VPVP − NP V | V NP
Adjectives ADJADJ − beautiful | small | chirping
The parse tree breaks down the sentence into structured parts so that the computer can easily
understand and process it. In order for the parsing algorithm to construct this parse tree, a set of
rewrite rules, which describe what tree structures are legal, need to be constructed.
These rules say that a certain symbol may be expanded in the tree by a sequence of other
symbols. According to first order logic rule, if there are two strings Noun Phrase NPNP and Verb
Phrase VPVP, then the string combined by NP followed by VP is a sentence. The rewrite rules
for the sentence are as follows −
S → NP VP
NP → DET N | DET ADJ N
VP → V NP
Lexocon −
DET → a | the
ADJ → beautiful | perching
N → bird | birds | grain | grains
V → peck | pecks | pecking
The parse tree can be created as shown −
21
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Now consider the above rewrite rules. Since V can be replaced by both, "peck" or "pecks",
sentences such as "The bird peck the grains" with wrong subject-verb agreement are also
permitted.
Merit − The simplest style of grammar, therefore widely used one.
Demerits
They are not highly precise. For example, “The grains peck the bird”, is a syntactically
correct according to parser, but even if it makes no sense, parser takes it as a correct
sentence.
To bring out high precision, multiple sets of grammar need to be prepared. It may require
a completely different sets of rules for parsing singular and plural variations, passive
sentences, etc., which can lead to creation of huge set of rules that are unmanageable.
Top-Down Parser
Here, the parser starts with the S symbol and attempts to rewrite it into a sequence of terminal
symbols that matches the classes of the words in the input sentence until it consists entirely of
terminal symbols.
These are then checked with the input sentence to see if it matched. If not, the process is started
over again with a different set of rules. This is repeated until a specific rule is found which
describes the structure of the sentence.
Merit − It is simple to implement.
Demerits
It is inefficient, as the search process has to be repeated if an error occurs.
Slow speed of working.
ARTIFICIAL INTELLIGENCE - EXPERT SYSTEMS
Expert systems ESES are one of the prominent research domains of AI. It is introduced by the
researchers at Stanford University, Computer Science Department.
What are Expert Systems?
The expert systems are the computer applications developed to solve complex problems in a
particular domain, at the level of extra-ordinary human intelligence and expertise.
Characteristics of Expert Systems
High performance
Understandable
Reliable
Highly responsive
Capabilities of Expert Systems
The expert systems are capable of −
Advising
Instructing and assisting human in decision making
Demonstrating
Deriving a solution
Diagnosing
Explaining
Interpreting input
22
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Predicting results
Justifying the conclusion
Suggesting alternative options to a problem
They are incapable of −
Substituting human decision makers
Possessing human capabilities
Producing accurate output for inadequate knowledge base
Refining their own knowledge
Components of Expert Systems
The components of ES include −
Knowledge Base
Inference Engine
User Interface
Let us see them one by one briefly −
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.
Components of Knowledge Base
The knowledge base of an ES is a store of both, factual and heuristic knowledge.
Factual Knowledge − It is the information widely accepted by the Knowledge Engineers
and scholars in the task domain.
Heuristic Knowledge − It is about practice, accurate judgement, one‟s ability of
evaluation, and guessing.
Knowledge representation
It is the method used to organize and formalize the knowledge in the knowledge base. It is in the
form of IF-THEN-ELSE rules.
Knowledge Acquisition
The success of any expert system majorly depends on the quality, completeness, and accuracy 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.
23
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
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.
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.
The user interface makes it easy to trace the credibility of the deductions.
Requirements of Efficient ES User Interface
It should help users to accomplish their goals in shortest possible way.
It should be designed to work for user‟s existing or desired work practices.
Its technology should be adaptable to user‟s requirements; not the other way round.
It should make efficient use of user input.
24
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
25
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
26
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
They contain some level of computer program that determines what, when and how a
robot does something.
Difference in Robot System and Other AI Program
Here is the difference between the two −
AI Programs Robots
The input to an AI program is in symbols Inputs to robots is analog signal in the form of
and rules. speech waveform or images
They need general purpose computers to They need special hardware with sensors and
operate on. effectors.
Robot Locomotion
Locomotion is the mechanism that makes a robot capable of moving in its environment. There
are various types of locomotions −
Legged
Wheeled
Combination of Legged and Wheeled Locomotion
Tracked slip/skid
Legged Locomotion
This type of locomotion consumes more power while demonstrating walk, jump, trot,
hop, climb up or down, etc.
It requires more number of motors to accomplish a movement. It is suited for rough as
well as smooth terrain where irregular or too smooth surface makes it consume more
power for a wheeled locomotion. It is little difficult to implement because of stability
issues.
It comes with the variety of one, two, four, and six legs. If a robot has multiple legs then
leg coordination is necessary for locomotion.
The total number of
possible gaits aperiodicsequenceofliftandreleaseeventsforeachofthetotallegsaperiodicsequenceofliftandr
eleaseeventsforeachofthetotallegs a robot can travel depends upon the number of its legs.
If a robot has k legs, then the number of possible events N = 2k−12k−1!.
In case of a two-legged robot k=2k=2, the number of possible events is N = 2k−12k−1!
= 2∗2−12∗2−1! = 3! = 6.
Hence there are six possible different events −
Lifting the Left leg
Releasing the Left leg
Lifting the Right leg
Releasing the Right leg
Lifting both the legs together
Releasing both the legs together
In case of k=6 legs, there are 39916800 possible events. Hence the complexity of robots is
directly proportional to the number of legs.
27
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Wheeled Locomotion
It requires fewer number of motors to accomplish a movement. It is little easy to implement as
there are less stability issues in case of more number of wheels. It is power efficient as
compared to legged locomotion.
Standard wheel − Rotates around the wheel axle and around the contact
Castor wheel − Rotates around the wheel axle and the offset steering joint.
o o
Swedish 45 and Swedish 90 wheels − Omni-wheel, rotates around the contact point,
around the wheel axle, and around the rollers.
Ball or spherical wheel − Omnidirectional wheel, technically difficult to implement.
Slip/Skid Locomotion
In this type, the vehicles use tracks as in a tank. The robot is steered by moving the tracks with
different speeds in the same or opposite direction. It offers stability because of large contact area
of track and ground.
Components of a Robot
Robots are constructed with the following −
Power Supply − The robots are powered by batteries, solar power, hydraulic, or
pneumatic power sources.
Actuators − They convert energy into movement.
Electric motors AC/DCAC/DC − They are required for rotational movement.
Pneumatic Air Muscles − They contract almost 40% when air is sucked in them.
Muscle Wires − They contract by 5% when electric current is passed through them.
Piezo Motors and Ultrasonic Motors − Best for industrial robots.
Sensors − They provide knowledge of real time information on the task environment.
Robots are equipped with vision sensors to be to compute the depth in the environment. A
tactile sensor imitates the mechanical properties of touch receptors of human fingertips.
Computer Vision
This is a technology of AI with which the robots can see. The computer vision plays vital role in
the domains of safety, security, health, access, and entertainment.
Computer vision automatically extracts, analyzes, and comprehends useful information from a
single image or an array of images. This process involves development of algorithms to
accomplish automatic visual comprehension.
Hardware of Computer Vision System
28
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
This involves −
Power supply
Image acquisition device such as camera
a processor
a software
A display device for monitoring the system
Accessories such as camera stands, cables, and connectors
Tasks of Computer Vision
OCR − In the domain of computers, Optical Character Reader, a software to convert
scanned documents into editable text, which accompanies a scanner.
Face Detection − Many state-of-the-art cameras come with this feature, which enables to
read the face and take the picture of that perfect expression. It is used to let a user access
the software on correct match.
Object Recognition − They are installed in supermarkets, cameras, high-end cars such as
BMW, GM, and Volvo.
Estimating Position − It is estimating position of an object with respect to camera as in
position of tumor in human‟s body.
Application Domains of Computer Vision
Agriculture Medical imagery
Autonomous vehicles Pollution monitoring
Biometrics Process control
Character recognition Remote sensing
Forensics, security, and surveillance Robotics
Industrial quality inspection Transport
Face recognition Gesture analysis
Geoscience
Applications of Robotics
The robotics has been instrumental in the various domains such as −
Industries − Robots are used for handling material, cutting, welding, color coating,
drilling, polishing, etc.
Military − Autonomous robots can reach inaccessible and hazardous zones during war. A
robot named Daksh, developed by Defense Research and Development
Organization DRDODRDO, is in function to destroy life-threatening objects safely.
Medicine − The robots are capable of carrying out hundreds of clinical tests
simultaneously, rehabilitating permanently disabled people, and performing complex
surgeries such as brain tumors.
Exploration − The robot rock climbers used for space exploration, underwater drones
used for ocean exploration are to name a few.
Entertainment − Disney‟s engineers have created hundreds of robots for movie making.
ARTIFICIAL INTELLIGENCE - NEURAL NETWORKS
Yet another research area in AI, neural networks, is inspired from the natural neural network of
human nervous system.
What are Artificial Neural Networks ANNsANNs?
The inventor of the first neurocomputer, Dr. Robert Hecht-Nielsen, defines a neural network as
−
29
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
ANNs are composed of multiple nodes, which imitate biological neurons of human brain. The
neurons are connected by links and they interact with each other. The nodes can take input data
and perform simple operations on the data. The result of these operations is passed to other
neurons. The output at each node is called its activation or node value.
Each link is associated with weight. ANNs are capable of learning, which takes place by
altering weight values. The following illustration shows a simple ANN −
FeedBack ANN
30
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Here, feedback loops are allowed. They are used in content addressable memories.
Working of ANNs
In the topology diagrams shown, each arrow represents a connection between two neurons and
indicates the pathway for the flow of information. Each connection has a weight, an integer
number that controls the signal between the two neurons.
If the network generates a “good or desired” output, there is no need to adjust the weights.
However, if the network generates a “poor or undesired” output or an error, then the system
alters the weights in order to improve subsequent results.
Machine Learning in ANNs
ANNs are capable of learning and they need to be trained. There are several learning strategies −
Supervised Learning − It involves a teacher that is scholar than the ANN itself. For
example, the teacher feeds some example data about which the teacher already knows the
answers.
For example, pattern recognizing. The ANN comes up with guesses while recognizing.
Then the teacher provides the ANN with the answers. The network then compares it
guesses with the teacher‟s “correct” answers and makes adjustments according to errors.
Unsupervised Learning − It is required when there is no example data set with known
answers. For example, searching for a hidden pattern. In this case, clustering i.e. dividing
a set of elements into groups according to some unknown pattern is carried out based on
the existing data sets present.
Reinforcement Learning − This strategy built on observation. The ANN makes a
decision by observing its environment. If the observation is negative, the network adjusts
its weights to be able to make a different required decision the next time.
Back Propagation Algorithm
It is the training or learning algorithm. It learns by example. If you submit to the algorithm the
example of what you want the network to do, it changes the network‟s weights so that it can
produce desired output for a particular input on finishing the training.
Back Propagation networks are ideal for simple Pattern Recognition and Mapping Tasks.
Bayesian Networks BNBN
These are the graphical structures used to represent the probabilistic relationship among a set of
random variables. Bayesian networks are also called Belief Networks or Bayes Nets. BNs
reason about uncertain domain.
In these networks, each node represents a random variable with specific propositions. For
example, in a medical diagnosis domain, the node Cancer represents the proposition that a
patient has cancer.
The edges connecting the nodes represent probabilistic dependencies among those random
variables. If out of two nodes, one is affecting the other then they must be directly connected in
the directions of the effect. The strength of the relationship between variables is quantified by
the probability associated with each node.
31
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
There is an only constraint on the arcs in a BN that you cannot return to a node simply by
following directed arcs. Hence the BNs are called Directed Acyclic Graphs DAGsDAGs.
BNs are capable of handling multivalued variables simultaneously. The BN variables are
composed of two dimensions −
Range of prepositions
Probability assigned to each of the prepositions.
Consider a finite set X = {X1, X2, …,Xn} of discrete random variables, where each
variable Xi may take values from a finite set, denoted by Val(Xi). If there is a directed link from
variable Xi to variable, Xj, then variable Xi will be a parent of variable Xj showing direct
dependencies between the variables.
The structure of BN is ideal for combining prior knowledge and observed data. BN can be used
to learn the causal relationships and understand various problem domains and to predict future
events, even in case of missing data.
Building a Bayesian Network
A knowledge engineer can build a Bayesian network. There are a number of steps the
knowledge engineer needs to take while building it.
Example problem − Lung cancer. A patient has been suffering from breathlessness. He visits
the doctor, suspecting he has lung cancer. The doctor knows that barring lung cancer, there are
various other possible diseases the patient might have such as tuberculosis and bronchitis.
Gather Relevant Information of Problem
Is the patient a smoker? If yes, then high chances of cancer and bronchitis.
Is the patient exposed to air pollution? If yes, what sort of air pollution?
Take an X-Ray positive X-ray would indicate either TB or lung cancer.
Identify Interesting Variables
The knowledge engineer tries to answer the questions −
Which nodes to represent?
What values can they take? In which state can they be?
For now let us consider nodes, with only discrete values. The variable must take on exactly one
of these values at a time.
Common types of discrete nodes are −
Boolean nodes − They represent propositions, taking binary values TRUE TT and
FALSE FF.
Ordered values − A node Pollution might represent and take values from {low, medium,
high} describing degree of a patient‟s exposure to pollution.
Integral values − A node called Age might represent patient‟s age with possible values
from 1 to 120. Even at this early stage, modeling choices are being made.
Possible nodes and values for the lung cancer example −
Node Type Value Nodes Creation
Name
32
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
Specify Topology
Conventionally, BNs are laid out so that the arcs point from top to bottom. The set of parent
nodes of a node X is given by ParentsXX.
The Lung-Cancer node has two parents reasonsorcausesreasonsorcauses: Pollution and Smoker,
while node Smoker is an ancestor of node X-Ray. Similarly, X-Ray is a
child consequenceoreffectsconsequenceoreffects of node Lung-Cancer and successor of
nodes Smoker and Pollution.
Conditional Probabilities
Now quantify the relationships between connected nodes: this is done by specifying a
conditional probability distribution for each node. As only discrete variables are considered
here, this takes the form of a Conditional Probability Table CPTCPT.
First, for each node we need to look at all the possible combinations of values of those parent
nodes. Each such combination is called an instantiation of the parent set. For each distinct
instantiation of parent node values, we need to specify the probability that the child will take.
For example, the Lung-Cancer node‟s parents are Pollution and Smoking. They take the possible
values = { H,TH,T, H,FH,F, L,TL,T, L,FL,F}. The CPT specifies the probability of cancer for each
of these cases as <0.05, 0.02, 0.03, 0.001> respectively.
Each node will have conditional probability associated as follows −
33
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
34
AMARAVATHI FINISHING SCHOOL Phone: 9886653488
2 Autonomous Robot :Robot free from external control or influence and able to
control itself independently.
4 Blackboard :It is the memory inside computer, which is used for communication
between the cooperating expert systems.
9 Percepts: It is the format in which the agent obtains information about the
environment.
35