0% found this document useful (0 votes)
30 views

_module 3 Sample Questions Solution

The document contains sample questions and answers related to AI concepts, including state space representation, search strategies, and algorithms like A* and Minimax. It discusses characteristics of well-defined problems, various search techniques, and the importance of heuristics in informed search. Additionally, it covers genetic algorithms and their applications in AI, along with the advantages of Alpha-Beta pruning in optimizing Minimax.

Uploaded by

irhpcm11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

_module 3 Sample Questions Solution

The document contains sample questions and answers related to AI concepts, including state space representation, search strategies, and algorithms like A* and Minimax. It discusses characteristics of well-defined problems, various search techniques, and the importance of heuristics in informed search. Additionally, it covers genetic algorithms and their applications in AI, along with the advantages of Alpha-Beta pruning in optimizing Minimax.

Uploaded by

irhpcm11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

MODULE 3 SAMPLE QUESTIONS

2-Mark Questions

1.​ Define state space representation.


-​ State Space Representation: It is a formal way of describing a problem in AI using
states, actions, and transitions. A state space consists of all possible states of the
problem and the transitions between them, forming a search space.

2.​ Define completeness in search strategies.


-​ Completeness in Search Strategies: A search algorithm is complete if it guarantees
finding a solution whenever one exists. It ensures that the algorithm does not get stuck
in an infinite loop or miss a possible solution.

3.​ What is time complexity in search algorithms?


-​ Time Complexity in Search Algorithms: It refers to the computational cost of running a
search algorithm, measured in terms of the number of nodes expanded before reaching
the goal.

4.​ What is the difference between uninformed and informed search?


-​ Uninformed vs. Informed Search: Uninformed search does not use problem-specific
knowledge (e.g., BFS, DFS), while informed search uses heuristics to find solutions
efficiently (e.g., A*, Greedy Best-First Search).

5.​ What is the purpose of Alpha-Beta pruning?


-​ Purpose of Alpha-Beta Pruning: It optimizes the minimax algorithm in game playing by
eliminating unnecessary nodes, reducing the number of nodes evaluated and improving
efficiency.
6.​ What is the main difference between A* search and greedy best-first search?

Greedy Best-First
Feature A* Search
Search

Evaluation f(n)=g(n)+h(n)f(n) = g(n) +


f(n)=h(n)f(n) = h(n)
Function h(n)

Guaranteed optimal solution


Not guaranteed to find
Optimality if an admissible heuristic is
the optimal solution
used

Complete but may get


Complete if the branching
Completeness stuck in loops if not
factor is finite
handled properly

More computationally
Faster but may take
Efficiency expensive but finds the best
suboptimal paths
path

Used when heuristic


Used when both cost and
Use Case alone is sufficient for
heuristic matter
fast results
5-Mark Questions

1.​ Discuss problem formulation in AI.

Problem formulation in AI refers to representing a real-world problem in a way that a machine


can understand and solve it. It involves defining:

●​ Initial State: The starting condition of the problem.


●​ Goal State: The desired outcome that needs to be achieved.
●​ State Space: The set of all possible states reachable from the initial state.
●​ Actions: The possible moves or decisions an agent can take.
●​ Transition Model: The effect of actions on states.
●​ Path Cost: The cost associated with moving from one state to another.

A well-defined problem ensures an AI system can efficiently find a solution using search
algorithms.

2.​ What are the key characteristics of a well-defined problem?

A well-defined problem in AI has the following characteristics:

1.​ Clearly Defined Initial State – The starting point must be well-specified.
2.​ Goal Test – A function to determine whether a given state is a solution.
3.​ Well-Defined State Space – The problem should be represented as a set of valid
states.
4.​ Set of Actions – A list of valid moves to transition between states.
5.​ Transition Model – A rule defining how actions change states.
6.​ Path Cost Function – A way to evaluate the cost of moving from one state to another.

For example, in a chess game, the initial board setup, legal moves, and winning conditions
define a well-structured problem.

3.​ Compare breadth-first search (BFS) and depth-first search (DFS).


