Artificial Intelligence
Artificial Intelligence
UNIT
Introduction
CONTENTS
Part-1 : Introduction-Definition 1-2A to 1-5A
1-1A (CSIT-Sem-7)
1-2 A (CSIT-Sem-7) Introduction
PART- 1
Introduction-definition.
Questions-Answers
Answer
1 Artificial Intelligence (AI) is an area of computerscience that emphasizes
the creation of intelligent machines that work and reacts like humans.
2. Alhas become an essential part of the technology industry.
3. Research associated with artificial intelligence is highly technical and
specialized. The core problems of artificial intelligence include
programming computers for certain traits such as:
1. Knowledge
Reasoning
üi. Problem solving
iv. Perception
V. Learning
vi. Planning
vü. Ability to manipulate and move objects
Goals of AI :
1. To create expert systems : The systems which exhibit intelligent
behaviour, learn, demonstrate, explain, and advice its users.
2 To implement human intelligence in machines : Creating systems
that understand, think, learn, and behave like humans.
Que 1.2. What are the different branches of artificialI
intelligence ? Discuss some of the branches and progress made in
their fields.
Answer
Different branches of AI and progress made in these fields :
1. Machine Learning (ML) :
ML is a method where the target is defined and the steps to reach
that target are learned by the machine itself by training.
Artificial lntelligence 1-3A (CSTT-Sem-7)
Que 1.3. Define the role of the machine intelligence in the human
life.
AKTU2017-18, Marks 10
Answer
1
Machine intelligence is the intelligence provided to the particular
machine to achieve the goals of the problems in AI.
2 It is defined as the embedding of intelligence in the machine so that the
machine can behave like a human.
3
In human life, machine learning solves many problems of daily purpose
of the human.
4 There aremany problems which require intelligence such as complex
arithmetic which is done by machine very easily.
5 Machine learning plays an important role in following areas:
Learning:
a.
Learning means to acquire new things from the set of given
knowledge or experiences.
b. It refers to the change in subject's behaviour to a given
situation brought by repeated experiences in that situation.
ii. Reasoning :
Reasoning means to infer facts from given facts.
b. Inferences are classified as either deductive or inductive and
the reasoning is to draw inferences appropriate to the situation.
Introduction
14A (CSIT-Sem-7)
Answer
Distinct categories of AI namely:
basic type of AI and are
1. Reactive machines : These are the most memories nor can use past
purely reactive. They neither can form
experiences to form decisions.
For example: IBMs Deep Blue chess-playingbeat is supercomputer which
the opponent. Apart
choose most optimal of the chess moves and
repeating the same move
from a rarely used chess-specific rule against the present moment,
three times, Deep Blue ignores everything before
AIjust perceives the world,
thus not storing any memories. This type of
and acts on it.
the chess game in the case of Deep Blue,
the past. Not the
2 Limited memory: These machines can look into
usage of memories
ability to predict what happened in the past, but the
to form decisions.
other cars' speed and
For example: Self-driving cars. They observe ofhow a car is
directions and act accordingly. This requires monitoring observe and
humans
driven for a specificamount of time. Just like how
are not stored in the
learn the specifics. These pieces of information humans. We humans
library of experiences of the machines, unlike experiences and can
automatically save everything in the library of our
learn from it, but limited memory machines can't.
understand
3 Theory of mind : These are types of machines that can
some of
that people have beliefs, emotions, expectations, etc. and have
their own.
Atheory of mind" machine can think emotionally and can respond with
emotions.
For example : AI like Sophia, the research is not complete yet, these
machines have a notion of not just the world, but also the existing
entities of the world, like human beings, animals, etc.
1-5 A (CSTT-Sem-7)
Artificial Intelligence
4. Self-Awareness: These types of machines can be called human
equivalents.
For example : The difference between "theory of mind" and self
awareness" AI. The feeling of Iwant to play is different from the feeling
of I know I want toplay. In the latter, there is a sense of consciousness
and is a characteristic of a self-aware machine, while the former feeling
is a characteristic of a theory-of-mind machine. Self-aware machines
will have the ability to predict others' feelings.
PART-2
Questions-Answers
Long Answer Type and Medium Answer Type Questions
AKTU2018-19, Marks 10
Answer
Evolution of AI :
1. Beginning of AI (1943): The concept of AI began around 1943. AI is
not limited to the computer sciences disciplines, but can be seen in
various other areas.
2 AIknowledge-based expert system (1970): An Al system often uses
a rule-based system to capture knowledge in the îorm of if-then
statements or as decision trees.
PART-3
Characteristics of Intelligent Agents, Typical Intelligent Agents.
Questions-Answers
Long Answer Type and Medium Answer Type Questions
Que 1.6. What do you mean by agent and agent program ? How
do you ensure that an agent program is an intelligent agent
program ? AKTU2014-15, Marks 05
Answer
1. An agent can be anything that perceive its environment through sensors
and act upon that environment through actuators. An agent runs in the
cycle of perceiving, thinking, and acting.
2 To understand the structure of intelligent agents, we should be familiar
with architecture and agent program.
Agent = Architecture + Agent Program
3. Architecture is the machinery that the agent executes on. It is a device
with sensors and actuators, for example : a robotic car, a camera, a PC.
4. Agent program is an implementation of an agent function.
5 An agent function is a map from the percept sequence to an action.
6 An agent program is an intelligent agent program if it follows the weak
notion (i.e., flexibility, interactivity and autonomy) and strong notion
(i.e., information-related states, connotative states and affective states).
Artificial lntelligence 1-7A (CSIT-Sem-7)
Answer
Intelligent agent : An intelligent agent is an autonomous entity which acts
upon an environment using sensors and actuators for achieving goals. An
intelligent agent may learn from the environment to achieve their goals.
Percepts
Sensors
Environment
Effectors
Actions
Fig. 1.7.1.
Basic kinds of agent programs are :
1. Simple reflex agent:
i The simple reflex agents are the simplest agents. These agents
take decisions on the basis of the current percepts and ignore the
E:
F rest of the percept history.
ii.
These agents only succeed in the fully observable environment.
iüi. The simple reflex agent works on condition-action rule, which
means it maps the current state to action.
Sensors
Agent
Environment
What the world is
like now
Actuators
Agent Actuators
What it will be
What my actions do like if Ido action A
Agent Actuators
ii. The utility function maps each state toa real number to check how
efficiently each action achieves the goals.
Sensors
State
Goals
How happy i will
be in such a state
Agent Actuators
iv. It uses a model of the world, along with a utility function that
measures its preferences among states of the world. Then it chooses
the action that leads to the best expected utility, where expected
utility.
Que 1.8.Deseribe the characteristics of intelligent system ?
Answer
Answer
Properties of environments:
1. Discrete / Continuous : If there are a limited number of distinct,
clearly defined, states of the environment, the environment is discrete
otherwise it is continuous.
2. Observable / Partially observable : If it is possible to determine the
complete state of the environment at each time point from the percepts
it is observable; otherwise it is only partially observable.
3. Dynamic/ Static : If theenvironment is changing for agents action
then the environment is dynamic for that agent, otherwise it is static.
4. Single agent / Multiple agents : An agent operating by itself in an
environment is single agent. Multiple agent is when other agents are
present. Other agent is anything that changes from step to step.
5. Accessible / Inaccessible : If the agent's sensory apparatus can have
access to the complete state of the environment, then the environment
is accessible to that agent; otherwise it is inaccessible.
6. Deterministic /Non-deterministic : If the next state of the
environment is completely determined by the current state and the
actions of the agent, then the environment is deterministic; otherwise it
is non-deterministic.
Critic Sensors
Feedback
Changes
Learning Performance
element element
Learning
Knowledge
goals
Problem
generator
Actuators
Agent
Fig. 1.10.1.
2. Four component of learning agent are:
a. Learning element :
The learning element responsible for making improvements.
It uses feedback from the critic on how the agent is doing and
determines how the performance elements should be modified
in the future.
ü. The design of learning element depends on the design of
performance element.
b. Performance element :It is responsible for selecting external
action.
C. Critic :
i. It tells the learning elements how wellthe agent is doing with
respect to a fixed performance standard.
It is necessary because the percepts themselves provide no
indication of the agent's success.
d. Problem generator :
i. Problem generator is responsible for suggesting actions that
will lead tonew and informative experiences.
It also suggests exploratory actions.
applications
Que 1.11. Explain in detail on the characteristics and
AKTU2016-17, Marks 10
of learning agents.
1-12 A (CAIT-Sem-7) Introduction
Answer
Characteristics of learning agent:
1 Situatedness :When an agent receives some form of sensory input
from its environment, it then performs some actions that change its
environment in some way.
2. Autonomy: This agent characteristic means that an agent is able to
act without direct intervention from humans or other agents. This
type of agent has almost complete control over its own actions and
internal state.
3. Adaptivity : This agent characteristic means that it is capable of
reacting flexibly to changes within its environment. It is able to accept
goal directed initiatives when appropriate and is also capable of learning
from its own experiences, environment and interaction with others.
4. Sociability : This type of characteristic means that the agent is capable
of interacting in a peer-to-peer manner with other agents or humans.
Applications of learning agent :
1. Clustering
2. Classification
3. Prediction
4. Search engines
5. Computer vision
6. Self-driving car
7. Recognition of gestures
PART-4
Problem Solving Approach to Typical Al Problems.
Questions-Answers
Long Answer Type and Medium Answer Type Questions
Que 1.12. What are the AI components that are required to solve
problem?
Answer
AI components that are required to solve problem are: There are
six
major components of an artificial intelligence system. They are solely
responsible for generating desired results for particular problem. These
components are as follows,
Artificial Intelligence 1-13 A (CSIT-Sem-7)
1. Knowledge Representation : It is used for representing necessary
knowledge so as to generate knowledge base with the help of which AI
system can perform tasks and generate results.
2. Heuristic Searching Techniques: While dealing with the problems
the knowledge base keeps on growing and growing making it difficult to
search in that knowledge base. To tackle this challenge, heuristic
searching techniques can be used which can provide results efficiently
in terms of time andmemory usage.
3. Artificial Intelligence Hardware : Hardware must be efficient to
accommodate and produce desire results. Hardware components include
each and every machinery required spanning from memory to processor
to communicating devices.
4. Computer Vision and Pattern Recognition : AIprograms capture
the inputs on their own by generating a real world scenario with the
help of this component. Sufficient and compatible hardware enables
better patterns gathering that makes a useful knowledgebase.
5. Natural Language Processing: This component processes or analysis
written or spoken languages. Acquiring the word sequence and parsing
sentence into computer is no just sufficient to gain knowledge about
environment for AI systems. Natural Language processing plays vital
role in understanding of domain of text to Al systems.
6. Artificial Intelligence Language and Support Tools : Artificial
intelligence languages are almost similar to traditional software
development programming languages with additional feature to capture
human brain processes and logic as much as possible.
Answer
Formal description of the problem is as follows:
1. Explicit goal of the problem : Goals help to organize behaviour of
systems by limiting the objectives that the agent is trying to achieve.
Goal formulation is based on the current situation and the agent's
performance measure. It is first step towards problem solving.
2. Implicit criteria for success:That is how success is defined. That
will be the ultimate thing system needs to achieve, which is the problem
solution's output.
3. Initial situation : It means that what is going to be the start state of
problem being solved.
4. Ability to perform : It tells how agents transform from one situation
to another, how operations and rules are specified which change the
states of the problem during solution process.
1-14 A (CSIT-Sem-7) Introduction
gets known set of actions which leads to goal state. Thus agent search
for describable sequence of actions this process is called as searching
process.
With knowledge of environment and goal state we can design a search
algorithm. A search algorithm is a procedure which takes problem as
input and returns its solution which is represented in the form of action
sequence.
Step 5: Execution phase
i. Once the solution is given by the search algorithm then the actions
suggested by the algorithm are executed.
ii. This is the execution phase. Solution guides agent for doing the actions.
After executing the actions, agent again formulate new goal.
Problem
(Set of goals)
Goal information
Performace measure
Action, states
Execution
Goal satisfied
CONTENTS
Part-1: Problem Solving Methods .2-2A to 2-4A
2-1 A (CSTT-Sem-7)
2-2 A (CSTT-Sem-7) Problem Solving Methods
PART-1
Questions-Answers
Answer
We can distinguish problems in two categories:
1. Toy problem :
i. Atoy problem is a problem which illustrates various problem solving
methods.
For the toy problem exact and precised description can be given.
ii. These problems provide basis for solving some real-life problems.
iv. They can be used by researchers to compare performance of
algorithms.
V For example :8-queen puzzle, vacuum world, bali picker robot.
2 Real world problem:
i. Areal-world problem is a problem which needs to be solved so that
its solution can be utilized in practical life.
They do not have well described, single specification.
ii. People do care about the solutions of real-world problem as they
are benefited from it.
iv. For example : Route finding for a trip, travelling salesman problem,
robot navigation, car reversing guide.
Que 2.2.Explain construction of state space.
Answer
Construction of state space :
1 The root of search tree is a search node corresponding to initial state. In
this state only we can check if goal is reached.
2 If goal is not reached we need to consider another state. Such a process
can be done by expanding from the current state by applying successor
function which generates new state. From this we may get multiple
states.
Artificial ntelligence 2-3 A (CSIT-Sem-7)
3. For each one of these, again we need to check goal test or else repeat
expansion of each state.
4. The choice of which state to expand is determined by the search strategy.
5. Itis possible that some state, surely,can never lead to goal state. Such a
state we need not to expand. This decision is based on various conditions
of the problem.
Que 2.3. What are various terminologies used in search tree ?
Answer
Terminologies used in search trees are :
1. Node in a tree : It is a book keeping data structure to represent the
structure configuration of a state in a search tree.
2, State : It reflects world configuration. It is mapping of state and action
to another new state.
3. Fringe:It is acollection of nodesthat have been generated but not yet
expanded.
4. Leaf node: Each node in fringe is leaf node (as it does not have further
successor node).
Answer
Problem solving algorithm's performance can be evaluated on the following
four basic factors:
1. Completeness: Does the algorithm surely find asolution, if really the
solution exists.
2. Optimality : Sometimes it happens that there are multiple solutions to
a single problem. But the algorithm is expected to produce best solution
among all feasible solution, which is called as optimal solution.
3. Time complexity : How much time the algorithm takes to find the
solution.
4. Space complexity : How much memory is required to perform the
search algorithm.
Que 2.5. Explain state space approach for solving any Al problem.
|AKTU2020-21, Marks 07
2-4 A (CSIT-Sem-7) Problem Solving Methods
Answer
1. Astate is a representation of problem elements at a given moment.
2 AState space is the set of all states reachable from the initial state.
3 Astate space forms a graph in which the nodes are states and the arcs
between nodes are actions.
4. In the state space, a path is a sequence of states connected by a sequence
of actions.
5 The solution of a problem is part of the graph formed by the state space.
6 The state space representation forms the basis of most ofthe AI methods.
7. Its structure corresponds to the structure of problem solving in two
important ways :
It allows for a formal definition of a problem as per the need to
convert some given situation into some desired situation using a
set of permissible operations.
b. 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.
8. To solve a particular problem, we need to build a system or a method
which can generate required solution. Following four things are required
for building such system.
Define the problem precisely. This definition must precisely specify
the initial situation (input).
b. Analyse the problem. To identify those important features which
can have an immense impact on the appropriateness.
C. Isolate and represent the task knowledge that is necessary to solve
the problem.
d Choose the best problem solving technique and apply it to the
particular problem.
PART-2
Search Strategies, Uninformed, Informed, Heuristic.
Questions-Answers
Answer
Searching:
1. Searching is the sequence of steps that transforms the initial state to
the goal state.
2. The process of search includes :
Initial state description of the problem.
b. A set of legal operators that change the state.
The final or goal state.
Following are the parameters used to evaluate a search technique :
1. Completeness : By completeness, the algorithm finds an answer in
some finite time. So, the algorithm is said to be complete if it is guaranteed
to find a solution, if there is one.
2. Space and time complexity :With space and time complexity, we
address the memory required and the time factor in terms of operations
carried out.
3. Optimality :Optimality tells us how good the solution is. So, an algorithm
or a search process is said to be optimal, if it gives the best solution.
Que 2.7. Describe the types of search strategies.
Answer
Types of search strategies :
Uninformed search:
1 Uninformed search means that they have no additional information
about states beyond that provided in the problem definition.
2. An uninformed search should proceed in a systematic way by exploring
nodes in some predetermined order or simply by selecting nodes at
random.
Uninformed search is also called Brute Force Search or Blind Search or
3.
Exhaustive Search.
4. It is of following types :
i. Breadth First Search
i. Depth First Search
iii. Uniform Cost search
2-6 A (CSTT-Sem-7)
Problem Solving Methods
Informed search:
1. Informed search algorithm contains an array of knowledge such as how
far we are from the goal, path cost, how to reach to goal node, etc. This
knowledge helps agents to explore less to the search space and find
more efficiently the goal node.
2. Informed search methods often depend on the use of heuristic
information.
3. Informed search is aiso known as heuristic search.
4. Types of informed search are:
i Hill climbing
ii. Best First Search
i. A* algorithm
Que 2.8. Differentiate between informed search and uninformed
search.
Answer
Answer
Breadth First Search (BFS) :
Advantages :
1. If there is more than one solution for a given problem, then BFS provides
the minimal solution which requires the least number of steps.
Disadvantages :
saved into
1. It requires lots of memory since each level of the tree must be
memory to expand the next level.
2 BFS needs lots of time if the solution is far away from the root node.
2-8A (CSTT-Sem-7) Problem Solving Methods
Depth First Search (DFS):
Advantages :
1 DFS requires very less memory as it only needs to store a stack of the
nodes on the path from root node to the current node.
2 It takes less time to reach to the goal node.
Disadvantages :
1. There is the possibility that many states keep re-occurring, and there is
noguarantee of finding the solution.
2 DFS algorithm goes for deep down searching and sometime it may go to
the infinite loop.
Que 2.11. Differentiate between Breadth First Search (BFS) and
Depth First Search (DFS).
Answer
Que 2.13. Write down the algorithm for best first search.
Answer
Algorithm for best first search:
1 Use two ordered lists OPEN and CLOSED.
2. Start with the initial node 'n,' and put it on the ordered list OPEN.
3 Create a list CLOSED. This is initially an empty list.
4. If OPEN is empty then exit with failure.
5. Select first node on OPEN. Remove it from OPEN and put it on
CLOSED. Call this node n.
6 Ifn' is the goal node exit. The solution is obtained by tracing a path
backward along the arcs in the tree from 'n' to n,'.
7. Expand node 'n,. This will generate successors. Let the set ofsuccessors
generated, be S. Create arcs from 'n' to each member of S.
8. Reorder the list OPEN, according to the heuristic and go back to step 4.
Que 2.14. Prove that breadth first search and depth first search
are the special cases of best first search.
AKTU 2017-18, Marks 10
Answer
1
Best first search is a combination of depthfirst and breadth first searches.
2 Depth first is good because a solution can be found without computing
all nodes and breadth first is good because it does not get trapped in dead
ends.
3. The best first search allows us to switch between paths thus gaining the
benefit of both approaches. At each step the most promising node is
chosen.
4. If one of the nodes chosen generates nodes that are less promising it is
possible to choose another at the same level and in effect the search
changes from depth to breadth.
5. If on analysis these are no better than the search method reverts to the
descendants of the first choice and proceeds the backtracking as it were.
2-10 A (CSIT-Sem-7)
Problem Solving Methods
Answer
A0* algorithm :
1 Initialise the graph to start node.
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 ifit has no successors call this
value FUTILITY otherwise calculate only f' for each of the successors.
4. Iff' is 0 then mark the node as SOLVED.
5. Change the value off' 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.
PART-3
Questions-Answers
Long Answer Type and Medium Answer Type Questions
Que 2.17. Explain about the hill climbing algorithm with its
drawback and how it can be overcome ?
AKTU2015-16, Marks 10
OR
Discuss the problems of hill climbing algorithm.
AKTU2018-19, Marks 10
OR
Explain about the Hill climbing algorithm with its drawback and
how it can be overcome ? AKTU 2019-20, Marks 07
Answer
1 The hillclimbingsearch algorithm is simply a loop that continually moves
in the direction ofincreasingvalues, that is, uphill (the goal).
2-12 A (CSIT-Sem-7) Problem Solving Methods
2 It terminates when it reaches a "peak' where no neighbour has a higher
value.
3. The algorithm does not maintain a search tree, so the current node data
structure only records the state and its objective function value.
Hill climbing algorithm :
1. Evaluate the initial state. If it is also a goal state, then return it and quit.
Otherwise, continue with the initial state as the current state.
2. Loop until a solution is found or until there are no new operators left to
be applied in the current state.
Select an operator that has not yet been applied to the current state
and apply it to produce a new state.
b Evaluate the new state.
i. If it is goal state, then return it and quit.
Ifit is not a goal state but it is better than the current state,
then make it the current state.
ii. If it is not better than the current state, then continue in the
loop.
Drawbacks of hill climbing algorithm :
1. Local maxima :
i. Alocal maximum is apeak that is higher than each of its neighobouring
states, but lower that the global maximum.
Hill climbing algorithms that reach the vicinity of a local maximum
will be drawn upwards towards the peak, but will then be stuck
with nowhere else to go.
2. Plateau:
i. Aplateau is a flat area of the search space in which a whole set of
neighbouring states has the same value.
Ahill climbing search might be unable to find its way off the plateau.
3. Ridges: Ridges result in a sequence of local maxima that is very difficult
for greedy algorithms to navigate.
To overcome the drawbacks of hill climbing algorithm:
1. Local maxima :
Backtrack to some earlier node and try going in a diferent direction.
iü. To implement this strategy, maintain a list of paths almost taken
and go back to one of them if the path that was taken leads to a
dead end.
2. Plateau:
Make a big jump in some direction to try to get to a new section of
the search space.
Artificial Intelligence 2-13 A (CSIT-Sem-7)
If the only rules available describe single small steps, apply them
several times in the same direction.
3. Ridges:
Apply two or more rules before doing the test.
ii. This corresponds to moving in several directions at once.
PART-4
Constraint Satisfaction Problems, Constraint Propagation.
Questions-Answers
Long Answer Type and Medium Answer Type Questions
Answer
Constraint satisfaction is a search procedure that operates in a space of
constraint sets. The initial state contains the constraints that are origirally
given in the problem description.
The general form of the constraint satisfaction procedure is :
1. Select an unexpected node of the search graph.
2. To generate all possible new constraints, apply the constraint inference
rule to the selected node.
3. If the set of constraints contain a contradiction, then report that this
path is a dead end.
4. To report success, if the set of constraints, a contradiction describes a
complete solution.
5. If neither a contradiction nor a complete solution has been found then
apply the problem space rules to generate new partial solutions that are
consistent with the current set of constraints. Insert these partial
solutions into the search graph.
Artificial Intelligence 2-15 A (CSIT-Sem-7)
Numerical :
Constraints :
1 D=1
2. 2S = R
3 C+R>9 or 8
4 S+1= E->S=E-1
Hence, after guessing
CROSS 96233
+ ROADS + 62513
Answer
1. Initial guess G =1because the sum of twodigit can generate at most a
carry 1.
2. IfG = 1then B should be either 8or 9.G +B gives a two digit number this
also considers the carry digit.
3. Let us consider two equation
If no carry E +L= S ...(2.19.1)
If carry E+L=S+ 10 ..(2.19.2)
E =S-L+ 10
4. Now, S+L= E ...2.19.3)
Put value of Ein eq. (2.19.3)
S+L=S-L+ 10
2L = 10
L=5
6.
Now, we can try all the combination ofS and E whose difference will be
2-16 A (CSIT-Sem-7)
Problem Solving Methods
(5, 0), (7, 2), (8, 3), (6, 1), (9, 4)
S, cannot be 5 because L =5. E cannot be 1
because G= 1,
6 Now B + B=A + carry, possible value of Bwill be 5, 6, 7, 8,
be 5, because 5 is assigned to L. 9, B cannot
Let (S, E) = (7, 2) and B = 6.
B + B= 12 ’A= 2 which
contradicts with E discard (7, 2).
Let (S, E) = (8, 3) and B=7.
B+ B = 14 ’ A=4, B =7, S = 8, E =3, G= 1
BASE 7483
+ BASE +7455
GAMES 14938
Que 2.21. Solve the following CSP problem of erypt
Problenm:
arithmetic.
SEND
+ MORE
MONEY 10652
Que 2.22. Explain constraint propagation. What is constraint
propagation with arc consistency ?
Answer
Constraint propagation :
1 Acombined approach of heuristic plus forward checking gives more
reliable, accurate and efficient results than a singular approach.
2. The forward checking propagates information from designed to
unassigned variable but cannot avoid or detect all failure.
3. Constraint propagation repeatedly enforces constraints locally.
4 The sides of arc consistency provide a fast method of constraint
propagation that is substantially stronger than forward checking. Here
"arc" refers to a directed arc in the constraint graph.
Constraint propagation using arc consistency :
1. It is fast method of constraint propagation.
2. X’Yis consistent if (for every value of Xthere is source allowed value
Y. For example |V, > V, is consistent iff V, =Red, V, =Bluel (ie., for
every value ofx in X there is some allowed valuey in ). This is directed
property example -(V,= V
V, = V, is consistent if
V, = Red and V, =Blue
3. As directed arcs between variables represent the domains of specified
variables, they are consistent with each other.
4. Constraint propagation can be applied as preprocessing or propagation
step:
i Before search-preprocessing.
After search-propagation.
5. The procedure for maintaining arc consistency can be applied repeatedly.
PART-5
Backtracking Search.
2-18 A (CSIT-Sem-7) Problem Solving Methods
Questions-Answers
AKTU2015-16, Marks 05
Answer
1. The backtracking is an algorithmic method tosolve a problem with an
additional way.
2. It uses a recursive approach to explain the problems. The backtracking
is needed to find all possible combination to solve an optimization problem.
3 It is a systematic way of trying out different sequences of decisions until
we find one that works.
4 It is considered an important technique to solve constraint satisfaction
issues and puzzles. It is also considered a great technique for parsing
and also forms the basis of many logic programming languages.
PART-6
Game Playing, Optimal Decisions in Games.
Questions-Answers
Answer
1. Agame tree is a directed graph whose nodes are positions in agame and
whose edges are moves.
2. The complete game tree for a game is the game tree starting at the
initial position and containing all possible moves from each position.
3. Fig. 2.26.1 shows the first two levels in the game tree for tic-tac-toe.
Fig. 2.26.1. The first two levels of the game tree for tic-tac-toe.
4. The rotations and reflections of positions are equivalent, so the first
player has three choices of move : in the center, at the edge, or in the
corner.
5. The second player has two choices for the reply if the first player played
in the center, otherwise five choices. And so on.
6. The number of leaf nodes in the complete game tree is the number of
possible different ways the game can be played.
7. For example, the game tree for tic-tac-toe has 255,168 leaf nodes.
Purpose of minimax procedure :
1. For many complex games such as chess, search to termination is
impossible, i.e., a win or draw cannot be obtained.
2. Our goal in searching such a game tree might be to find a good first
move.
3. This good first move can be extracted by minimax procedure. This is the
purpose of minimax procedure in a game tree.
Que 2.27. Explain various strategies of game playing.
Answer
Game playing strategies :
1. Apure strategy provides acomplete definition of how a player will play
a game. In particular, it determines the move a player willmake for any
Artificial Intelligence 2-21 A (CSIT-Sem-7)
situation they could face. A player's strategy set, is the set of pure
strategies available to that player.
2. Amixed strategy is an assignment of aprobability to each pure strategy.
This allows for a player to randomly select a pure strategy. Since
probabilities are continuous, there are infinitely many mixed strategies
available to a player, even if their strategy set is finite.
Que 2.28. Explain Min-Max algorithm with example.
AKTU2016-17, Marks 05
Answer
Min-Max algorithm :
Step 1: Set FINAL_VALUE to be minimum as possible.
Step 2 : If limit of search has been reached, then FINAL_VALUE =
GOOD_VALUE of the current position.
Step 3: Else do.
Step 3.1 :Generate the successors of the position.
Step 3.2: Recursively call MIN-MAX again with the present position with
depth incremented by unity.
Step 4: Evaluate the GOOD_VALUE.
Step 5 : If GOOD_VALUE > FINAL_VALUE then FINAL_VALUE =
GOOD_VALUE.
For example :
1. Consider a game which has four final states and paths to reach final
state are from root to four leaves of a perfect binary tree as shown
Fig. 2.28.1.
Max
L R
Min
5 2
Fig. 2.28.1.
2. Assume that maximizing player get the first chance to move, i.e.,
maximizer at the root and opponent at next level.
3. As this is a backtracking based algorithm, it tries all possible moves,
then backtracks and makes a decision:
2-22 A (CSIT-Sem-7)
Problem Solving Methods
Maximizer goes LEFT: It is now the minimizers turn. The
minimizer now has a choice between 3 and 5. Being the minimizer
it will definitely choose the least among both, that is 3.
ii Maximizer goes RIGHT: It is now the minimizers turn. The
minimizer now has a choice between 2 and 9. He will choose 2 as
it is the least among the two values.
4. Being the maximizer he would choose the larger value that is 3. Hence
the optimal move for the maximizer is to go LEFT and the optimal
value is 3.
5. Fig. 2.28.2 shows two possible scores when maximizer makes left and
right moves.
Max
L R
Min 3 2
5 2 9
Fig. 2.28.2.
Que 2.29. What is adversarial search ? Write the steps for game
problem formulation. State and explain minimax algorithm with
tic-tac-toe game. AKTU2019-20, Marks 07
Answer
Adversarial search:
1. Adversarial search is a search, where we examine the problem which
arises when we try to plan ahead of the world and other agents are
planning against us.
The environment with more than one agent is termed as multi-agent
environment, in which each agent is an opponent of other agent and
playing against each other. Each agent needs to consider the action of
other agent and effect of that action on their performance.
3 So, searches in which two or more players with conflicting goals are
trying to explore the same search space for the solution are called
adversarial searches, often known as Games.
Steps for game problem formulation : Problem formulation involves
deciding what actions and states to consider for the given goal. Aproblem can
be defined formally by five components:
Artificial Intelligence 2-23 A (CSTT-Sem-7)
Questions-Answers
Long Answer Type and Medium Answer Type Questions
Answer
The branch and bound strategy is a system for solving a sequence of
subproblems each of which may have multiple possible solutions and where
the solution chosen for one sub-problem may affect the possible solutions
of later sub-problems.
Principle :
1 Suppose it is required to minimize an objective function.
2. Suppose that we have a method for getting a lower bound on the cost of
some
any solution among those in the set of solutions represented by
subset.
bound for this
3. If the best solution found so far costs less than the lower
subset:
Let S be some subset for solution. Let
L(S) = a lower bound on the cost of any solution belonging to S
C= cost of the best solution found so far
IfC<L(S), there is noneed to explore S because it does not contain any
better solution.
2-24 A (CSIT-Sem-7) Problem Solving Methods
Cost of any tour = X(Sum of the costs of the two tour edges adjacent to
veV
V)
Now,
The sum of the two tour edges adjacent to a given vertex v >sum of the two
edges of least cost adjacent to u.
Therefore,
Cost of any tour (Sum of the costs ofthe two least cost edges adjacent
to v).
Example of complete graph with five vertices :
4 3
4
7
6
5
Fig. 2.30.1.
C
(c, b), (c, a)
d (d, a), (d, c) 7
e (e, b), (e, d)
B
D
E (F) H) J) (K) L M N
-4 3 3 -1 1 - 4 1 3
AKTU2020-21, Marks 07
Answer
a. Alpha beta pruning: Refer Q. 2.31, Page 2-25A, Unit-2.
b. Numerical:
MAX
MIN
E (F) H I K M)
-2 -4 3 -3 -1 -4 1 -3
Let, . = nmax =- 0
B = min = 0
At A,A is maximizer, a =-o, B= o. We use Depth First Search and go to B.
At B, B is minimizer, initially a = - oo, B = 0. Value of B will change.
B= min (-2, 4, 3) =4.
At B, a =-0, ß =-4
Now at A, value of a will change
a= max (- 0, oo, 4) = - 4, B = + o
Initially at C, a = -4, B= 0
Now, C is minimizer, so value of ß willchange
B= min(-3, -1, 1) =-3, oa =-4
Now again at A value of a will change
a = max(-3, 4, -4) =-3, B= o
Initially at D, a = -4,B=o0
Now, D is minimizer, so value ofß will change
B= min (-4, 1, 3)=4, a=-4
Artificial Intelligence 2-27 A (CSTT-Sem-7)
Answer
Strategies for solving stochastic games :
1 For agent i, a deterministic strategy specifies a choice of action for i at
every stage of every possible history.
2 Amixed strategy is a probability distribution over deterministic strategies.
3. Several restricted classes of strategies :
i As in extensive-form games, a behavioral strategy is a mixed
strategy in which the mixing take place at each history
independently.
i. A Markov strategy is a behavioral strategy such that for each time
t, the distribution over actions depends only on the current state.
But the distribution may be different at time t than at timet.
ii. A stationary strategy is a Markov strategy in which the distribution
time t).
over actions depends only on the current state (not on the
3
UNIT
Knowledge
Representation
CONTENTS
Part-1 : First Order Predicate Logic .3-2A to 3-9A
3-1A (CSIT-Sem-7)
3-2 A (CSIT-Sem-7) Knowledge Representation
PART-1
First Order Predicate Logic.
Questions-Answers
Long Answer Type and Medium Answer Type Questions
Answer
1 First order logic is also known as Predicate logic or First order predicate
logic. First order logic is a powerful language that develops information
about the objects ina more easy way and can also expressthe relationship
between those objects.
2 First order logic is an extension to propositional logic.
3. First order logic is sufficiently expressive to represent the natural
language statements in a concise way.
4 First-order logic (like natural language) does not only assume that the
world contains facts like propositional logic but also assumes objects,
relations, function.
5 As a natural language, first-order logic also has two main parts syntax
and semantics.
Yx P(x)
P(c)
3. Existential instantiation :
i. Existential instantiation is also called as Existential elimination,
E:F: which is a valid inference rule in first order logie.
It can be applied only once to replace the existential sentence.
This rule states that one can infer Pc) from the formula given in
the form of 3xP(x) for a new constant symbol c.
iv. The restriction with this rule is that c used in the rule must be a
new term for which Pc) is true.
V. It can be represented as:
x P(x)
Pc)
4 Existential introduction :
i An existential introduction is also known as an existential
generalization, which is a valid inference rule in first order logic.
This rule states that if there is some element c in the universe of
discourse which has a property P, then we can infer that there
exists something in the universe which has the property P.
ii. It can be represented as :
Plc)
Bx P(x)
Answer
Properties of first order logic:
1. It has ability to represent facts about some or all of the objects in the
universe.
34A (CSIT-Sem-7) Knowledge Representation
2 It enables to represent law and rules extracted from real world.
3 It is useful language representation in mathematics, philosophy and AI
related fields.
4 It represents facts in more realistic manner rather than just the true or
false statement.
Answer
Predicate logic:
a. Food (Mutton)
b txy Eats (x, y) A¬ killed (y) ’ food (x)
C. Eats (sue, x) ’ eats (Rajiv, x)
d. Eats (peanuts, kin) ’ alive (kin)
e Vx y Marry (x, y)’loves (y, x)
Casual form :
a. Food (Mutton)
b. ¬ (Eats (x, y) a killed (y) v food (x)
C ¬ Eats (x, Sue) v Eats (x, Rajiv)
d. 1. Eats (Peanut, kin)
ii. Alive (kin)
e. Marry (John, Mary) ’ loves (Mary,John)
Que 3.6. Define a well-formed formula (WFF) and list some of the
Answer
1. Well formed formula - Propositional logic uses a symbolic language to
represent the logical structure, or form, of acompound proposition.
2. The symbolic language has rules of syntax, grammatical rules for putting
symbols together in the right way.
3. Any expression that obeys the syntactic rules of propositional logic is
called a well-formed formula or WFF.
Rules of inference :
1.
Modus Ponens : The Modus Ponens rule states that if P and
P’Qis true, then we can infer that Q will be true.
Example:
Statement-1:"IfIam sleepy then I go to bed". (P ’ )
Statement-2:"Iam sleepy". (P)
Conclusion: Igo to bed". (Q)
Hence, we can say that, ifP ’Qis true and P is true then Q will be true.
Proof bytruth table:
P P’Q
0
0 1
0
1 1
3-6A (CSTT-Sem-7) Knowledge Representation
2. Modus Tollens : The Modus Tollens rule state that ifP - Qis true and
Qis true, then P will also true.
Example:
Statement-1 :"IfI am sleepy then I go to bed". (P ’ Q)
Statement-2: "Ido not go to the bed". (- Q)
Statement-3 : Which infers that "I am not sleepy". (- P)
Proof by truth table :
P - P P’Q
0 0 1 1 1+
0 1 1 1
1 0 0
1 1 0 1 1
1 1 1
1 0 1
1 1 1
5. Addition: The Addition rule states that IfP is true, then P v Qwill be
true.
Example:
Statement-l:I have avanilla ice-cream. (P)
Statement-2 :I have Chocolate ice-cream. (Q)
Conclusion : I have vanilla or chocolate ice-cream. (PvQ)
Proof by truth-table:
P PvQ
0 0
1 1
1 1
1 1 1
1 1 1
7. Resolution: The resolution rule state that ifP vQand ¬PARis true,
then Q v R will also be true.
Proof by truth-table :
P -P R PyQPAR QvR
0 1 0 0 0
1 0 1 0 0 1
1 1 1 1
0 1 1 1 1
1 0 0 1 0 0
1 1
1 1 1 0 1
0 1 1 1 1
3-8A (CSIT-Sem-7) Knowledge Representation
Answer
The steps used to convert a given formula into its normal form are as follows :
Step 1: Eliminate implications and biconditionals. For this, use the laws :
(A ’ B) = ~A y B
(A >B) = (A’ B)A(B’ A)
= (-A v B) A(-B yA)
Step 2: Reduce the NOT symbol by the formula (-(-A) =Aand apply De
Morgan's theorem to bring negations before the atoms.
-(A v B)= ~Aa ~B
-(AA B) = -A v -B
Step 3: Use distributive laws to obtain the normal form.
An (B C) =(A AB) V (AaC)
Av (BA C) =(A v B) A(A y C)
Que 3.8. Prove that following sentence is valid:
"If prices fall then sell increases. If sell increases then John makes
the whole money. But John doesn't make the whole money.
Therefore, prices do not fall." AKTU 2017-18, Marks 10
Answer
1 If prices fall then sell increases.
The logical form of the sentence is : IfP then Q.
2. If sell increases then John makes the whole money.
The logical form of the sentence is : If Q then R.
3. We have to check the validity of the sentence.
John doesn't make the whole money. Therefore, Prices do not fall.
¬R’ ¬P
Hence, from (1) and (2) and by using Modus Ponens rule we get:
P’Q (Price falls ’ Sell increases)
Q’R (Sell increases -> John makes whole money)
P’R (Price falls ’ John makes whole money)
From transposition rule,
Artificial Intelligence 3-9 A (CSIT-Sem-7)
P’Rinfer R ’¬P
We conclude that John does not malke the whole money,
prices do not fall. therefore
Hence, the given argument is valid.
PART-2
Prolog Programming.
Questions-Answers
Long Answer Type and Medium Answer Type Questions
Answer
Clauses :
1 Clauses are the structural elements of a program. A Prolog programmer
develops a program by writing a collection of clauses in a text file.
2 The programmer then uses the consult command, specifying the name
of the text file, to load the clauses into the Prolog environment.
3. Following are two types of clauses :
a. Facts : Afact is an atom or structure followed by a full stop. Examples
of valid Prolog syntax for defining facts are : cold., male(amit)., and
father(amit, mohan).
b. Rules : A rule consists of a head and a body. The head and body are
separated by a:- and followed by full stop. If the body of aclause is true
then the head of the clause is true. Examples of valid Prolog syntax for
defining rules are: bigger(X,Y) :-X>Y. and parents(F,M,C):- father(F,C),
mother( M,C).
ii. Predicates:
1. Each predicate has a name, and zero or more arguments. The predicate
name is a Prolog atom.
2. Each argument is an arbitrary Prolog term.
3. A predicate with name Pred and N arguments is denoted by Pred/N,
which is called a predicate indicator. N is called the arity of the predicate.
4. Apredicate is defined by a collection of clauses.
5 Aclause is either a rule or a fact. The clauses that
constitute a predicate
denote logical alternatives: Ifany clause is true, then the whole predicate
is true.
iüi. Domains : The arguments to the predicates must belong to
known
Prolog domains. A domain can be a standard domain, or it can be one
you declare in the domains section.
Examples:
If you declare a predicate
section, like this:
my_predicate(symbol, integer) in the predicates
PREDICATES
my_predicate(symbol, integer)
you don't need todeclare its argument's domains in a
because symbol and integer are standard domains. Butdomains section,
if you declare a
predicate my_predicate(name, number) in the predicates section, like
this:
PREDICATES
my_predicate(name, number)
Artificial Intelligence 3-11 A
(CSIT-Sem-7)
you will need to declare suitable domains for
name and number.
Assuming you want these to be symbol and integer respectively, the
domain declaration looks like this:
DOMAINS
name = Symbol
number = integer
PREDICATES
my_predicate(namne, number)
PART-3
Unification.
Questions-Answers
Long Answer Type and Medium Answer Type Questions
Answer
1. In order to do resolution for expressions in the predicate logic, we use
unification algorithm to locate pairs of literals that cancel out.
2. We need to use the unifier produced by the unification algorithm to
generate the resolvent clause.
3-12 A (CSIT-Sem-7) Knowledge Representation
For example, we want to resolve following two clauses :
a. man (Marcus)
b. - Man (x) v mortal («)
3. The literal man (Marcus) can be unified with the literal man (*)with
the substitution Marcus / , telling us that for x = Marcus,
¬ man (Marcus) is false.
4 Now we cannot simply cancel out the two man literals as in case of
propositionallogic and generate logic wenow conclude only that mortal
(Marcus) must be true which we get by applying the result of the
unification process to the resolvent.
5 The resolution process can then proceed to discover whether mortal
(Marcus) leads to a contradiction with other available clauses.
Unification algorithm: Verify (U, )
1. If U and V are both variables or constants then
a. If U and V are identical, then return null.
b. If U is a variable then if U occurs in V, then return (FAIL) else
return (UIV)
C. If V is a variable then if V occurs in U, return (FAIL} else return
(U).
d. Return (FAIL).
2. If the initial predicate symbols in U and V are not identical, return
(FAIL).
3. IfUandV have a different number of arguments, then return (FAIL).
4. Set SUBSET to NULL.
5. For i -lto the number of arguments of U.
Call unify with the /th argument of U and the ith argument of V
putting the result in S.
b. IfS contains (FAIL), return (FAIL).
C.
IfS is not equal to NULL
i. Apply step 5 to be the remainder of both Uand V.
Set subset equal to APPENDS (S, SUBSET).
6. Return SUBSET.
PART-4
Questions-Answers
Long Answer Type and Medium Answer Type Questions
Answer
Forward chaining :
1. Forward chaining is a method of reasoning when using inference rules
in artificial intelligence.
2 Forward chaining starts with the available data and uses inference
rules to extract more data (from an end user) until an optimal goal is
reached.
3.
An inference engine using forward chaining searches the inference
rules until it finds one where the If clause is known to be true.
3-14 A (CSIT-Sem-7) Knowledge Representation
4. When found it can conclude, or infer, the Then clause, resulting in the
addition of new information to its dataset.
5. Inference engines will often cycle through this process until an optimal
goal is reached.
6 For example, suppose that the goal is to conclude the colour of my pet
Bruno given that he croaks and eats flies, and that the rule base contains
the following two rules :
a. IfX croaks and eats flies - Then X is a frog.
b. IfX is a frog - Then X is red.
Backwardchaining:
1 Backward chaining starts with a list of goals (or a hypothesis) and works
backwards to see if there is data available that will support any of these
goals.
2 An inference engine use backward chaining would search the inference
rules until it finds one which has a Then clause that matches a desired
goal.
3. If the If clause of that inference rule is not known to be true, then it is
added to the list of goals.
4 For example, suppose that the goal is to conclude the colour of my pet
Bruno given that he croaks and eats flies, and that the rulebase contains
the following two rules :
a. IfX croaks and eats flies - Then X is a frog.
b IfX is a frog - ThenXis red.
Que 3.15. Write down the properties of forward chaining and
backward chaining.
Answer
Properties of forward chaining:
1. It is a down-up approach, as it moves from
bottom to top.
2 It is a process of making a conclusion based on known facts or data, by
starting from the initial state and reaches the goal state.
3. Forward chaining approach is also called as data-driven as we reach to
the goal using available data.
4. Forward chaining approach is commonly used in the expert system,
such as business, and production rule systems.
Properties of backward chaining :
1. It is known as a top-down approach.
2 Backward chaining is based on
Modus Ponens inference rule.
3 In backward chaining, the goal is
prove the facts true.
broken into sub-goal or sub-goals to
Artificial Intelligence 3-15 A (CSIT-Sem-7)
Answer
PART-5
Resolution.
Questions-Answers
Answer
Resolution in predicate logic:
1. Convert all the statements of F to clause form.
2. Negate S and convert the result to clause form. Add it to the set of
clauses obtained in step 1.
3. Repeat until either a contradiction is found, no progress can be made or
a predetermined amount of effort has been expended:
Select two clauses, call these parent clauses.
Resolve them together. The resolvent will be disjunction of all literals
of both of parent clause with appropriate substitutions performed
and with the following exception : If there is one pair of literals T,
and -T, such that one of the parent clauses contains T, and the
other contains T, and if T, and T, are unifiable, then neither T, nor
T, should appear in the resolvent.
ii. Ifthe resolvent is the empty clause, then a contradiction has been
found. Ifit is not, then add it to the set of clauses available to the
procedure.
3-18 A (CSIT-Sem-7) Knowledge Representation
PART-6
Knowledge Representation.
Questions-Answers
Knowledge acquisition :
1. Knowledge acquisition is the process of acquiring knowledge from a
human expert for an expert system, which must be carefully organized
into IF-THEN rules or some other form of knowledge representation.
2. Knowledge acquisition is the process of absorbing and storing new
information in memory, the success of which is determined by how well
the information can later be retrieved from memory.
Artificial Intelligence 3-19 A
(CSTT-Sem-7)
Redesigns
Refinements
PART-7
Ontological Engineering, Categories and Objects.
Questions-Answers
Long Answer Type and Medium Answer Type Questions
PART-8
Events, Mental Events and Mental Objects.
Questions-Answers
Questions-Answers
Long Answer Type and Medium Answer Type Questions
Has a part
Bird Wings
is_a
Has colour
Parrot Green
Brother of
(Lakshmana
Fig. 3.26.1. Semantic network.
4. Semantic network provide direct indexing for objects, categories and
the links between them.
5. Semantic network can represent default values for categories.
B. Description logic :
1. These are the notations that are designed to describe definitions and
properties of categories.
2. Description logic system formalize information represented by the
semantic network.
3. The inference techniques used in description logic are:
3-24 A (CSIT-Sem-7) Knowledge Representation
logic.
Q.1. Explain inference rules in first order
Ans. Refer Q. 3.2.
(WFF) and list some of the
Q.2. Define a well-formed formula
rules of inference.
Ans. Refer Q. 3.6.
ofprolog
Q.3. Define prolog programming. What are the features
programming ?
Ans. Refer Q. 3.7.
reasoning under
Q.4. Explain unification algorithm used for
predicate logic with an example.
Ans. Refer Q. 3.10.
backward chaining of
Q. 5. Differentiate between forward and
inference with the help of an example.
Ans. Refer Q. 3.14.
role of resolution in
Q.6. What is resolution ? Discuss the
predicate logic.
Ans. Refer Q. 3.15.
Explain the concept of
Q.7. What is ontological engineering ?
categories and objects.
Ans. Refer Q. 3.21.
UNIT
Software Agents
CONTENTS
Part-1: Architecture for 4-2A to 4-6A
Intelligent Agents
Part-2 : Agent Communication 4-6A to 4-7A
Part-3 : Negotiation and Bargaining .4-7A to 4-8A
4-1 A (CSIT-Sem-7)
4-2 A (CSTT-Sem-7)
Software Agents
PART- 1
Architecture for Intelligent Agents.
Questions-Answers
Long Answer Type and Medium Answer Type
Questions
Que 4.1. What is an intelligent agent ?
Answer
1 An intelligent agent is an Al agent that is capable of
action in order to meet its design objectives, where flexible autonomous
of three aspects namely, flexibility comprises
i. Reactivity : Intelligent agents are able to perceive their
environment, and respond in a timely fashion to changes that occur
in it in order to satisfy their prior designed objectives.
ii. Pro-activeness : Intelligent agents are able to exhibit goal-directed
behavior by taking the initiative in order to satisfy their prior
designed objectives.
iii. Social ability:Intelligent agents are capable of interacting with
other agents in order to satisfy their prior design objectives.
2, All above 3properties are highly demarnding and are critical and complex
to implement.
3. This complexity arises from several factors like intelligent agent's
interaction with environment, its prior knowledge, its hardware
capabilities, ete.
Que 4.2. What are the categories of agents on the basis of
architecture ?
Answer
Categories of agents on the basis of architecture are as follows :
1. Logic based agents: These agents carries out decision making through
logical deductions.
2. Reactive agents : These agents carries out decision making through
procedure implementation in some form of direct mapping from situation
to action.
Artificial Intelligence 43A (CSTT-Sem-7)
3. Belief-desire-intention agents : These agents carries out decision
making that depends upon the manipulation of data structures which
are used to represent the agent's beliefs, agent's desires, and agent's
intentions.
4. Layered architectures : Here the decision making is done through
various software layers, each of which explicitly reasons about the
environment at different levels of abstraction as per the requirement of
problem under consideration.
Que 4.3. Explain logic based agent architecture with their
advantages and disadvantages.
Answer
Sensors
Percepts
AGENT
What is the
world like now Environment
Condition-action Action to be
(if then) rules done
Actions
Actuators
Fig. 4.3.1.
1. It is the traditional approach to buildingartificially intelligent system,
(knows as symbolic AI) suggest that intelligent
in a system by providing that system a behavior can be generated
symbolic representation of its
environment and its desired behavior, and syntactically
this representation. manipulating
2. In these systems,the symbolic
representations are logical formulae, and
the syntactic manipulation corresponds to logical deduction, or theorem
proving.
3. The idea of agents as theorem proven is
highly attractive.
4 The traditional approach for the
this specification would involve implementation of a system that satisfy
of progressively more concrete refining the specification through a series
completely done. stages, until finally an implementation is
44A (CSTT-Sem-7)
Software Agents
Logic based approach advantages :
1. In logic-based approaches to building agents, decision making is viewed
as deduction.
2. Logic-based approaches are good to work with and have aclean (logical)
semantic due to which they can be used over long period of time.
Logic based approach disadvantages :
1. The inbuilt computational complexity of theorem proving makes it
questionable whether agents as theorem provers can operate effectively
in time-constrained environments.
2 Decision making in such agents is predicated on the assumption of
calculative rationality.
3 The issues associated with representing and reasoning about complex,
dynamic, possibly physical environments are also essentially unsolved
that makes developing logic agent a tedious task.
Que 4.4. Explain reactive agent architecture with their
advantages and disadvantages.
Answer
1. The reactive agent approaches are sometime referred to as behavioral.
situated, and reactive.
2 It is referred to as behavioral because a common theme is that of
developing and combining individual behaviors.
3 It is referred to as situated because a common theme is that of agents
actually situated in some environment, rather than being disembodied
from it.
4. It is referred to as reactive because such systems are 100% understood
to be just reacting to an environment, without reasoning about it.
5. The reactive agent architecture is subsumption architecture, which is
comparatively the best-known reactive agent architecture
Reactive agent approach advantages :
1. The overall time complexity of the subsumption action function is not
worse than O(n²), where n is the larger of the number of behaviors or
number of percepts.
2. The major advantages of reactive approaches are simplicity, economy,
computational tractability, robustness against failure.
Reactive agent approach disadvantages :
1. In reactive agent, if the agents do not employ models of their
environment, then they must have sufficient information available in
their local environment for them to determine an acceptable action.
Artificial Intelligence 45A (CSIT-Sem-7)
Answer
Layered architecture :
Action
output
PART-2
Agent Communication.
Questions-Answers
Answer
Multiagent Systems and Agent's Communication :
1. While acting in real world, an agent may not be always in a singleton
mode.
Artificial Intelligence 4-7A (CSIT-Sem-7)
2. It has to deal with the situation wherein other agents and related factors
are affecting the agent's environment and in turn agent's behavior.
3. Such systems wherein multiple agent work together, communicate,
co-operate and deal with the situation are termed as multi-agent system.
4. Multi-agent system are essentially distributed systems which more
efficient in the sense that they can be optimized and are mostly easier to
understand and easier to develop, especially when the oroblem being
solved is itself distributed.
5. Distribution can lead to computational algorithms that might not have
been discovered with a centralized approach.
6. The data and information itself is distributed spanning at different
geographical locations and needs to be handled through multiple agents.
7. Data can come from various domains and multiple devices or components
are involved in data generation.
8 The system itself is too big and complex that needs to be separated in
multiple components so as to reduce its complexity and size that can be
handled easily.
Que 4.8. Write down the characteristics of multiagent system.
Answer
Characteristics of Multi-Agent Systems:
1 Each agent has just incomplete information and is restricted in its
capabilities.
2 The system control is distributed.
3. Data is decentralized.
4. Computation is asynchronous.
5. Multi-agent environments are typically open and have no centralized
design
6. Multi-agent environments have agents that are autonomous and
distributed, and may be self-interested or cooperative.
PART-3
Negotiation and Bargaining.
Questions-Answers
Long Answer Type and Medium Answer Type
Questions
4-8A (CSIT-Sem-7) Software Agents
Answer
1 In a multi-agent system negotiation is form of interaction that occurs
among agents with different goals.
2 Major challenge of negotiation and bargaining is to allocate scarce
resources among agents representing self-interested parties. The
resources can be bandwidth, commodities, money, processing power
etc. The resource becomes scarce as competing claims for it can't be
simultaneously satisfied.
3. Negotiation and bargaining is a process by which a joint decision is
reached by two or more agents, each trying to reach an individual goal
or objective.
4. The major features of negotiation and bargaining are :
i. The language used by the participating agents,
The protocol followed by the agents as they negotiate, and
i. The decision process that each agent uses to determine its positions,
concessions and criteria for agreement.
5. Any negotiation and bargaining mechanism should have the following
attributes:
i. Efficiency:The agents should not waste resources in coming to
an agreement.
ii. Stability : No agent should have an incentive to deviate from
agreed-upon strategies.
i. Simplicity : The negotiation mechanism should impose low
computational and bandwidth demands on the agents.
iv. Distribution:The mechanism should not require a central decision
maker.
v. Symmetry : The mechanism should not be biased against any
agent for arbitrary or inappropriate reasons.
PART-4
Argumentation Among Agents.
Questions-Answers
Long Answer Type and Medium Answer Type Questions
4-9A (CSTT-Sem-7)
Artifcial Intelligence
PART-5
Questions-Answers
2. When an agent joins a group, he joins in one or more roles, and acquires
the commitments of that role.
3 Social commitments are the commitments of an agent to another agent
that in turn define social dependence.
4. Cooperation is a form of such mutual dependence.
5. Socialexchange is a form of such reciprocal dependence.
CONTENTS
Part-1 : Al applications, .5-2A to 5-3A
Language Models
5-1 A (CS/IT-Sem-7)
5-2A (CSIT-Sem-7)
Applications
PART-1
Al applications, Language Models.
Questions-Answers
Long Answer Type and Medium Answer Type Questions
Answer
Various kind of knowledge can be captured through the use of a small
number of formal models or theories. Models and theories are all drawn
for the standard tool-kit of computer science,
mathematics and linguistics.
Artificial Intelligence 53A (CSIT-Sem-7)
Types of Models :
1. State machines :It is based on simplest formulation of state, transition
among states, input representation. Examples of state machines are
finite-state automata (Deterministic, Non deterministic), finite-state
transducers.
2. Rule systems :
i. Rule system can be define using regular grammars, context-free
grammars, feature augmented grammars.
State machines and formal rule systems are the main tols used
when dealing with knowledge of phonology, morphology and syntax.
3. Logic:
The logical representations have traditionally been used for
modeling semantics and pragmatics, although more recent work
has tended to focus on potentially more robust techniques drawn
from non-logical lexical semantics.
ii. First order logic / predicate calculus, lambda-calculus, feature
structures, semantic primitives are used for logical representation.
4. Probabilistic models:
These are crucial for capturing every kind of linguistic knowledge.
Each of the other models can be augmented with probabilities.
The state machine augmented with probabilities can become :
Weighted automaton, or Markov model.
b. Hidden Markov Models (HMMs).
5. Vector-space models are based on linear algebra and information
retrieval. It has good use in Word meanings.
PART-2
Questions-Answers
Answer
Information retrieval is concept associated with subjects like database
management system, artificial intelligence, because, in both stream we have
54A(CSIT-Sem-7) Applications
huge collection of data (DBMS with database or datawarehouses, AI with
knowledge base).
Definition:
Information retrieval is process of sendingdocuments/ text / data in which
the user is interested.
For example, information retrieval is widely used in popular search engine
like Google, Yahoo, Bing etc.
Characteristics of Information Retrieval :
1. A huge dataldocument collection : In many systems, we need to
decide boundaries such as document, paragraph or a page or a multi
page text, from huge data collection.
2. Aformat of query with standard query language : It is imposed by
user but if standard language is used then user need to follow syntax.
3. The generated result model : Appropriate text/data/document are
generated by the information retrieval system with specific query.
4. Displaying results model:The display of the result can be very
simple as that of title of document or highly graphical and complex
representation (i.e., 3-D information).
Que 5.4. What is information extraction ?
Answer
Information extraction :
1. Information extraction is the technique of creating database entries.
2. The database entries are done by overlooking the text andits occurrences
for specific class of object or event and for relationship among those
objects and events.
3. The field such as street, city, state, pin-code are extracted from instances
of addresses from web pages.
4. The instance of weather report with temperature, wind, speed, humidity
are extracted.
5. Information retrieval systems and full text parser can be mapped by mid
system called information extraction.
Que 5.5. Discuss the component of a typical relational based
extraction-FASTUS.
Answer
The component of typicalsystem FASTUS are:
1. Tokenization:
i. It is first stage of FASTUs which converts the stream of
into tokens (words, numbers and punctuation).
character
Artificial Intelligence 5-5 A (CSIT-Senm-7)
PART-3
Questions-Answers
Lexical analysis
Syntactic analysis
Semantic analysis
Disclosure integration
Pragmaticanalysis
PART-4
Machine Translation.
Questions-Answers
Long Answer Type and Medium Answer Type Questions
Answer
Interlingua
Analysis Generation
Source Target
Fig. 3.12.1.
Answer
Process of machine translation with the help of the following flowchart:
Source text
De-formatting
Pre-editing
Morphological, syntactic,
semantic and contextual
analysis
Internal representation
of source language
Contextual, semantic
and syntactic generation
Re-formatting
Post editing
Target text
PART-5
Speech Recognition.
Questions-Answers
Long Answer Type and Medium Answer Type Questions
Artificial Intelligence 5-13 A (CSIT-Sem-7)
Answer
1. Speech recognition is the process that enables a computer to recognize
and respond to spoken words and then convert them in a format that
the machine understands. The machine may then convert it into
another form of data depending on the end-goal.
2. Speech recognition is widely used in digital assistants, smart speakers,
smart homes, and automation for a variety of services, products, and
solutions.
Que 5.15. What are the most commonly used algorithms for
speech recognition ?
Answer
1. Natural language processing (NLP) :
NLP is not a specific algorithm used in speech recognition; it is the
area of artificial intelligence which focuses on the interaction
between humans and machines through speech and text.
ii. Many mobile devices incorporate speech recognition into their
systems to conduct voice search (example : Siri) or provide more
accessibility around texting.
2. Hidden Markov models (HMM) :
i. Hidden Markov Models build on the Markov chain model, which
stipulates that the probability of a given state hinges on the current
state, not its prior states.
ii While a Markov chain model is useful for observable events, such
as text inputs, hidden Markov models allow us to incorporate
hidden events, such as part-of-speech tags, into a probabilistic
model.
iü. They are utilized as sequence models within speech recognition,
assigning labels to each unit i.e., words, syllables, sentences, etc.,
in the sequence.
iv. These labels create a mapping with the provided input, allowing it
to determine the most appropriate label sequence.
3. Neural networks :
i. For deep learning algorithms, neural networks process training
data by mimicking the interconnectivity of the human brain
through layers of nodes.
ii Each node is made up of inputs, weights, a bias (or threshold) and
an output.
5-14 A (CSIT-Sem-7) Applications
iü. Ifthat output value exceeds a given threshold, it fires" or activates
the node, passing data to the next layer in the network.
iv. Neural networks learn the mapping function through supervised
learning,adjusting based on the loss function through the process
of gradient descent.
V. While neural networks tend tobe more accurate and can accept
more data, this comes at a performance efficiency cost as they
tend to be slower to train compared to traditional language models.
Que 5.16. What are the applications of speechrecognition ?
Answer
1 Automotive : Speech recognizer improves driver safety by enabling
voice-activated navigation systems and search capabilities in car radios.
2. Technology : Virtual assistants are increasingly becoming integrated
within our daily lives, particularly on our mobile devices. We use voice
commands to access them through our smartphones, such as through
Google Assistant or Apple's Siri, for tasks, such as voice search, or
through our speakers, via Amazon's Alexa or Microsoft's Cortana, to
play music.
3. Healthcare : Doctors and nurses leverage dictation applications to
capture and log patient diagnoses and treatment notes.
4 Sales : It can help a call center transcribe thousands of phone calls
between customers and agents to identify common call patterns and
issues. Cognitive bots can also talk to people via awebpage, answering
common queries and solving basic requests without needing to wait
for a contact center agent to be available. In both instances speech
recognition systems help reduce time to resolution for consumer issues.
5. Security :As technology integrates into our daily lives, security
protocols are an increasing priority. Voice-based authentication adds a
viable level of security.
Answer
Techniques for Speech Recognition are:
1. Speech Analysis Technique:
i. Speaker identity can be shown by a different type of information
that is present in speech data.
ii. This incorporates speaker-specific information due to the vocal
tract, excitation source, and behavior feature.
i. This stage deals with a suitable frame size for
segmenting speech
signals for further analysis and extracting.
Artificial Intelligence 5-15 A (CSIT-Sem-7)
2 Feature Extraction Technique :
1. The speech feature extraction technique is the process of
placing
words in groups or classes and decreasing the dimensionality of
the input vector while maintaining the discriminating power of
the signal.
From the basic formation of speaker identification and verification
system, we know that the number of training and test vector
needed for the classification problem grows with the dimension of
the given input; therefore, we need feature extraction of the
speech signal.
3. Modeling :
i The modeling technique aims to create speaker models using a
speaker-specific feature vector. Further, Speaker recognition and
Speaker identification are the parts of Modeling.
ii. The speaker identification technique identifies by itself, who is
speaking based on individual information integrated into a speech
signal.
PART-6
Robot.
Questions-Answers
Answer
Robots are constructed with the following:
1 Power Supply : The robots are powered by
batteries, solar power,
hydraulic, or pneumatic power sources.
2. Actuators: They convert energy into movement.
3. Electric motors (ACIDC):They are required for rotational movement.
4 Pneumatic Air Muscles: They contract almost 40% when air is sucked
in them.
5. Muscle Wires: They contract by 5% when electric current is passed
through them.
6. Piezo Motors and Ultrasonic Motors: Best for industrial robots.
7. Sensors :They provide knowledge of real time information on the task
environment. Robots are equipped with vision sensors to compute the
depth in the environment. A tactile sensor imitates the mechanical
properties of touch receptors of human fingertips.
Que 5.22. Describe robot locomotion. What are types of
locomotion ?
Answer
Locomotion is the mechanism that makes a robot capable of moving in its
environment. There are various types of locomotion:
5-18A(CSIT-Sem-7) Applications
1. Legged Locomotion :
This type of locomotionconsumes 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.
2 Wheeled Locomotion :
1. It requires fewer numbers 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.
a. Standard wheel: Rotates around the wheel axle and around
the contact.
b. Castor wheel: Rotates around the wheel axle and the offset
steering joint.
C. Swedish 45° and Swedish 90° wheels : Omni-wheel, rotates
around the contact point, around the wheel axle, and around
the rollers.
d.Ball or spherical wheel: Omnidirectional wheel, technically
difficult to implement.
3. Slip/Skid Locomotion :
i. 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.
PART-7
Hardware, Perception, Planning, Moving.
Questions-Answers
Answer
A mobile robot is nothing but combination of various hardware and
computational components. In terms of hardware components, it is a
collection of subsystems like.
1. Motion : How the robot changes his
its environment. positionw.r.t an object over time in
2. Sensing: How the robot measures properties of itself as well as detects
its environment.
3. Reasoning: How the robot maps these measurements into actions.
4. Communication : How the robot communicates information with an
outside operator.
Que 5.24. Explain the categories of motion of mobile robot.
Answer
Following are the four categories of motion of mobile robot :
1. Terrestrial :
Terrestrial robot:s move on the ground.
ii. They are structured to take benefit of a solid support surface as
wellas gravity.
ii. Wheeled robots are most common type of robots in this category.
They can walk, climb, roll, use tracks, or slither to move. Terrestrial
robots are also known as ground-contact robots.
2. Airborne:
Robotic helicopters, fixed-wing aircraft, robotically controlled
parachutes,and dirigibles have been developed.
. Airborne robot vehicles often mimic existing aircraft or birds.
ii. Flying robots share many issues with aquatic robots.
3. Aquatic :
i This type of robots operates in water, either at the surface or
underwater.
Such types of aquatic vehicles are not only used in water jets but
also in propellers to provide locomotion.
iii. Potentially important application domain since not only is most of
Earth's surface covered with water; but much of the ocean is not
readily accessible to humans.
4. Space:
i There are two main classes of robot those that move by climbing
(over a larger vehicle) as well as those that are independently
propelled (known as free flyers).
5-20 A (CSTT-Sem-7) Applications
Q.6. in
What is the role of NLP in AI?llustrate the various phases
NLP
Ans. Refer Q. 5.9.
Q.7. What are the most commonly used algorithms for speech
recognition ?
Ans. Refer Q. 5.15.