AI scheme-2024
AI scheme-2024
PART A
1.a) Write a short note on history and evolution of Artificial intelligence. 5 Marks
[Mention the years of AI birth]
Maturation of Artificial Intelligence (1943-1952)
o Year 1943: The first work which is now recognized as AI was done by Warren McCulloch
and Walter pits in 1943. They proposed a model of artificial neurons.
o Year 1949: Donald Hebb demonstrated an updating rule for modifying the connection
strength between neurons. His rule is now called Hebbian learning.
o Year 1950: The Alan Turing who was an English mathematician and pioneered Machine
learning in 1950.
A boom of AI (1980-1987)
o Year 1980: After AI winter duration, AI came back with "Expert System". Expert systems
were programmed that emulate the decision-making ability of a human expert.
o In the Year 1980, the first national conference of the American Association of Artificial
Intelligence was held at Stanford University.
Goal-based agents
• o The knowledge of the current state environment is not always sufficient to decide for
an agent to what to do.
• o The agent needs to know its goal which describes desirable situations.
• o Goal-based agents expand the capabilities of the model-based agent by having the
"goal" information.
• o They choose an action, so that they can achieve the goal.
• o These agents may have to consider a long sequence of possible actions before
deciding whether the goal is achieved or not. Such considerations of different scenario are
called searching and planning, which makes an agent proactive.
OR
Autonomous Vehicles:
• AI agents are essential for self-driving cars, enabling them to navigate, detect obstacles,
make decisions, and interact with traffic systems. These agents use sensors and machine
learning algorithms to process data in real-time and ensure safe driving.
Virtual Assistants:
• Virtual assistants like Siri, Alexa, and Google Assistant use AI agents to understand
and respond to user queries, manage schedules, control smart home devices, and
provide recommendations. They leverage natural language processing (NLP) to
communicate effectively with users.
Robotics:
Game AI:
• In video games, AI agents control non-player characters (NPCs) to create realistic and
challenging gameplay experiences. These agents can adapt their behavior based on the
player's actions, enhancing the overall gaming experience by providing dynamic and
engaging interactions.
Financial Services:
• AI agents are used in financial services for tasks like fraud detection, algorithmic
trading, and customer service. They analyze vast amounts of data to detect suspicious
activities, execute trades at optimal times, and assist customers with their financial
inquiries and transactions through chatbots and automated systems.
d) Differentiate between human intelligence and artificial intelligence.
• Depth-first search isa recursive algorithm for traversing a tree or graph data structure.
• It is called the depth-first search because it starts from the root node and follows each
path to its greatest depth node before moving to the next path.
• DFS uses a stack data structure for its implementation.
• The process of the DFS algorithm is similar to the BFS algorithm.
Note: Backtracking is an algorithm technique for finding all possible solutions using
recursion.
In the below search tree, we have shown the flow of depth-first search, and it will follow the
order as:
Root node--->Left node ----> right node.
TIFICIAL INTELLIGENCE & APPLICATIONS
It will start searching from root node S, and traverse A, then B, then D and E, after
traversing E, it will backtrack the tree as E has no other successor and still goal node is not
found. After backtracking it will traverse node C and then G, and here it will terminate as
it found goal node.
b) Explain A* algorithm with an example.
Algorithm of A* search:
Step1: Place the starting node in the OPEN list.
Step 2: Check if the OPEN list is empty or not, if the list is empty then return failure and stops.
Step 3: Select the node from the OPEN list which has the smallest value of evaluation function
(g+h), if node n is goal node, then return success and stop, otherwise
Step 4: Expand node n and generate all of its successors, and put n into the closed list. For each
successor n', check whether n' is already in the OPEN or CLOSED list, if not then compute
evaluation function for n' and place into Open list.
Step 5: Else if node n' is already in OPEN and CLOSED, then it should be attached to the back
pointer which reflects the lowest g(n') value.
Step 6: Return to Step 2.
Advantages:
• o A* search algorithm is the best algorithm than other search algorithms.
• o A* search algorithm is optimal and complete.
• o This algorithm can solve very complex problems.
Disadvantages:
• o It does not always produce the shortest path as it mostly based on heuristics and
approximation.
• o A* search algorithm has some complexity issues.
• o The main drawback of A* is memory requirement as it keeps all generated nodes in
the memory, so it is not practical for various large-scale problems.
Example:
In this example, we will traverse the given graph using the A* algorithm. The heuristic value
of all states is given in the below table so we will calculate the f(n) of each state using the
formula f(n)= g(n) + h(n), where g(n) is the cost to reach any node from start state.
ARTIFICIAL INTELLIGENCE & APPLICATIONS
OR
Advantages:
• Depth-limited search is Memory efficient.
ARTIFICIAL INTELLIGENCE & APPLICATIONS
Disadvantages:
• o Depth-limited search also has a disadvantage of incompleteness.
• o It may not be optimal if the problem has more than one solution
• Completeness: DLS search algorithm is complete if the solution is above the depth-
limit.
• Time Complexity: Time complexity of DLS algorithm is O(bℓ).
• Space Complexity: Space complexity of DLS algorithm is O(b×ℓ).
• Optimal: Depth-limited search can be viewed as a special case of DFS, and it is also
not optimal even if ℓ>d.
Problem definition: The Wumpus world is a cave which has 4/4 rooms connected with
passageways. So there are total 16 rooms which are connected with each other. We have a
knowledge-based agent who will go forward in this world. The cave has a room with a beast
which is called Wumpus, who eats anyone who enters the room. The Wumpus can be shot by
the agent, but the agent has a single arrow. In the Wumpus world, there are some Pits rooms
which are bottomless, and if agent falls in Pits, then he will be stuck there forever. The exciting
thing with this cave is that in one room there is a possibility of finding a heap of gold. So the
agent goal is to find the gold and climb out the cave without fallen into Pits or eaten by
Wumpus. The agent will get a reward if he comes out with gold, and he will get a penalty if
eaten by Wumpus or falls in the pit.
PEAS description of Wumpus world:
Performance measure:
• +1000 reward points if the agent comes out of the cave with the gold.
• -1000 points penalty for being eaten by the Wumpus or falling into the pit.
• -1 for each action, and -10 for using an arrow.
• The game ends if either agent dies or came out of the cave.
Environment:
• A 4*4 grid of rooms.
• The agent initially in room square [1, 1], facing toward the right.
Actuators:
• Left turn,
• Right turn
• Move forward
• Grab
• Release
• Shoot.
Sensors:
• The agent will perceive the stench if he is in the room adjacent to the Wumpus. (Not
diagonally).
• The agent will perceive breeze if he is in the room directly adjacent to the Pit.
• The agent will perceive the glitter in the room where the gold is present.
Quantifiers in first-order logic (FOL) are symbols that specify the quantity of specimens in the
domain of discourse that satisfy a certain property. In the context of artificial intelligence (AI),
quantifiers are used to express logical statements about objects and their relationships in a
structured and formal way. There are two primary types of quantifiers:
1. Universal Quantifier ( ∀ )
• Symbol: ∀
• Meaning: "For all" or "For every"
• Usage: The universal quantifier asserts that a given predicate or property holds for all
elements in the domain of discourse.
• Example in FOL:
o ∀x (P(x)) means "For all x, P(x) is true."
o If P(x) represents "x is a human," then ∀x (P(x)) means "All x are humans."
2. Existential Quantifier ( ∃ )
• Symbol: ∃
• Meaning: "There exists" or "For some"
• Usage: The existential quantifier asserts that there is at least one element in the domain
of discourse for which the predicate or property holds.
• Example in FOL:
o ∃x (P(x)) means "There exists an x such that P(x) is true."
o If P(x) represents "x is a human," then ∃x (P(x)) means "There exists at least
one x that is a human."
OR
c) What is propositional logic? Explain the logical connection used to connect any two
propositions.
• Propositional logic (PL) is the simplest form of logic where all the statements are made
by propositions.
• A proposition is a declarative statement which is either true or false. It is a technique of
knowledge representation in logical and mathematical form.
Backward Chaining
A backward chaining algorithm is a form of reasoning, which starts with the goal and works
backward, chaining through rules to find known facts that support the goal.
Properties of backward chaining:
• It is known as a top-down approach.
• Backward-chaining is based on modus ponens inference rule.
• In backward chaining, the goal is broken into sub-goal or sub-goals to prove the facts
true.
• It is called a goal-driven approach, as a list of goals decides which rules are selected
and used.
• In Backward chaining from the goal we need to reach the given facts. Here the goal is
he is all rounder.
• First we need to check whether goal is present in given facts, if not the statements in
IF, AND condition should be treated as subgoals. In the given example IF student is excellent
in academics and AND he is good in sports are the subgoals.
• Next check the subgoals in IF statement, student is excellent in academics is present
in Rule 2 inferred part, so from that we got two given facts i.e student gets marks > 80 and
he is good in genera knowledge.
• Next remaining subgoal (i.e he is good in sports) is checked in inferred part; it is
present in Rule 3. From this we got one more fact i.e, student is making centuries.
• Finally we got all the given facts from the inferred statements.
• In supervised learning, sample labelled data are provided to the machine learning
system for training, and the system then predicts the output based on the training data.
• The system uses labelled data to build a model that understands the datasets and learns
about each one. After the training and processing are done, we test the model with sample data
to see if it can accurately predict the output.
• The mapping of the input data to the output data is the objective of supervised learning.
• Spam filtering is an example of supervised learning.
Supervised learning can be grouped further in two categories of algorithms:
• Classification: A classification problem is when the output variable is a
category, such as “Red” or “blue” , “disease” or “no disease”.
• Regression: A regression problem is when the output variable is a real value,
such as “dollars” or “weight”.
Regression
Regression is a type of supervised learning that is used to predict continuous values, such as
house prices, stock prices, or customer churn. Regression algorithms learn a function that maps
from the input features to the output value.
Some common regression algorithms include:
• Linear Regression
• Polynomial Regression
Classification
Classification is a type of supervised learning that is used to predict categorical values, such as
whether a customer will churn or not, whether an email is spam or not, or whether a medical
image shows a tumour or not. Classification algorithms learn a function that maps from the
input features to a probability distribution over the output classes.
Some classification algorithms includes:
KNN, Logistic regression, Decision trees
• Linear regression is one of the easiest and most popular Machine Learning algorithms.
• It is a statistical method that is used for predictive analysis. Linear regression makes
predictions for continuous/real or numeric variables such as sales, salary, age, product price,
etc.
• Linear regression algorithm shows a linear relationship between a dependent (y) and
one or more independent (y) variables, hence called as linear regression.
• Since linear regression shows the linear relationship, which means it finds how the
value of the dependent variable is changing according to the value of the independent variable.
• The linear regression model provides a sloped straight line representing the relationship
between the variables
OR
c) Write a short note on Artificial neural networks. 5 Marks
• The term "Artificial Neural Network" is derived from Biological neural networks
that develop the structure of a human brain.
• Similar to the human brain that has neurons interconnected to one another, artificial
neural networks also have neurons that are interconnected to one another in various layers of
the networks. These neurons are known as nodes.
• An Artificial Neural Network in the field of Artificial intelligence where it attempts to
mimic the network of neurons makes up a human brain so that computers will have an option
to understand things and make decisions in a human-like manner.
• The artificial neural network is designed by programming computers to behave simply
like interconnected brain cells.
• Dendrites from Biological Neural Network represent inputs in Artificial Neural
Networks, cell nucleus represents Nodes, synapse represents Weights, and Axon represents
Output
d) Explain how SVM can be used for classification with example. 5 Marks
• Support Vector Machine or SVM is one of the most popular Supervised Learning
algorithms, which is used for Classification as well as Regression problems. However,
primarily, it is used for Classification problems in Machine Learning.
• The goal of the SVM algorithm is to create the best line or decision boundary that can
segregate n-dimensional space into classes so that we can easily put the new data point in the
correct category in the future. This best decision boundary is called a hyperplane.
• SVM chooses the extreme points/support vectors that help in creating the hyperplane.
These extreme cases are called as support vectors, and hence algorithm is termed as Support
Vector Machine.
• Consider the below diagram in which there are two different categories that are
classified using a decision boundary or hyperplane:
OR
c) List any two real world application of robotics and explain their usage in
everyday life. 5 Marks
Healthcare Robotics
• Usage: Surgical robots, like the da Vinci Surgical System, are used to perform
minimally invasive surgeries with high precision. These robots are controlled by
surgeons and provide greater accuracy, flexibility, and control than traditional surgical
techniques.
• Everyday Life Impact: Patients benefit from shorter recovery times, reduced pain, and
smaller incisions, leading to quicker returns to daily activities and less time spent in
hospitals.
Household Robotics
• Usage: Robots like Roomba and Neato are designed to autonomously clean floors. They
use sensors and mapping technology to navigate around obstacles and efficiently
vacuum different types of flooring.
• Everyday Life Impact: Homeowners save time and effort on daily cleaning tasks,
allowing them to focus on other activities. These robots help maintain a cleaner living
environment with minimal manual intervention.
Text classification is a fundamental task in natural language processing (NLP) and artificial
intelligence (AI) that involves categorizing or labeling text into predefined classes or
categories. The goal is to automatically assign one or more categories to a text document,
making it easier to organize, search, and analyze large volumes of textual data.
• Machine Translation
• Information Retrieval
• Question Answering
• Speech Recognition
• Named Entity Recognition
PART B
Syntax Semantics
Structure and rules that define how code Meaning and interpretation of code
Enforced during parsing and compilation Enforced during parsing and compilation