Professional Documents
Culture Documents
Biyani's Think Tank: Concept Based Notes
Biyani's Think Tank: Concept Based Notes
AI
MSc-IT
Ms Rashmi
Deptt. of IT
Biyani Girls College, Jaipur
2
Published by :
Think Tanks
Biyani Group of Colleges
Edition : 2012
While every effort is taken to avoid errors or omissions in this Publication, any mistake or
omission that may have crept in is not intentional. It may be taken note of that neither the
publisher nor the author will be responsible for any damage or loss of any kind arising to
anyone in any manner on account of such errors and omissions.
AI
Preface
am glad to present this book, especially designed to serve the needs of the
students. The book has been written keeping in mind the general weakness in
understanding the fundamental concepts of the topics. The book is self-explanatory and
adopts the Teach Yourself style. It is based on question-answer pattern. The language
of book is quite easy and understandable based on scientific approach.
Any further improvement in the contents of the book by making corrections,
omission and inclusion is keen to be achieved based on suggestions from the readers
for which the author shall be obliged.
I acknowledge special thanks to Mr. Rajeev Biyani, Chairman & Dr. Sanjay Biyani,
Director (Acad.) Biyani Group of Colleges, who are the backbones and main concept
provider and also have been constant source of motivation throughout this endeavour.
They played an active role in coordinating the various stages of this endeavour and
spearheaded the publishing work.
I look forward to receiving valuable suggestions from professors of various
educational institutions, other faculty members and students for improvement of the
quality of the book. The reader may feel free to send in their comments and suggestions
to the under mentioned address.
Author
AI
Unit1
Introduction
Q1.
Ans
What is AI?
Artificial intelligence is the study of how to make computers do things which, at
the moment, people can do better.
Artificial Intelligence is the study of human intelligence such that it can be
replicated artificially.
Deduction,
Reasoning,
Problem solving
Knowledge representation
Planning
Learning Natural Language Processing
Motion and manipulation
PerceptionCreativity
Q6 .
Ans
AI
(ii)
If it is not a goal state but it is better than the current state, then
make it current state.
(iii)
If it is not better than the current state, then continue in the loop.
As we already know that heuristics always has information about the problem
and its parameter.
In the Best-First Search it follow a single path at a time but it has capability to
switch path whenever some competing path looks more promising than the
current one does.
The Best-First-Search is an instance of the general Tree-Search or Graph-Search
algorithm in which a Node is selected for expansion based on an evaluation
function f(n). The evaluation function measures distance to the Goal and the
Node with the lowest evaluation is selected for expansion first.
The Key component in Best-First algorithm is a heuristic function h(n) , which is
the estimated cost of his cheapest path from n to a goal node.
The heuristic function h(n) are the most common form in which addition
knowledge of the problem is imparted to the search algorithm
At the each step of the Best-First Search process, 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 its successor. If one of them is a solution, we can quit. If not, all
those new nodes are added to the set of new nodes generated so far. Again the
most promising node is selected and the process continue, if the solution not
found, then that branch will start to look less promising then one of the top-level
branches that has been ignored. At this point, the now more promising,
previously ignored branch will be explored. But the old branch not forgotten.
To implement it we will need to use two list of nodes
OPEN nodes that have been generated and have had the heuristic function
applied to them but which have yet to be examined. OPEN is actually a priority
queue in which the elements with the highest priority are those with the most
promising value of the heuristic function.
CLOSE nodes that have already been examined. We need to keep these nodes
in memory to check whenever a node is generated it already examined or not.
AI
Lets consider the following example to find the path from Start to Goal in the
graph below
10
>>> Visit the Start Node and add its neighbors to the fringe
AI
11
>>> Visit the Node A and add its neighbors to the fringe
Now there is a choice on which node to visit next. Because we are using greedy
best-first search, the node with the lowest heuristic is used. If this solution was
12
implemented, a priority queue would be used for the fringe, so it would always
return the node with the lowest heuristic. Since node D has the lowest heuristic
value, we visit at that node and add its neighbors to the fringe.
Now, since node E has the lowest heuristic in the fringe, it is visited at and its
neighbors are added to the fringe.
AI
13
Finally, since the Goal is in the priority queue with a heuristic of 0, it is visited
and a path to the goal is found. The path found from Start to Goal is: Start -> A ->
D -> E -> Goal. In this case, it was the optimal path, but only because the
heuristic values were fairly accurate.
Q7.
Ans
14
AI
15
16
Choose the best problem solving technique(s) and apply to the particular
problem
Q12. What is Natural Language Processing?
Ans Natural Language Processing (NLP) is an area of research and application that
explores how computers can be used to understand and manipulate natural
language text or speech to do useful things. NLP researchers aim to gather
knowledge on how human beings understand and use language so that
appropriate tools and techniques can be developed to make computer systems
understand and manipulate natural languages to perform the desired tasks. The
foundations of NLP lie in a number of disciplines, viz. computer and information
sciences, linguistics, mathematics, electrical and electronic engineering, artificial
intelligence and robotics, psychology, etc. Applications of NLP include a number
of fields of studies, such as machine translation, natural language text processing
and summarization, user interfaces, multilingual and cross language information
retrieval (CLIR), speech recognition, artificial intelligence and expert systems,
and so on.
Q13. What is the Turing test?
Ans Alan Turing's 1950 article Computing Machinery and Intelligence discussed
conditions for considering a machine to be intelligent. He argued that if the
machine could successfully pretend to be human to a knowledgeable observer
then you certainly should consider it intelligent. This test would satisfy most
people but not all philosophers. The observer could interact with the machine
and a human by teletype (to avoid requiring that the machine imitate the
appearance or voice of the person), and the human would try to persuade the
observer that it was human and the machine would try to fool the observer.
The Turing test is a one-sided test. A machine that passes the test should
certainly be considered intelligent, but a machine could still be considered
intelligent without knowing enough about humans to imitate a human.
Q.14. Isn't AI about simulating human intelligence?
Ans Sometimes but not always or even usually. On the one hand, we can learn
something about how to make machines solve problems by observing other
people or just by observing our own methods. On the other hand, most work in
AI involves studying the problems the world presents to intelligence rather than
AI
17
studying people or animals. AI researchers are free to use methods that are not
observed in people or that involve much more computing than people can do.
Q.15. Are computers the right kind of machine to be made intelligent?
Ans Computers can be programmed to simulate any kind of machine.
Many researchers invented non-computer machines, hoping that they would be
intelligent in different ways than the computer programs could be. However,
they usually simulate their invented machines on a computer and come to doubt
that the new machine is worth building. Because many billions of dollars that
have been spent in making computers faster and faster, another kind of machine
would have to be very fast to perform better than a program on a computer
simulating the machine.
Q.16. Explain term simulation?
Ans Simulation
A simulation is a system that is constructed to work, in some ways, analogously
to another system of interest. The constructed system is usually made simpler
than the original system so that only the aspects of interest are mirrored.
Simulations are commonly used to learn more about the behavior of the original
system, when the original system is not available for manipulation. It may not be
available because of cost or safety reasons, or it may not be built yet and the
purpose of learning about it is to design it better. If the purpose of learning is to
train novices, then cost, safety, or convenience are likely to be the reasons to
work on a simulated system. The simulation may be a computer simulation
(perhaps a realistic one of a nuclear power station's control room, or a
mathematical one such as a spreadsheet for "what-if" analysis of a company's
business); or it may be a small-scale physical model (such as a small-scale bridge,
or a pilot chemical plant).
Q17. Explain Cognitive Science.
Ans Artificial intelligence can be defined as the mimicking of human thought to
perform useful tasks, such as solving complex problems. This creation of new
paradigms, algorithms, and techniques requires continued involvement in the
human mind, the inspiration of AI. To that end, AI software designers team with
18
2.
Cognitive science is a
a)
Combination of AI and Phychology
b)
Combination of AI and medicine
c)
Combination of AI and Sociology
d)
None of the above
Ans: a
3.
4.
AI
19
5.
6.
7.
8.
9.
20
10.
11.
Father of A.I
a)
Alan Turning
b)
Fisher Ada
c)
Allen Newell
d)
none
Ans:a
12.
13.
14.
AI
21
15.
16.
17.
22
Unit 2
Knowledge Representation
Q.1.
Ans
Q.2
Ans
AI
23
with belief than knowledge". Given that an agent (human or computer) has
certain beliefs, what else is reasonable for it to believe, and how is it reasonable
for it to act, regardless of whether those beliefs are true and justified.
Q.3.
Ans
24
Q.4.
Ans
Q5.
AI
25
Has (x, H)
Which says that everyone has the same heart H.? We need to say that the heart
they have is notnecessarily shared, that is, it can be found by applying to each
person a function that maps from personto heart:
Has (x, F(x))
Where F is a function name that does not appear elsewhere in the KB. F is called
a SkolemFunction. In general, the existentially quantified variable is replaced by
a term that consists of a SkolemFunction applied to all the variables universally
quantified outside the existential quantifier in question.Skolemization eliminates
all existentially quantified variables, so we are now free to drop the
universalquantifiers, because any variable must be universally quantified.
Q.6. Comment on Heuristics are fallible.
Ans. Heuristics are fallible because they rely on limited information, they may lead to
a suboptimalsolution or to a dead end.Heuristics is a rule of thumb or
judgmental technique that leads to a solution some of the timebut provides no
guarantee of success. It may in fact end in failure. Heuristics plays an important
rolein search strategies because of the exponential nature of most problems. They
help to reduce thenumber of alternatives from an exponential number to a
polynomial number and, thereby, obtain asolution to a tolerable amount of time.
When exhaustive search is impractical, it is necessary tocompromise for a
constrained search which eliminates many paths but offers the promise of
successsome of the time. Here, success may be considered to be finding an
optimal solution a fair proportionof the time or just finding good solutions much
of the time.
Q7.
Ans
Requirements of KR languages
1. At the implementational level, the main concern is efficiency (space and time).
2. At the logical level, one is concerned with two things: the syntax (Freges
compositionality principle, which states that the meaning of a compound
expression should be derivable from the meanings of its parts) and the
soundness of the inference rules.
26
3. At the epistemological level, there are four main concerns: If there exists a
natural way of organising knowledge, the KR language has to respect this; the
KR language has to be modular; attention to the granularity (=size of the
information chunks) is important; and the language should support the actual
primitives of the conceptual level.
4. At the conceptual level, one is concerned with how concisely one can
represent particular pieces of knowledge.
Q8.
Ans
AI
27
What is Prolog ?
Prolog (programming in logic) is a logic-based programming language:
programs correspond to sets of logical formulas and the Prolog interpreter uses
logical methods to resolve queries.
Prolog is a declarative language: you specify what problem you want to solve
rather than how to solve it.
Prolog is very useful in some problem areas, such as artificial intelligence,
natural language processing, databases, . . . , but pretty useless in others, such as
for instance graphics or numerical algorithms.
28
AI
29
Simple heuristic for tic-tac-toe: Move to the square in which X has the most
winning lines. Using this rule, we can see that a corner square has heuristic
value of 3, a side square has a heuristic value of 2, but the center square has a
heuristic value of 4. So we can prune the left and right branches of the search tree.
This removes 2/3 of the search space on the first move. If we apply the heuristic
at each level of the search, we will remove most of the states from consideration
thereby greatly improving the efficiency of the search.
30
d)
None of the above
Ans:c
2.
3.
4.
5.
6.
Knowledge may be
I. Declarative.
II. Procedural.
AI
31
III. Non-procedural.
(a)
Only (I) above
(b)
Only (II) above
(c)
Only (III) above
(d)
Both (I) and (II) above
Ans : (a)
Reason :
Idempotency Law is P V P = P
7.
8.
An algorithm is complete if
(a)
It terminates with a solution when one exists
(b)
It starts with a solution
(c)
It does not terminate with a solution
(d)
It has a loop
(e)
It has a decision parameter.
Ans : (a)
Reason :
An Algorithm is complete if It terminates with a solution
when one exists.
9.
32
10.
11.
AI
33
Unit 3
Expert System
Q.1
Ans
34
Q2.
Ans
Explain MYCIN?
Mycin is a program that diagnoses infectious diseases. It reasons backward from
its goal of determining the cause of a patient illness. It attempts to solve its goal
of recommending a therapy for a particular patient by first finding the cause of
the patients illness. It uses its production rule4s to reason backward from goals
to clinical observations. To solve the top-level diagnostic goal, it looks for rules
whose right sides suggest diseases. It then uses the left sides of those rules (the
preconditions) to set up sub goals whose success would enable the rules to be
invoked . these sub goals are again matched against rules, and their
preconditions are used to set up additional sub goals.
Mycin is a well known rule based deduction system. Its expertise lies in the
domain of bacterial Infections. Physicians usually must begin antibiotic
treatment for patient who have bacterial infections without knowledge exactly
which organism is the culprit. There is no time to wait for definitive laboratory
culture evidence, which accumulates too slowly. For the desperately sick,
therapy must begin at once not 2 days from can either prescribe a broad
spectrum drug that covers all possibilities , or she can prescribed a better, disease
specific drug.
Mycin helps the physician to prescribe disease specific drugs. Mycin in-forms it
self about particular cases by requesting information from the physician about a
patients symptoms, general condition. History, and laboratory test results that
can be obtained easily and quickly. At each point, the question mycin asks is
determined by Mycins current hypothesis and the answers to all previous
questions.
Q.3.
Ans
Explain DENDRAL.
DENDRAL
DENDRAL is a program that analyses organic compounds to determine their
structure. It is one of the early example of a successful AI program . It uses a
strategy called plan-generate-test in which a planning process that used
constraint-satisfaction techniques, creates lists of recommended and
contraindicated substructures.
Q.4.
AI
Ans
35
Q.5.
Ans
Q6.
Ans
36
1. Expert system use knowledge rather than data to control the solution
process. Much of the knowledge used in heuristic in nature rather than
algorithm.
2. The knowledge is encoded and manipulate as an entity separate from
the control programsuch as if not compiled together with the control
program itself. In some cases, it is possible to use different knowledge
bases with the same control program to producedifferent types of
expert system such system are known as Expert system shells.
3. Expert systems are capable of explaining how a particular conclusion
was drawn and whyrequested information is needed during a
conclusion.
4. Expert system use symbolic representation for knowledge (rules,
networks or frames) and perform their inference through symbolic
computations that closely resemble manipulateof manual language.
Q7.
Ans
Q.9
Ans
AI
37
2.
4.
38
a)
Contains declarative knowledge
b)
Contains procedural knowledge
c)
Features the retrieval of stored information
d)
Expects users to draw their own conclusion
Ans: b
5.
6.
7.
8.
AI
39
Ans: (e)
9. Perception involves
a)
Hitting
b)
Boxing
c)
Dancing
d)
Sights,rounds,smell and touch
Ans : d
10.
11.
40
Key Terms
User Interface: Provides the means for dialog between the user and system.
Explanation facility : Provides the user with Explanations of how a conclusion was
reached or why a piece of knowledge is needed. They also need to be convinced that the
solution isappropriate and applicable in their circumstances.
Inference Engine
accepts user input quarries and response to questions through the user interface and
uses this dynamic information together with the static knowledge (the rules andfacts)
stored in the knowledge base.
The inference process is carried out recursively in three stages (I) match (II) select (III)
execute.During the match stage, the contents of working memory are compared to facts
and rulescontained in the knowledge base.
Knowledge base contains facts and rules about some specialized knowledge domain.
Learning module implies that an organize or machine must be able to adapt to new
situations.The job of Knowledge engineer is to extract the knowledge from the expert
and other sourceslike book, journals, article etc.
Adaptive Interface A computer interface that automatically and dynamically adapts to
the needs and competence of each individual user of the software.
Agents Agents are software programs that are capable of autonomous, flexible,
purposeful and reasoning action in pursuit of one or more goals. They are designed to
take timely action in response to external stimuli from their environment on behalf of a
human. When multiple agents are being used together in a system, individual agents
are expected to interact together as appropriate to achieve the goals of the overall
system. Also called autonomous agents, assistants, brokers, bots, droids, intelligent
agents, software agents.
AI Languages and Tools: AI software has different requirements from other,
conventional software. Therefore, specific languages for AI software have been
AI
41
developed. These include LISP, Prolog, and Smalltalk. While these languages often
reduce the time to develop an artificial intelligence application, they can lengthen the
time to execute the application. Therefore, much AI software is now written in
languages such as C++ and Java, which typically increases development time, but
shortens execution time. Also, to reduce the cost of AI software, a range of commercial
software development tools have also been developed. Stottler Henke has developed its
own proprietary tools for some of the specialized applications it is experienced in
creating.
Algorithm : An algorithm is a set of instructions that explain how to solve a problem. It
is usually first stated in English and arithmetic, and from this, a programmer can
translate it into executable code (that is, code to be run on a computer).
Applications of Artificial Intelligence :
The actual and potential applications are virtually endless. Reviewing Stottler Henke's
work will give you some idea of the range. In general, AI applications are used to
increase the productivity of knowledge workers by intelligently automating their tasks;
or to make technical products of all kinds easier to use for both workers and consumers
by intelligent automation of different aspects of the functionality of complex products.
Associative Memories :
Associative memories work by recalling information in response to an information cue.
Associative memories can be autoassociative or heteroassociative. Autoassociative
memories recall the same information that is used as a cue, which can be useful to
complete a partial pattern. Heteroassociative memories are useful as a memory.
Human long-term memory is thought to be associative because of the way in which one
thought retrieved from it leads to another. When we want to store a new item of
information in our long term memory it typically takes us 8 seconds to store an item
that can't be associated with a pre-stored item, but only one or two seconds, if there is
an existed information structure with which to associate the new item.
Autonomous Agents
A piece of AI software that automatically performs a task on a human's behalf, or even
on the behalf of another piece of AI software, so together they accomplish a useful task
for a person somewhere. They are capable of independent action in dynamic,
unpredictable environments. "Autonomous agent" is a trendy term that is sometimes
42
reserved for AI software used in conjunction with the Internet (for example, AI software
that acts as your assistance in intelligently managing your e-mail).
Autonomous agents present the best hope from gaining additional utility from
computing facilities. Over the past few years the term "agent" has been used very
loosely. Our definition of a software agent is: "an intelligent software application with
the authorization and capability to sense its environment and work in a goal directed
manner." Generally, the term "agent" implies "intelligence", meaning the level of
complexity of the tasks involved approaches that which would previously have
required human intervention.
Backtracking A control method used to search backwards for solutions
Clauses Either a Prolog fact or rule.
Cognitive Science : Cognitive Science, as a discipline, is concerned with learning how
animals (and machines) acquire knowledge, represent that knowledge, and how they
manipulate those representations..
Computer Vision :Making sense of what we see is usually easy for humans, but very
hard for computers. Practical vision systems to date are limited to working in tightly
controlled environments. Synonym: machine vision
Domain : An overworked word for AI people. "Domain" can mean a variety of things
including a subject area, field of knowledge, an industry, a specific job, an area of
activity, a sphere of influence, or a range of interest, e.g., chemistry, medical diagnosis,
putting out fires, operating a nuclear power plant, planning a wedding, diagnosing
faults in a car. Generally, a domain is a system in which a particular set of rules, facts, or
assumptions operates. Humans can usually easily figure out what's meant from the
context in which "domain" is used; computers could probably not figure out what a
human means when he or she says "domain."
Domain Expert
The person who knows how to perform an activity within the domain, and whose
knowledge is to be the subject of an expert system. This person's or persons' knowledge
and method of work are observed, recorded, and entered into a knowledge base for use
AI
43
44
AI
45
46
Relevance Feedback
Relevance feedback methods are used in information retrieval systems to improve the
results produced from a particular query by modifying the query based on the user's
reaction to the initial retrieved documents. Specifically, the user's judgments of the
relevance or non-relevance of some of the documents retrieved are used to add new
terms to the query and to reweight query terms. For example, if all the documents that
the user judges as relevant contain a particular term, then that term may be a good one
to add to the original query.
Rule-based System
An expert system based on IF-THEN rules for representing knowledge.
Scheme Langauge A LISP dialect often used within computer science curricula and
programming language research.
Speech Recognition The ability of a computer to understand spoken words for the
purpose of receiving commands and data input from the speaker.
Source Code
Symbolic coding in its original form before being processed by a computer.
Simulation
A simulation is a system that is constructed to work, in some ways, analogously to
another system of interest. The constructed system is usually made simpler than the
original system so that only the aspects of interest are mirrored. Simulations are
commonly used to learn more about the behavior of the original system, when the
original system is not available for manipulation. It may not be available because of cost
or safety reasons, or it may not be built yet and the purpose of learning about it is to
design it better. If the purpose of learning is to train novices, then cost, safety, or
convenience are likely to be the reasons to work on a simulated system. The simulation
may be a computer simulation (perhaps a realistic one of a nuclear power station's
control room, or a mathematical one such as a spreadsheet for "what-if" analysis of a
company's business); or it may be a small-scale physical model (such as a small-scale
bridge, or a pilot chemical plant).
Turing Test--A game to determine whether a computer might be considered to possess
intelligence, developed by British mathematician Alan Turing. Participants include two
AI
47
respondents (a computer and a human) and a human examiner who tries to determine
which of the unseen respondents is the human. According to this test, intelligence and
the ability to think would be demonstrated by the computer's success in fooling the
examiner.
Unification The pattern matching technique used by Prolog to match goals and subgoals in a program.
48
Abbreviations
AI :
QA:
IR:
IE:
NLP:
XML:
AIML:
ALICE:
PNAMBIC:
Artificial Intelligence
Question Answering
Information Retrieval
Information Extraction
Natural Language Processing
Extensible Markup Language
Artificial Intelligence Markup Language
Artificial Linguistic Internet Computer Entity
Pay No Attention to that Man Behind the Curtain
AI
49
Bibliography
1. Charniak, E.: Introcuction of Artificial Intelligence, Narosa Publishing House.
2. Winton. P.H. : LISP, Narosa Publishing House.
3. Marcellus: Expert System Programming in TURBO PROLOG PrenticeHall Inc. 1989.
4. Clark, K. L. & McCabe, F.G.: Micro-Prolog Prentice-Hall Inc. 1987
5. Elaine rich & Kevin Knight: Artificial Intelligence and Expert System, PHI.