Está en la página 1de 6

AKGEC/IAP/FM/02

AJAY KUMAR GARG ENGINEERING COLLEGE, GHAZIABAD

Model solution -sessional test 1

DEPARTMENT : MCA COURSE : MCA (2014-15)


SEMESTER : IV SECTION: MCA-1,2 & 3 SESSIONAL TEST : 1st
SUBJECT NAME : Artificial Intelligence SUB. CODE : NMCA-413
MAX. MARKS : 30 TIME ALLOWED : 1 HR
_____________________________________________________________________________

Note: All questions are compulsory.

Section - A
(a) Define the terms: Intelligence and Artificial Intelligence. Write the various
applications of Artificial Intelligence. [5]
ANS :Intelligence: Intelligence is not information: it is a process, or an innate capacity to use
information in order to respond to ever-changing requirements. It is a capacity to acquire,
adapt, modify, extend and use information in order to solve problems. Therefore,
intelligence is the ability to cope with unpredictable circumstances. But intelligence is not
merely analytical: to survive and flourish in society, we must also have social and
emotional intelligence.
Artificial Intelligence: Artificial intelligence is the area of computer science that deals
with making systems that are intelligent. It can be defined in number of ways. The art of
creating machines that performs functions that require intelligence when performed by
people. It is the study of how to make computers do things at which, at the moment,
people are better.
Applications of AI:
1. Game playing
2. Speech recognition
3. Understanding natural language
4. Computer vision
5. Expert systems
6. Business
7. Engineering
8. Manufacturing
9. Medicine
10. Education
11. Expert Systems.
12. Space Shuttle Scheduling etc..

(b) Discuss different types of agents. [ 5]


ANS: There are five basic types of agents listed below in order of increasing generality:
a. Simple reflex agents: It is the simplest kind of agents. It selects actions on the basis
of the current percept, ignoring the rest of the percept history. It generally works on
Condition-action rule. E.g. if car-in-front-is-braking then initiate-braking. It has
limited intelligence but works well if the environment is fully observable. It faces
problems with partially observable environment.

1
a. Model-based reflex agents: It is useful for partially observable environment
and needs to keep track of the part of the world agent cant see now. (e.g.
changing lane). Its internal state depends on the percept history and reflects at
least some of the unobserved aspects of the current state. It represents the
model of the world. It works according to how world evolves independently
of the agent and how the agents actions affect the world.

b. Goal-based agents: Agents need some sort of goal that describes situations
that are desirable. Agent need to find action sequences that achieve the agents
goals. It is less efficient but more flexible.

c. Utility-based agents: Now in real environment goals alone are not enough.
Higher utility is desirable. Utility function maps a state onto a real number,
which describes the associated degree of happiness. It gives comparatively
rational decisions. In conflicting goals, likelihood of the success is considered.

d. Learning agents: It implements learning to become more competent than its


initial knowledge alone might allow. It has four components:
Performance element this is simple agent.
Learning element It is responsible for making improvements.
Critic It checks how agent is doing w.r.t. fixed performance standard.
Problem generator It is responsible for suggesting actions that will lead to
new and informative experiences.

2
(c) What is water jug problem? Show the state space representation for the solution. Devise
all production rules. [5]
ANS: Production rules. Each of these rules describes a possible change that we can make to
the contents of the two jugs.

Condition New State Description


1 (a,b) if a < 4 (4,b) Fill the 4l jug
2 (a,b) if b < 3 (a,3) Fill the 3l jug
3 (a,b) if a > 0 (0,b) Empty the 4l jug on the ground
4 (a,b) if b > 0 (a,0) Empty the 3l jug on the ground
5 (a,b) if a+b >= 4 and b > (4,b-4+a) Pour water from the 3l jug to fill
0 the 4l jug
6 (a,b) if a+b >= 3 and a > (a-3+b,3) Pour water from the 4l jug to fill
0 the 3l jug
7 (a,b) if a+b <= 4 and b > (a+b,0) Empty the 3l jug into the 4l jug
0
8 (a,b) if a+b <= 3 and a > (0,a+b) Empty the 4l jug into the 3l jug
0