4.​ Explain iterative deepening search (IDS) and its advantages.

Iterative Deepening Search (IDS) combines DFS and BFS by repeatedly applying depth-limited
DFS with increasing depth limits. It performs DFS up to a certain depth and then increases the
limit if the goal is not found.

Advantages:

●​ Completeness: IDS finds a solution if one exists.


●​ Optimality: If uniform step costs are used, IDS guarantees the shortest path.
●​ Memory Efficiency: Uses O(bd) space compared to BFS's O(b^d).
●​ Better for large search spaces: Unlike DFS, it avoids getting stuck in deep paths.

Example: IDS is used in chess engines where deep searches are needed within limited time
constraints.

5.​ Discuss the time and space complexity of uniform-cost search (UCS).

Uniform-Cost Search (UCS) expands the least-cost node first and finds the optimal path in
weighted graphs.

●​

UCS is beneficial for weighted graphs but can be slow if many small-cost steps exist.

6.​ Explain the concept of bidirectional search with an example.


-​ Bidirectional Search runs two searches simultaneously—one forward from the initial
state and one backward from the goal state—until they meet.
-​ Example: In a pathfinding problem from city A to city B, the algorithm searches from both
cities and connects at an intermediate point, reducing search depth from O(b^d) to
O(b^{d/2})
-​ Advantages: Faster than unidirectional search in large graphs.

7.​ How does the A* algorithm work, and why is it optimal?

A* Search combines UCS and Greedy Best-First Search using:

f(n)=g(n)+h(n)
where:

●​ g(n)is the path cost from the start node to n.


●​ h(n) is the estimated cost from n to the goal.

A* is optimal if h(n) is admissible (never overestimates the cost) and consistent.

Example: Used in GPS navigation to find shortest routes.

8.​ Explain the concept of heuristic functions with an example.


-​ A heuristic function estimates the cost from a node to the goal. It helps informed search
algorithms like A* reduce exploration time.
-​ Example: In the 8-puzzle problem, the Manhattan Distance heuristic sums the vertical
and horizontal distances of misplaced tiles from their correct positions.
-​ Good heuristics improve search efficiency while maintaining optimality.

9.​ What are the advantages and disadvantages of hill climbing search?

10.​Describe the steps involved in a genetic algorithm.


-​ Initialization: Generate an initial population of solutions.
-​ Selection: Choose the best individuals based on a fitness function.
-​ Crossover: Combine genes of selected individuals to create offspring.
-​ Mutation: Introduce small random changes to maintain diversity.
-​ Evaluation: Compute fitness scores of new solutions.
-​ Termination: Stop if the optimal solution is found or after a set number of generations.

Example: Used in AI-driven game development and optimization problems.

11.​Explain the minimax algorithm with an example.


-​ Minimax is used in two-player games to minimize the opponent's maximum possible
gain. It assumes both players play optimally.
-​ Example: In Tic-Tac-Toe, Minimax evaluates possible board positions and selects
moves that maximize the AI’s advantage while minimizing the opponent’s best response.
-​ Complexity: O(bd)O(b^d)O(bd), where bbb is branching factor and ddd is depth.

12.​Discuss the advantages of Alpha-Beta pruning over the minimax algorithm.

Alpha-Beta Pruning improves Minimax by skipping unnecessary branches that won't affect the
final decision.

Advantages:

●​ Reduces Computation: Prunes branches, reducing nodes from O(b^d) to O(b^{d/2})


●​ Faster Decision-Making: Speeds up game-playing AI by eliminating irrelevant moves.
●​ Maintains Optimality: Still finds the best move as Minimax does.

Example: Used in chess engines like Stockfish to analyze millions of positions quickly.

-​

10-Mark Questions

1.​ Explain the state space representation of a problem with a suitable example and
discuss its importance in AI.

State space representation is a fundamental concept in AI where a problem is modeled as a set


of states, actions, and transitions between states. This representation provides a structured way
to solve problems using search algorithms.

Components of State Space Representation:

●​ Initial State: The starting point of the problem.


