Ai Model Question Paper-3
Ai Model Question Paper-3
1. Answer any four questions. Each questions carries two marks. (4x2=8)
Deepak . M
Assistant professor
Baldwin Methodist college
Inference system generates new facts so that an agent can update the KB. An inference system
mainly in two rules which are given as:
• Forward chaining
• Backward chaining
4. Define Nonmonotonic logics.
A reasoning system is monotonic if the truthfulness of a conclusion does not change when new
information is added to the system the set of theorem can only monotonically grows when new
axioms are added. In contrast, in a system doing non-monotonic reasoning the set of
conclusions may either grow or shrink when new information is obtained.
Lemmatization is quite similar to the Stamming. It is used to group different inflected forms of
the word, called Lemma. The main difference between Stemming and lemmatization is that it
produces the root word, which has a meaning.
Deep learning is a subset of machine learning where artificial neural networks, inspired by the
human brain's structure, are trained to learn and make decisions from vast datasets, enabling
complex tasks.
Section-B
II. Answer any four questions. Each questions carries five marks. (4x5=20)
Deepak . M
Assistant professor
Baldwin Methodist college
Perceiving its environment through sensors [Sensor is a device which detects the change in the
environment and sends the information to other electronic devices. An agent observes its
environment through sensors.]
Effectors: Effectors are the devices which affect the environment. Effectors can be legs. wheels,
arms, fingers, wings, fins, and display screen.
The term percept refers to the agent's perceptual inputs at any given instant. An agent's
percept sequence is the complete history of everything the agent has ever perceived.
Mathematically speaking, we say that an agent's behaviour is described by the agent function
that maps any given percept sequence to an action f[P-->A]. Internally, the agent function for
an artificial agent will be implemented by an agent program.
To illustrate these ideas, we use a very simple example-the vacuum cleaner world shown in
Figure.
Deepak . M
Assistant professor
Baldwin Methodist college
Let's suppose that the world has just two rooms. The robot can be in either room and there can
be dirt in zero, one, or two rooms.
Goal formulation: intuitively, we want all the dirt cleaned up. Formally, the goal is { state 7,
state 8).
Problem formulation (Actions):Left, Right, Suck, NoOp
State Space Graph:
Agent function
function REFLEX-VACCUM-AGENT (location, status)
{
If status Dirty then return Suck
else if location A then return Right
Deepak . M
Assistant professor
Baldwin Methodist college
The above example is a very simple agent function with the following: if the current square is
dirty, then suck, otherwise, move to the other square. A partial tabulation of this agent function
is shown below.
Percentage Action
[A, Clean] Right
[A, Dirty] Suck
[B, Clean] Left
[B, Dirty] Suck
[A, Clean],[A, Clean] Right
[A, Clean], [A, Dirty] Suck
. :
[A, Clean], [A, Clean], Right
[A,Clean]
[A. Clean], [A, Clean], [A, Suck
Dirty]
: .
Architecture:
Deepak . M
Assistant professor
Baldwin Methodist college
• RULE BASE: It contains the set of rules and the IF-THEN conditions provided by the
experts to govern the decision-making system, on the basis of linguistic information.
Recent developments in fuzzy theory offer several effective methods for the design and
tuning of fuzzy controllersMost of these developments reduce the number of fuzzy
rules.
• FUZZIFICATION: It is used to convert inputs i.e. crisp numbers into fuzzy sets. Crisp
inputs are basically the exact inputs measured by sensors and passed into the control
system for processing, such as temperature, pressure, rpm's, etc.
• INFERENCE ENGINE: It determines the matching degree of the current fuzzy input with
respect to each rule and decides which rules are to be fired according to the input field.
Next, the fired rules are combined to form the control actions.
• DEFUZZIFICATION: It is used to convert the fuzzy sets obtained by the inference engine
into a crisp value. There are several defuzzification methods available and the best-
suited one used with a specific expert system to reduce the error.
1. This system can work with any type of inputs whether it is imprecise, distorted or
noisy input information.
2. The construction of Fuzzy Logic Systems is easy and understandable.
3. Fuzzy logic comes with mathematical concepts of set theory and the reasoning of that
is quite simple.
4. It provides a very efficient solution to complex problems in all fields of life as it
resembles human reasoning and decision-making.
5. The algorithms can be described with little data, so little memory is required.
Deepak . M
Assistant professor
Baldwin Methodist college
1. Many researchers proposed different ways to solve a given problem through fuzzy
logic which leads to ambiguity. There is no systematic approach to solve a given
problem through fuzzy logic.
2. Proof of its characteristics is difficult or impossible in most cases because every time
we do not get a mathematical description of our approach.
3. As fuzzy logic works on precise as well as imprecise data so most of the time accuracy
is compromised.
8-queens problem: The aim of this problem is to place eight queens on a chessboard
in an order where no queen may attack another. A queen can attack other queens
either diagonaly or in same row and column. From the following figure, we can
understand the problem as well as its correct solution.
It is noticed from the above figure that each queen is set into the chessboard in a
position where no other queen is placed diagonally, in same row or column. Therefore,
it is one right approach to the 8-queens problem.
Deepak . M
Assistant professor
Baldwin Methodist college
• Actions: Add a queen to any empty box.
Transition model: Returns the chessboard with the queen added in a box.
Goal test: Checks whether 8-queens are placed on the chessboard without any
attack.
• Path cost: There is no need for path cost because only final states are counted.
In this formulation, there is approximately 1.8 x 1014 possible sequence to
investigate.
2. Complete-state formulation: It starts with all the 8-queens on the chessboard and
moves them around, saving from the attacks.
Following steps are involved in this formulation
• States: Arrangement of all the 8 queens one per column with no queen attacking
the other queen.
• Actions: Move the queen at the location where it is safe from the attacks.
This formulation is better than the incremental formulation as it reduces the state
space from 1.8 x 1014 to 2057, and it is easy to find the solutions.
Deepak . M
Assistant professor
Baldwin Methodist college
Predicate and functions FOL accommodates Propositional logic does not
predicates (relations) and have predicates or functions;
functions to model complex it deals with atomic
properties and relationship propositions only.
among entities.
Expressive power FOL is more expressive due Propositional logic less
to its ability to represent expressive and is limited to
intricate relationships, representing simple
quantified statements, and propositions and truth
complex structures. values.
Deductive reasoning FOL support deductive Propositional logic allows for
reasoning about objects, deduction but has simpler
properties, and relations. It inference methods like
offers more sophisticated modus ponens.
inference methods like
resolution.
Application FOL is widely used in Al, Propositional logic finds
robotics, databases, natural application in basis logic
language processing, and puzzles, automated
knowledge representation reasoning, and fundamental
due to its ability to model knowledge representation.
complex scenarios and
relationships.
Deepak . M
Assistant professor
Baldwin Methodist college
• Actuators: Actuators are the devices that are responsible for moving and controlling a
system or machine. It helps to achieve physical movements by converting energy like
electrical, hydraulic and air, etc. Actuators can create linear as well as rotary motion.
• Power Supply: It is an electrical device that supplies electrical power to an electrical load.
Theprimary function of the power supply is to convert electrical current to power the load.
• Electric Motors: These are the devices that convert electrical energy into mechanical
energy and are required for the rotational motion of the machines.
• Pneumatic Air Muscles: Air Muscles are soft pneumatic devices that are ideally best fitted
for robotics. They can contract and extend and operate by pressurized air filling a
pneumatic bladder. Whenever air is introduced, it can contract up to 40%.
• Muscles wire: These are made up of nickel-titanium alloy called Nitinol and are very thin
inshape. It can also extend and contract when a specific amount of heat and electric current
is supplied into it. Also, it can be formed and bent into different shapes when it is in its
martensitic form. They can contract by 5% when electrical current passes through them.
• Piezo Motors and Ultrasonic Motors: Piezoelectric motors or Piezo motors are the electrical
devices that receive an electric signal and apply a directional force to an opposing ceramic
plate. It helps a robot to move in the desired direction. These are the best suited electrical
motors for industrial robots.
• Sensor: They provide the ability like see, hear, touch and movement like humans. Sensors
are the devices or machines which help to detect the events or changes in the environment
and send data to the computer processor. These devices are usually equipped with other
electronic devices. Similar to human organs, the electrical sensor also plays a crucial role in
Artificial Intelligence & robotics. Al algorithms control robots by sensing the environment,
and it provides real-time information to computer processors.
Deepak . M
Assistant professor
Baldwin Methodist college
12. With an example, Explain Lexical or Morphological Analysis.
Lexical or Morphological Analysis is the initial step in NLP. It entails recognizing and analysing
word structures. The collection of words and phrases in a language is referred to as the lexicon.
Lexical analysis is the process of breaking down a text file into paragraphs, phrases, and words.
The source code is scanned as a stream of characters and converted into intelligible lexemes.
It searches for morphemes, which are the smallest units of a word. The lexical analysis identifies
the relationship between these morphemes and transforms the word into its root form. The
word's probable parts of speech (POS) are also assigned by a lexical analyzer.
Example:
• Lexicon
• Morphotactic
• Orthographic Rules
Deepak . M
Assistant professor
Baldwin Methodist college
Some words has their own meaning for eg:
Camera Board Pen
Some words are there by which when divided into different words, those new words have their
own meaning for ex:
Showcase cocktail
Ing
Playing killing
Thus, the detailed study of making of word is called as Morphological Analysis
Section-C
Deepak . M
Assistant professor
Baldwin Methodist college
III. Answer any four questions. Each questions carries eight marks. (4x8=32)
13. Explain the working of Alpha-Beta pruning tree.
Working of Alpha Beta Pruning
Let us consider a two-player search tree to understand further how Alpha-beta
pruning in artificial intelligence works
Step 1:
The Max player will start by traveling from node A to node B, where a and B and
delivering these alpha and beta values to node R, where and Node B transmitting
the identical value to its offspring D.
Step2:As Max's turn at Node D approaches, the value of a will be decided. When
the value of a is compared to 2, then 3, the value at node D is max (2, 3) = 3.
Hence, the node value is also 3.
Step3:The algorithm returns to node B, where the value of ẞ will change since this
is a turn of Min. Now Boowill be compared to the value of the available
subsequent nodes, ie, min (00, 3) = 3, resulting in node B now a = 0, and B = 3. In
Deepak . M
Assistant professor
Baldwin Methodist college
the next phase, the algorithm will visit the next successor of Node B, Node E, and
pass the values of a=0 and B = 3.
Max will take over at node E and change alpha's value. The current existing value
of alpha will be compared to 5, resulting in max (-00, 5) = 5, and at node E, where
a>=ẞ, the right successor of E will be pruned, and the algorithm will not traverse
it, resulting in the value at node E being 5.
Step 5: We now traverse the tree backward, from node B to node A. At node A,
alpha will be converted to the greatest feasible value of 3, as max (-00, 3)= 3, and
ẞ = +00. These two values will now be passed on to Node C, A's right-hand
successor. At node C, the values and ẞ=+00 and a =3 will be passed on to node F,
and node F will get the identical values.
Step 6:
At node F, the value of a is compared with the left child 0, and max(3,0)= 3. It is
the compared with the right child, which is 1, and max(3,1)= 3.
Deepak . M
Assistant professor
Baldwin Methodist college
Step7:Node F sends the node value 1 to node C. The value of Beta is adjusted at C,
a = 3 and B+00, and it is compared to 1, resulting in min (0, 1) = 1. Now, if a = 3
and B = 1, the condition a>=ẞ is met, the algorithm will prune the next child of C,
which is G, rather than calculating the entire sub-tree G.
Step8;C now returns the value of 1 to A, with max (3, 1) = 3 being the optimum
result for A. The final game tree is shown here, with nodes that have been
calculated and nodes that have never been computed. As a result, in this case, the
ideal value for the maximizer is 3.
Deepak . M
Assistant professor
Baldwin Methodist college
Biological neural network Artificial neural network
Dendrities Inputs
Cell nucleus Nodes
Cell body Weight
Axon Output
Deepak . M
Assistant professor
Baldwin Methodist college
could be made entirely automatic and to see that a machine so programmed
would learn from its experience.
Explanation:
An artificial neuron can be thought of as a simple or multiple linear regression
model with an activation function at the end. A neuron from layer will take the
output of all the neurons from the later i-1 as inputs calculate the weighted sum
and add bias to it. After this is sent to an activation function as we saw in the
previous
The first neuron from the first layer is connected to all the inputs from the
previous layer, Similarly, the second neuron from the first hidden layer will also
be connected to all the inputs from the previous layer and so on for all the
neurons in the first hidden layer. For neurons in the second hidden layer (outputs
of the previously hidden layer) are considered as inputs and each of these
Deepak . M
Assistant professor
Baldwin Methodist college
neurons are connected to previous neurons, likewise. This whole process is called
Forward propagation.
After this, there is an interesting thing that happens. Once we have predicted the
output it is then compared to the actual output. We then calculate the loss and
try to minimize it. But how can we minimize this loss? For this, there comes
another concept which is known as Back Propagation We will understand more
about this in another article. I will tell you how it works. First, the loss is calculated
then weights and biases are adjusted in such a way that they try to minimize the
loss. Weights and biases are updated with the help of another algorithm called
gradient descent. We will understand more about gradient descent in a later
section. We basically move in the direction opposite to the gradient. This concept
is derived from the Taylor series.
Types of Artificial Neural Networks
• Feed forward Neural Network: The feed forward neural network is one of
the most basic artificial neural networks. In this ANN, the data or the input
provided travels in a single direction. It enters into the ANN through the
input layer and exits through the output layer while hidden layers may or
may not exist. So the feedforward neural network has a front- propagated
wave only and usually does not have backpropagation.
Deepak . M
Assistant professor
Baldwin Methodist college
• Modular Neural Network: A Modular Neural Network contains a collection
of different neuralnetworks that work independently towards obtaining
the output with no interaction between them. Each of the different neural
networks performs a different sub-task by obtaining unique inputs
compared to other networks. The advantage of this modular neural
network is that it breaks down a large and complex computational process
into smaller components, thus decreasing its complexity while still
obtaining the required output.
• Radial basis function Neural Network: Radial basis functions are those
functions that consider the distance of a point concerning the centre. RBF
functions have two layers. In the first layer, the input is mapped into all the
Radial basis functions in the hidden layer and then the output layer
computes the output in the next step. Radial basis function nets are
normally used to model the data that represents any underlying trend or
function.
• Recurrent Neural Network: The Recurrent Neural Network saves the output
of a layer and feeds this output back to the input to better predict the
outcome of the layer. The first layer
Advantages of artificial neural network:
1. Parallel processing capability
2. Storing data on the entire network
3. Capability to work with incomplete knowledge
4. Having a memory distribution
5. Having fault tolerance
Deepak . M
Assistant professor
Baldwin Methodist college
15.Explain different stages of planning in AI . differentiate between FSSP and
BSSP.
Planning in the context of artificial intelligence (AI) refers to the process of
determining a sequence of actions or decisions to achieve a specific goal or solve
a problem. It involves generating a plan, which is a structured representation of
the intended course of action, considering the initial state, desired goal, available
resources, and constraints:
1. Initial State:
• The initial state defines the starting conditions or the current state of the
world or system.
• It includes information about the environment, objects, their properties,
and their relationships.
• The initial state serves as the foundation for the planning process,
determining the context from which the plan will be developed.
2. Goal:
The goal specifies the desired state or the outcome that the planning system aims
to achieve.
• It represents the condition or set of conditions that the plan should satisfy
or accomplish
• The goal provides the direction and purpose for the planning process,
guiding the selection of actions and decisions.
3. Actions:
• Actions represent the executable steps or operations that can be taken to
modify the state of the system.
• Each action typically has preconditions that must be satisfied for the action
to be applicable or executable.
• Actions also have effects, which describe the changes they induce on the
state of the system once executed.
Deepak . M
Assistant professor
Baldwin Methodist college
The set of available actions and their properties define the action space or the
range of possible operations in the planning process.
4. Transition Model:
• The transition model defines the dynamics of the system, specifying how
the state changes when an action is applied.
• It describes the relationship between the current state, the selected
action, and the resulting new state.
• The transition model is used to simulate the consequences of actions and
predict the resulting state in the planning process.
5. Search Algorithm:
• The search algorithm determines the strategy for exploring the space of
possible plans or sequences of actions.
• It systematically explores the search space to find a plan that satisfies the
goal while considering constraints and optimizing certain criteria (e.g., plan
length, cost).
• Common search algorithms used in planning include depth-first search,
breadth-first search, A search, and heuristic search.
6. Plan Representation:
• A plan is the output of the planning system and represents the sequence of
actions to be executed.
• Plans can be represented in various formats, such as action sequences,
decision trees, or graphs.
• The plan representation should be structured, unambiguous, and
executable to guide the execution phase.
7.Plan Execution and Monitoring:
• Once a plan is generated, it needs to be executed in the real or simulated
environment
• During execution, the actual state of the system is monitored and
compared to the expected states described in the plan.
Deepak . M
Assistant professor
Baldwin Methodist college
• Deviations or unexpected events may require plan adaptation or replanning
to handle dynamic environments.
Planning systems find applications in diverse domains, including robotics, logistics,
scheduling resource allocation, and autonomous systems. They enable Al systems
to autonomously reason about actions, make decisions, and generate effective
plans to achieve desired goals in complex and uncertain environments.
Types of planning:
1.Forward states space planning
2. Backward states space planning
Deepak . M
Assistant professor
Baldwin Methodist college
16. With any one case study, explain expert system in detail.
Case-2: Internet-based Expert System
Computer-assisted advisement programs This case describes an Internet-based
expert system found at www.MyMajors.com, which provides advice to high
school students or college freshmen who are seeking assistance in selecting a
potential major.
• The Expert System:
My Majors conducts a 15-20 min interview with the student in a manner that
emulates the process some academic advisors would use in working with a
student to identify an appropriate major. The key difference, in this respect, from
other, more psychological, aptitude tests is that the system begins by focusing on
the students' experiences with high school courses (what they took or did not
take, what they did well in or did not do well in, and what they enjoyed
• Knowledge Acquisition:
To acquire knowledge the author worked closely with university coordinators of
academic advisement who counselled incoming and enrolled undeclared majors.
These individuals have training in counselling, have on-the-job experience, and
have been exposed to the experiences of advisors and other counsellors. The
author interviewed many advisors in colleges anddepartments who have
expertise regarding specific majors and in relation to who succeeds and fails in
these curriculums.
• Evaluating the Expert System:
There are two primary measures of effectiveness that can be used to assess
expert systems: verification and validation. Verification of an expert system is
conducted by determining whether the rules being used by the experts are
consistent with the software's implementationof those rules. Verification is
difficult since few firm rules exist in this form of counselling.
Potential Limitations:
Deepak . M
Assistant professor
Baldwin Methodist college
Students using the system are advised to avoid using the expert system as their
sole source of advice. An important decision pertaining to a student's future
should involve parents and school personnel. Even though assistance from others
is valuable, many of the potential users of the system are without any advising
services.
Conclusions
- The process of advising students is an uncertain one. Despite this uncertainty,
students must select majors. A system such as My Majors can effectively
recommend majors for a student at a level close to that of counsellors given the
same exposure to the student's background. Since an advisor may still be needed
to provide follow-up counselling, the expert system offers an effective means of
collecting base information from the student and of giving then options to
consider before meeting...
17. With an example Explain left most and right most derivation .Construct
parse tree.
Types of Derivation: The two types of derivations, which can be used to decide
which non- terminal to be replaced with production rule.
• Left-most Derivation: In the left-most derivation, the sentential form of an
input is scanned and replaced from the left to the right. The sentential form in
this case is called the left-sentential form.
Example : Let any set of product rules in CFG be
XX+X | X*X [X] a over an alphabet {a}.
The leftmost derivation for the string "a+a*a" may be -
X->X+X->a+X->a+X*X→a+a*X → a+a*a
Deepak . M
Assistant professor
Baldwin Methodist college
• Right-most Derivation: In the right-most derivation, the sentential form of an
input is scanned and replaced from the right to the leftt. The sentential form in
this case is called the right-sentential form.
Example : Let any set of production rules in a CFG be
XX+XX*X [X a over an alphabet (a).
The rightmost derivation for the string "a+a*a" may be -
X->X*X->X*a->X+*+a*a->a+a*a
Deepak . M
Assistant professor
Baldwin Methodist college
18.With a help of gam tree , explain tic-tac-toe.
"A game tree is a tree where nodes of the tree are the game states and Edges of
the tree are the moves by players. Game tree involves initial state, actions
function, and result Function."
Let's understand the working of the elements with the help of a game tree
designed for tic-tac-toe. Here, the node represents the game state and edges
represent the moves taken by the players.
Deepak . M
Assistant professor
Baldwin Methodist college
There are two players MAX and MIN.
Players have an alternate turn and start with MAX.
MAX maximizes the result of the game tree
MIN minimizes the result.
• INITIAL STATE (SO): The top node in the game-tree represents shows all the
possible choice to pick out one. the initial state in the tree and
• PLAYER (s): There are two players, MAX and MIN. MAX begins the game by
picking one best move and place X in the empty square box. • ACTIONS (s):
Both the players can make moves in the empty boxes chance by chance.
• RESULT (s, a): The moves made by MIN and MAX will decide the outcome of
the game.
• TERMINAL-TEST(s): When all the empty boxes will be filled, it will be the
terminating state of the game.
• UTILITY: At the end, we will get to know who wins: MAX or MIN, and
accordingly, the price will be given to them.
Deepak . M
Assistant professor
Baldwin Methodist college