Search tree: The search tree for the water jugs problem is given as:

3
(d) Illustrate alpha beta pruning with the following problem: [5]

ANS Alphabeta pruning can be applied to trees of any depth, and it is often possible to prune
entire subtrees rather than just leaves. The general principle is this: consider a node n
somewhere in the tree, such that Player has a choice of moving to that node. If Player has
a better choice in, either at the parent node of n or at any choice point further up. then n
will never be reached in actual play. So once we have found out enough about n (by
examining some of its descendants) to reach this conclusion, we can prune it.
At last min level when E comes then D10, F comes as 11 so now D is 10. Now at MAX
level it is clear that C will at least be 10. Now at MIN level H comes as 9 so it is
confirmed that G will be less than equal to 9. Now at above MAX level 10 has already
been achieved so why to go for a value which is less than 9 So I will be pruned.
So C is confirmed as 10. So at above MIN level B will at most be 10. Now at lower min
level when L comes as 14, K is at most 14, after confirming M as 15 K is finalized as 14.
So now at next MAX level J is at least 14. But at above MIN level B has already got 10
then there is no need to explore N. So it is pruned.
So B is confirmed as 10. Now A is at least 10. Next T comes as 15. So S is at most 15.
After getting U as 2, it is confirmed as 2. So next level R is at least 2. Now W comes as 4
So V is at most 4, So R could be 4 so X will be checked. After getting X as 1 V is
confirmed as 1. So R is confirmed as 2. It means Q is at most 2. So No need to explore Y.
it will be pruned.

4
Section - B
(a) Discuss natural language processing in short. [5]
ANS: Natural language processing (NLP) is a subfield of artificial intelligence concerned
with the interactions between computers and natural languages. The natural language
processing allows computer to understand people and people understand people. The
natural language with which we communicate is informal and can be ambiguous,
imprecise, inaccurate and incomplete.
Techniques: There are two techniques to do natural language processing:
1.Keyword Analysis (template matching): In this, system scans the input sentences for
selective keywords and once they are encountered, the system responds with a built-
in reply.
Example: Weizenbaums ELIZA program: simulates a practicing psychiatrist.
User: My father used to scold me.
ELIZA: Tell me about your Parent.
User: Rajans father died a couple of years ago.
ELIZA: Tell me about your Parent.
2.Syntactic driven Parsing: In this, system examines the structure of a sentence,
performs a detailed analysis of the syntax and semantics of the statements. Following
are the main steps performed in this:
(i) Morphological Analysis: Individual words are analyzed into their components
and nonword tokens, such as punctuation, are separated from the words.
(ii) Syntactic Analysis: Linear sequences of words are transformed into structures
that show how the words relate to each other.
(iii) Semantic Analysis: The structures created by the syntactic analyzer are assigned
meanings.
(iv) Discourse integration: The meaning of an individual sentence may depend on
the sentences that precede it and may influence the meanings of the sentences that
follow it.
(v) Pragmatic Analysis: The structure representing what was said is reinterpreted to
determine what was actually meant.

(b) What are different parameters used to evaluate a search technique? Evaluate iterative
deepening search. [5]
5
ANS: Search techniques are evaluated along the following parameters:
1. Completeness: A search technique is said to be complete if the algorithm guarantees to
find a solution when there is one
2. Time complexity: The time complexity tells the time taken by an algorithm to find a
solution.
3. Space complexity: The space complexity tells how much memory is needed to
perform the search.
4. Optimality: Number of solutions may exist for a problem. Optimality tells the
algorithm finds the optimal solution or not.

Iterative Deepening Search(IDS)


1) It is complete as it searches all the nodes level wise.
2) Time complexity is O(bd) where b is branching factor and d is depth of the
shallowest goal node
3) Space complexity id O(bd) where b is branching factor and d is depth of the
shallowest goal node as it implements DFS
4) It is optimal as it searches level wise

También podría gustarte