●​ Goal State: The desired solution.
●​ State Space: The collection of all possible states.
●​ Actions/Operators: The possible moves from one state to another.
●​ Transition Model: Defines how actions affect the state.
●​ Path Cost: The cost associated with reaching a goal.

Example:​
Consider the 8-puzzle problem, where a 3x3 grid has tiles numbered 1-8 and a blank space.
The state space consists of all possible board configurations. Actions include moving tiles into
the blank space. The goal state is a predefined tile arrangement.

Importance in AI:
●​ Provides a systematic approach to problem-solving.
●​ Helps in designing efficient search algorithms.
●​ Enables AI to automate decision-making in robotics, planning, and navigation.

2.​ Discuss different uninformed search techniques (BFS, DFS, UCS, DLS, IDS) with
their advantages and disadvantages.

3.​ Compare and analyze different search strategies based on time complexity, space
complexity, completeness, and optimality.
4.​ Explain informed search techniques and compare greedy best-first search and A
search* with an example.

Informed search uses heuristics to guide the search.

●​ Greedy Best-First Search selects the node with the lowest heuristic h(n)h(n)h(n)
(estimated cost to goal).
●​ A* search uses f(n)=g(n)+h(n)f(n) = g(n) + h(n)f(n)=g(n)+h(n) (actual cost + estimated
cost).

Feature Greedy Best-First A* Search


Search

Function f(n)=h(n) f(n)=g(n)+h(n)

Completeness ❌ (May get stuck in ✅


loops)

Optimality ❌ (Not optimal) ✅ (If heuristic is admissible)

Efficiency Faster, but may take Slower but guarantees best


wrong paths path

Example: In pathfinding, Greedy may take a direct but blocked route, whereas A* finds the
shortest navigable path.

-​
5.​ Discuss local search algorithms, focusing on hill climbing and simulated
annealing.

Local search algorithms optimize problems without exploring all possible states.

●​ Hill Climbing: Moves to the best neighbor until a peak is reached.


○​ Advantage: Efficient for optimization.
○​ Disadvantage: Stuck in local optima.
●​ Simulated Annealing: Introduces randomness to escape local optima by accepting
worse solutions with decreasing probability over time.
○​ Advantage: Avoids local minima.
○​ Disadvantage: Requires careful tuning of temperature schedule.

Example: Used in job scheduling and AI-based optimization.

6.​ Describe the genetic algorithm approach with steps and its applications in AI.

GA is an evolutionary approach to problem-solving.

Steps in GA:

1.​ Initialization: Generate random population.


2.​ Selection: Choose the fittest individuals.
3.​ Crossover: Combine genes of parents to create offspring.
4.​ Mutation: Introduce random changes.
5.​ Evaluation: Compute fitness of new solutions.
6.​ Termination: Stop if an optimal solution is found.

Applications:

●​ AI Game Development: Generates optimal strategies.


●​ Optimization Problems: Used in route planning and scheduling.
●​ Machine Learning: Feature selection and hyperparameter tuning.

7.​ Explain the minimax algorithm with an example and discuss how Alpha-Beta
pruning improves its efficiency.

Minimax is used in adversarial games like chess. It assumes players take optimal moves.

Example: In Tic-Tac-Toe, Minimax evaluates all possible moves and counter-moves to choose
the best strategy.

●​ Alpha-Beta Pruning optimizes Minimax by ignoring irrelevant branches, reducing time


complexity from O(b^d) to O(b^{d/2}).
●​ Improvement: Faster decision-making in chess engines like Stockfish.
8.​ How do adversarial search techniques work in game-playing AI? Explain with an
example.

Adversarial search deals with AI competing against an opponent.

●​ Example: In chess, AI predicts the opponent’s best move and counters it using Minimax
with Alpha-Beta pruning.
●​ Techniques:
○​ Minimax: Evaluates moves assuming optimal play.
○​ Monte Carlo Tree Search (MCTS): Used in Go and Poker AI.

AI game-playing relies on adversarial search for strategic decision-making in competitive


environments.

You might also like