Answers 1 - 6 of Question Bank (2)
Answers 1 - 6 of Question Bank (2)
A
Department of Mechanical Engineering
Answers:
1. C ompareDepthFirstSearch(DFS),BreadthFirstSearch(BFS),andHillClimbing
algorithms.Explainonescenarioinmechanicalengineeringwhereeachmightbe
beneficial.
epth First E
D xplores as far as possible fficient in memory
E an get stuck in
C
Search along each branch before usage; good for infinite loops in cyclic
(DFS) backtracking.FollowsaLIFO problems where the graphs if not
(Last In, First Out) solution lies deep in implemented with
approach using a stack. the search tree. visitednodesordepth
limits.
readth
B xplores all nodes at the
E uarantees
G the igh memory usage
H
First current depth before moving shortest path in due to storing all
Search to the next. Follows a FIFO unweighted graphs; nodes at a given
(BFS) (First In, First Out) systematically depth.
approach using a queue. examines all nodes.
ill
H heuristic search algorithm
A fficient for finding Can get stuck inlocal
E
Climbing thatmovesinthedirectionof solutions in search maxima, plateaus, or
increasing value (closer to spaces with a clear r idges; does not
the goal) until no further gradient. guarantee finding the
improvement is possible. optimal solution.
6
I for ME
A
Department of Mechanical Engineering
FS is ideal for determining the shortest path for a robotic arm to move from its initial
B
position to a target in a grid-based or discrete space.
○ Example:For a welding robot working on an assembly line, BFS ensures the
arm moves efficiently without collisions, covering all welding points
systematically.
3. Hill Climbing
Scenario:Optimization of Cutting Tool Parametersin CNC Machining
Hill Climbing can be used to optimize tool speed, feed rate, and depth of cut to achieve
the best surface finish and minimize machining time.
○ Example:By iteratively adjusting parameters and evaluatingthe quality of the
resulting cut, the algorithm can identify the most effective machining settings,
though it may require a workaround for avoiding local optima.
2. E xplain the key components of problem formulation in AI and apply them to a
real-world scenario such as Drone Delivery of Packages.
Solution:
7
I for ME
A
Department of Mechanical Engineering
○ F or Drone Delivery: Avoid no-fly zones, ensure enough battery life to
complete the task, and adhere to air traffic regulations.
6. Criteria for Evaluating Solutions
Metrics to assess and compare solutions to ensure optimal or satisfactory
outcomes.
○ For Drone Delivery: Minimize battery consumption, avoid obstacles, and
deliver within the shortest possible time.
Scenario Setup
dronemustdeliverapackagefromawarehousetoacustomer’shome.Itstartswitha
A
fully charged battery, and the map includes specific no-fly zones. The drone must
calculate the most efficient path tothecustomerwhileconservingenergyandavoiding
restricted areas.
Implementation Example
8
I for ME
A
Department of Mechanical Engineering
M
● ove: Drone moves through the grid, avoiding no-fly zones.
● Deliver: Drone lands at the goal location.
Output Example:
F
● inal Location: Customer’s Home (5, 5)
● Remaining Battery: 95%
● Objective Function Score: 95
his problem formulation ensures the drone can make decisions autonomously while
T
adhering to constraints. Proactive planning by the agent, such asconservingbatteries
forreturntripsandavoidingno-flyzones,highlightstheimportanceofeffectiveproblem
formulation in achieving optimal solutions.
3. E xplainproblemgraphsanddiscussitsroleinAIproblem-solving.Illustratewith
an example of how it can be applied in a mechanical engineering context.
roblem graphs are visual representations of possible states and actions for a given
P
problem.
They serve as a map of the problem, where nodes represent states (situations or
configurations of the problem), and edges (connections between nodes) represent
actions or transitions that move the system from one state to another.
● S – Start State
● G –Goal State
● Edges: Directed Arrows connecting each node
● A, B, C, D: Intermediate nodes or states.
1. N
odes: Each node in a problem graph represents a possible state of the
problem.
a. In a puzzle, each node might represent a specific arrangement of pieces.
b. In a navigation problem, each node could represent a specific location.
9
I for ME
A
Department of Mechanical Engineering
2. E dges: Each edge between nodes represents an action or transition from one
state to another.
a. The edge might include a cost (like distance, time, or resource use)
associated with moving from one state to the next.
3. Initial State: The starting point of the problem, often represented by a specific
node.
4. Goal State(s): The desired end state(s) we aim to reach, represented by one or
more nodes.
5. Path: A series of connected nodes from the initial state to a goal state,
representing a possible solution.
Initial State: The robot starts at its current location (e.g., Station A).
●
● Goal State: The robot needs to deliver parts to Station C.
● States (Nodes): Represent the robot's locations (e.g., Station A, Station B,
Station C).
● Actions (Edges): The paths the robot can take between stations.
● Path Costs: Represent time, energy, or distance required to move between
locations.
Illustration
. T
1 he robot starts at Station A (Initial State).
2. It can move to Station B or directly to Station C.
3. Path Costs are assigned to each edge (e.g., 5 units of energy to reach Station B
and 3 more to reach Station C).
4. D escribe the heuristic function in AI. Develop a heuristic function for a robot
navigating a grid maze where the objective is to minimize the number of steps
taken.
10
I for ME
A
Department of Mechanical Engineering
● H euristicsguidetheAIbyprovidingapproximatesolutionsorshortcuts,makingit
easier to define complex problems where exact solutions are impractical.
● Heuristics are often defined based on expert knowledge of the problem.
● Heuristic functions allow the AI to evaluate and prioritize paths or actions,
speeding up the search for solutions. Heuristics reduce the search space by
focusing on the most promising options first.
Key Characteristics of Heuristic Functions:
1. Informed Guess
2. Unlike brute-force search, a heuristic doesn’t explore all possibilities; it uses
additional information (the heuristic) to make better guesses about which paths to
explore first.
3. Estimation:
4. Heuristics don't guarantee an exact solution but offer a quick approximation that
helps reduce search time.
5. Problem-Specific:
6. Heuristic functions are often tailored to specific problems, leveraging knowledge
about the problem’s structure to make better estimates.
Imagine arobotnavigatingagridmaze(likeachessboard)whereitcanonlymoveup,
down, left, or right to reach a goal position.
The goal of the robot is to reach the destination (goal state) in the fewest possible steps.
How It Works:
. C
1 urrent Position: Where the robot is currently located.
2. Goal Position: The target where the robot needs to reach.
3. Heuristic Function: Estimates the number of moves (or steps) needed to reach
the goal from the current position.
0 Start
1
11
I for ME
A
Department of Mechanical Engineering
2
3 Goal
S
● tart Position: (0, 0) → Top-left corner
● Goal Position: (3, 3) → Bottom-right corner
● A t each step, the robot calculates the estimated steps (heuristic value) to reach
the goal.
● The robot uses this estimate to decide which direction to move next:
○ If moving right decreases the steps to the goal, the robot will move right.
○ If moving down decreases the steps to the goal, the robot will move down.
5. E
xplain the role of convolutional neural networks (CNNs) in computer vision
tasks. Develop a conceptual architecture for a CNN model to detect defects in
manufactured parts.
● C
onvolutional neural networks provide a scalable approach to image
classification and object recognition tasks.
12
I for ME
A
Department of Mechanical Engineering
● U ses principles from linear algebra, specifically matrix multiplication, to identify
patterns within an image.
● Uses high computational power
● Requiring graphical processing units (GPUs) to train models.
● Convolutional neural networks are distinguished from other neural networks by
their superior performance with image, speech, or audio signal inputs.
● They have three main types of layers, which are:
1. Convolutional layer
2. Pooling layer
3. Fully-connected (FC) layer
or detecting defects in manufactured parts (e.g., cracks, missing components, or
F
scratches), a typical CNN model can follow this architecture:
● P urpose: Applies filters (kernels) to the image to detect features like edges, lines,
or shapes.
● Operation: Performs a mathematical operation called convolution between the
image and the filter.
● Output: A feature map that highlights detected features.
13
I for ME
A
Department of Mechanical Engineering
Example: A 3x3 filter scans across the image to identify edges or small patterns.
ReLU(x) = max(0,x)
● P urpose: Reduces the size of the feature maps (downsampling) to make
computations faster and reduce overfitting.
● Operation: Takes the maximum value from a small region (e.g., 2x2) of the
feature map.
xample: A 2x2 pooling window selects the largest value in each region, summarizing
E
the data.
● P
urpose: Converts the 2D feature maps into a1D vectorto feed into the fully
connected layers.
● P urpose: Connects all features learned from previous layers and combines them
to make a decision.
● Operation: Computes the weighted sum of the input features to classify the
image.
P
● urpose: Provides thefinal prediction(defective or non-defective part).
● Activation Function:
○ Sigmoid: For binary classification (e.g., Defective = 1, Non-Defective =
0).
14
I for ME
A
Department of Mechanical Engineering
○ S
oftmax: For multi-class classification (e.g., crack, missing part, or
scratch).
6. In Bayesian learning, the prior and posterior probabilities play a key role. Explain
these concepts and apply them to determine the probability of tool wear given
observed cutting force and vibration data.
● B ayesian Learning uses Bayes' theorem to make predictions and update
probabilities as new data becomes available.
● Bayes’ Theorem:
𝑃(𝐷|𝐻)×𝑃(𝐻)
𝑃(𝐻|𝐷) = 𝑃(𝐷)
Where:
○ 𝑃(𝐻∣𝐷): Posterior probability (probability of hypothesis 𝐻 given data 𝐷).
○ 𝑃(𝐷∣𝐻): Likelihood (probability of data 𝐷 given hypothesis 𝐻).
○ 𝑃(𝐻): Prior probability (belief about 𝐻 before seeing data).
○ 𝑃(𝐷): Evidence (probability of data 𝐷).
Let’s consider a tool wear detection problem in a manufacturing setting where cutting
tools are monitored for wear. We observe cutting force and vibration data as indicators.
he prior probability reflects the initial belief about the likelihood of tool wear
T
based on past experience. For example:
● P (H1)=0.3 → From previous data, 30% of tools tendtowearoutduring
similar operations.
● P(H2)=0.7 → 70% of tools remain in good condition.
15
I for ME
A
Department of Mechanical Engineering
helikelihoodistheprobabilityofobservingthecuttingforceandvibrationlevels
T
given the state of the tool. For example:
● If the tool is worn (H1), the likelihood of high vibration and cutting force:
P(D∣H1)=0.8
● If the tool is not worn (H2), the likelihood of high vibration and cutting
force: P(D∣H2)=0.2
heevidenceisthetotalprobabilityofobservingthedataDDDregardlessofthe
T
tool state. This is calculated as:
𝑃(𝐷|𝐻1)×𝑃(𝐻1)
𝑃(𝐻1|𝐷) = 𝑃(𝐷)
0.8×0.3
𝑃(𝐻|𝐷) = 0.38
= 0. 63
Thus, the updated probability of tool wear is 63%.
. P
1 rior Belief: Initially, there was a 30% chance that the tool was worn.
2. Updated Belief (Posterior): After observing the high vibration and cutting
force, the probability of tool wear increased to 63%.
his means that the observed data significantly increases confidence that the
T
tool is worn, guiding the maintenance decision to replace or inspect the tool.
16