A.I Paper 1
A.I Paper 1
I Paper 1
Q.1] Attempt all of the following
A] MCQ’s
1) SVM’s create a linear separating hyperplane, but they have the ability to
embed the data into a higher dimensional space using the so called __________.
A) Kernel trick B) Support Vectors C) Margin D) Decision Boundary
2) Software agents are also called as __________.
A) Hard Bots B) Soft Bots C) Firm ware D) Ghosts
3) The ______________ states that a program cannot give mind to a computer.
A) Chinese room experiment B) Turing test C) Agent D) None of these
4) A* uses __________________.
A) F(n)= g(n) + h(n) B) F(n) = g(n) C) F(n) = h(n) D) f(n) = c
→ A goal-based agent is an intelligent agent that selects its actions based on the
desirability of their outcomes. It uses a process called goal formulation to
determine what it wants to achieve, and then selects actions that will bring it closer
to its goals. The agent has a goal or set of goals that it is trying to achieve, and it
uses its knowledge about the world and its actions to determine the best course of
action to take in order to achieve those goals.
IV) Consider a Block Puzzle as given below. The task is to reach the goal
state from the initial state by moving only one block at a time. If we assign
a heuristic function h(n) such that for every title is on an incorrect block we
count blocks below it and give a-1 for each block, otherwise. We give a+1.
Calculate the heuristic values of the states that are generated from the
initial state.
→
For example, a chess game is a deterministic environment because the next state
of the game (i.e., the positions of all pieces on the board) is completely
determined by the current state and the move made by a player. Conversely, a
card game like poker is non-deterministic because even if we know the current
state (i.e., the cards in each player's hand) and action (i.e., a player's decision to
draw a card), we cannot predict with certainty what card will be drawn next.
Multiagent:
A multi-agent system (MAS) in Artificial Intelligence (AI) is a system
composed of multiple interacting intelligent agents¹. These agents, which can be
autonomous or semi-autonomous, are capable of perceiving their environment,
making decisions, and taking action to achieve a common objective⁵.
In terms of the task environment, multi-agent systems can be applied in a
variety of fields, including AI, economics, and sociology⁴. They are particularly
useful in environments where tasks are complex and require the cooperation of
multiple agents. For example, in a traffic management system, multiple agents
(representing individual vehicles) can interact with each other to optimize traffic
flow and reduce congestion¹.
An Artificial Neural Network contains artificial neurons which are called units.
These units are arranged in a series of layers that together constitute the whole
Artificial Neural Network in a system¹. A typical Artificial Neural Network has
an input layer, an output layer as well as hidden layers¹.
The input layer receives data from the outside world which the neural network
needs to analyze or learn about. Then this data passes through one or multiple
hidden layers that transform the input into data that is valuable for the output
layer. Finally, the output layer provides an output in the form of a response of
the Artificial Neural Networks to input data provided¹.
In most neural networks, units are interconnected from one layer to another.
Each of these connections has weights that determine the influence of one unit
on another unit. As the data transfers from one unit to another, the neural
network learns more and more about the data which eventually results in an
output from the output layer¹.
In logistic regression, the dependent variable is binary, meaning it can only take
on two values, typically labeled as 0 or 1¹. The independent variables can be
either continuous or categorical¹. The logistic regression model is based on the
logistic function, which is a type of S-shaped curve that maps any continuous
input to a probability value between 0 and 1¹.
where `p` is the probability of the dependent variable taking on the value of 1,
`z` is a linear combination of the independent variables and their coefficients¹.
The equation can be expanded as follows:
where `b0` is the intercept term, `b1`, `b2`, …, `bn` are the coefficients of the
independent variables `x1`, `x2`, ..., `xn`, respectively¹.
For example, let's say we want to predict whether a student will pass (1) or fail
(0) an exam based on their hours of study. Here, 'pass or fail' is our dependent
variable (y), and 'hours of study' is our independent variable (x). We could fit a
logistic regression model to our data and use it to predict the probability of
passing the exam based on hours of study.
The main objective of the SVM algorithm is to find the optimal hyperplane in
an N-dimensional space that can separate the data points in different classes in
the feature space¹. The hyperplane tries that the margin between the closest
points of different classes should be as maximum as possible¹. The dimension of
the hyperplane depends upon the number of features. If the number of input
features is two, then the hyperplane is just a line. If the number of input features
is three, then the hyperplane becomes a 2-D plane¹.
SVM chooses the extreme points/vectors that help in creating the hyperplane.
These extreme cases are called as support vectors, and hence algorithm is
termed as Support Vector Machine².
SVMs are adaptable and efficient in a variety of applications because they can
manage high-dimensional data and nonlinear relationships¹. They are very
effective as they try to find the maximum separating hyperplane between the
different classes available in the target feature¹.
For example, let's consider a dataset that describes the weather conditions for
playing a game of golf¹. Given the weather conditions, each tuple classifies the
conditions as fit ("Yes") or unfit ("No") for playing golf¹. Here is a tabular
representation of our dataset:
In this dataset, features are 'Outlook', 'Temperature', 'Humidity', and 'Windy'. The
class variable name is 'Play golf'¹. The Naive Bayes model assumes that no pair of
features are dependent. For example, the temperature being 'Hot' has nothing to do
with the humidity or the outlook being 'Rainy' has no effect on the winds. Hence,
the features are assumed to be independent¹. Secondly, each feature is given the
same weight (or importance). For example, knowing only temperature and
humidity alone can't predict the outcome accurately. None of the attributes is
irrelevant and assumed to be contributing equally to the outcome¹.
Despite these assumptions often not being met in real-world data, Naive Bayes
classifiers can be surprisingly effective and are particularly popular in text
classification tasks.
3) Explain any 2 application of reinforcement learning.
→ 1. RL in Marketing
Marketing is all about promoting and then, selling the products or services either of
your brand or someone else’s. In the process of marketing, finding the right
audience which yields larger returns on investment you or your company is making
is a challenge in itself.
And, it is one of the reasons companies are investing dollars in managing digitally
various marketing campaigns. Through real-time bidding supporting well the
fundamental capabilities of RL, your and other companies, smaller or larger, can
expect: –
News producers are now able to receive the feedback of their users
instantaneously.
Increased communication, as users are more expressive now.
No space for disinformation, hatred.
In other words, a policy is a strategy that the agent employs to determine the
next action based on the current state¹. Policy search algorithms aim to find the
best policy that will maximize the agent's total reward or minimize the cost over
time¹.
Policy search can be categorized into three types:
1. **Deterministic Policy Search**: In this, the policy is a function that maps
states to actions¹.
2. **Stochastic Policy Search**: Here, the policy outputs a probability
distribution over actions¹.
3. **Genetic Algorithms**: These are optimization algorithms based on the
principles of genetics and natural selection. They are used when the policy
space is discrete¹.
For example, consider an AI-driven robot that needs to learn how to navigate
through a maze to reach a goal. The robot can take actions like moving forward,
turning left, or turning right. The policy defines what action the robot should
take at each state (location in the maze). The robot uses policy search to find the
best policy that will get it to the goal as quickly as possible¹.
→ Sure, here is a simple pseudocode for a linear search algorithm, which is one
of the simplest search algorithms:
Procedure linear_search(A, n, x)
Input: An array A[0..n-1] and a search key x
Output: The index of the first occurrence of x in
A or -1 if x is not in A
2. **Stacking**: Stacking involves fitting many different model types on the same
data and using another model to learn how to best combine the predictions¹.
Each of these methods is a field of study that has spawned many more specialized
methods¹. The main challenge in developing ensemble models is not to obtain
highly accurate base models, but rather to obtain base models which make different
kinds of errors². For example, if ensembles are used for classification, high
accuracies can be accomplished if different base models misclassify different
training examples, even if the base classifier accuracy is low².
Ensemble learning helps improve machine learning results by combining several
models. This approach allows the production of better predictive performance
compared to a single model.
A local maximum is a state which is better than its neighbor states, but there is
also another state which is higher than it². Once the algorithm reaches a point
where all neighboring states have a value that is worse than the current state, the
algorithm stops². This is because hill climbing uses a greedy approach and will
not move to a worse state².
The problem with this is that the process will end even though a better solution
may exist². This means that hill climbing will not necessarily find the global
maximum, but may instead converge on a local maximum⁴. This problem does
not occur if the heuristic is convex. However, as many functions are not convex,
hill climbing may often fail to reach a global maximum.
3. **Actuators**: These are the parts of the vacuum cleaner that carry out
actions. They include the wheels that move the vacuum cleaner around, the
brushes that dislodge dirt from surfaces, and the vacuum system that sucks up
the dirt¹.
4. **Sensors**: These are what the vacuum cleaner uses to perceive its
environment and make decisions. They include a camera for visual input, a dirt
detection sensor to identify dirty areas, a cliff sensor to avoid falling off edges
like stairs, bump sensors to detect obstacles and walls, and infrared wall sensors
to navigate around rooms¹.
The automated vacuum cleaner uses these components to navigate its
environment, clean efficiently, and avoid obstacles. It uses its sensors to
perceive its environment and its actuators to take actions based on those
perceptions. Its goal, as defined by its performance measure, is to clean as much
dirt as possible while efficiently using its battery and avoiding damage¹.