BIT252 · TU past paper
Artificial Intelligence 2079 question paper
The complete TU 2079 exam paper for Artificial Intelligence (BIT252), all 12 questions with solved model answers written to the mark scheme.
Tap a question to open its answer.
- 110 marksNumericalHill climbing searchHideAnswer
Justify that AI can't exist without searching? Solve the following 8 puzzle problem using Hill climbing search algorithm.
Initial State: $$\begin{array}{|c|c|c|}\hline 1 & 2 & 4 \ \hline 5 & & 7 \ \hline 3 & 6 & 8 \ \hline\end{array}$$
Goal State: $$\begin{array}{|c|c|c|}\hline 1 & 4 & 7 \ \hline 2 & 5 & 8 \ \hline 3 & 6 & \ \hline\end{array}$$
[10]
AI Cannot Exist Without Searching + Hill Climbing on 8-Puzzle
Part 1: Justify That AI Cannot Exist Without Searching (4 marks)
Search is the process of systematically exploring a state space to find a sequence of actions leading from an initial state to a goal state.
Justification:
-
Problem formulation is universal in AI. Almost every AI problem is formulated as an initial state, a set of actions, a transition model, a goal test, and a path cost. Solving it means finding a path, which is search.
-
Intelligence requires choosing among alternatives. An intelligent agent faces many possible states and actions. Selecting the right action toward a goal inherently requires exploring alternatives, that is, searching.
-
Without search only two options remain, both non-intelligent:
- Acting randomly (not rational), or
- Using a fixed hardcoded response (not general, not adaptive).
-
All major AI subfields rely on search:
AI Task Role of Search Problem solving Explore action sequences to reach goal Game playing Search move/counter-move trees (Minimax) Path finding, robotics Find route from start to destination Planning Search for a valid plan Machine learning Gradient descent searches a hypothesis/parameter space Theorem proving Search inference chains Conclusion: Whether uninformed (BFS, DFS), informed (A*, Hill Climbing), or adversarial (Minimax), every intelligent behavior reduces to navigating a problem space. Hence AI cannot exist without searching.
Part 2: 8-Puzzle Using Hill Climbing (6 marks)
Given Data
Initial State
1 2 4 5 _ 7 3 6 8Goal State
1 4 7 2 5 8 3 6 _Heuristic: number of misplaced tiles $h(n)$ (blank excluded). Hill Climbing moves to a neighbor with lower $h$.
Goal Positions (row, col)
Tile Goal Tile Goal Tile Goal 1 (0,0) 4 (0,1) 7 (0,2) 2 (1,0) 5 (1,1) 8 (1,2) 3 (2,0) 6 (2,1) blank (2,2)
Step 0: Evaluate Initial State
1 2 4 5 _ 7 3 6 8Tile Current Goal Misplaced? 1 (0,0) (0,0) No 2 (0,1) (1,0) Yes 4 (0,2) (0,1) Yes 5 (1,0) (1,1) Yes 7 (1,2) (0,2) Yes 3 (2,0) (2,0) No 6 (2,1) (2,1) No 8 (2,2) (1,2) Yes $$h(\text{initial}) = 5$$
Step 1: Generate Successors (blank at (1,1))
UP (swap blank with 2):
1 _ 4 5 2 7 3 6 8Misplaced: 4, 5, 2, 7, 8 → $h = 5$
DOWN (swap blank with 6):
1 2 4 5 6 7 3 _ 8Misplaced: 2, 4, 5, 6, 7, 8 → $h = 6$
LEFT (swap blank with 5):
1 2 4 _ 5 7 3 6 8Misplaced: 2, 4, 7, 8 → $h = 4$ ✓ (5 now correct at (1,1))
RIGHT (swap blank with 7):
1 2 4 5 7 _ 3 6 8Misplaced: 2, 4, 5, 7, 8 → $h = 5$
Best successor: LEFT, with $h = 4 < 5$. Move there.
Step 2: Current State $h = 4$ (blank at (1,0))
1 2 4 _ 5 7 3 6 8Successors:
UP (swap with 1):
_ 2 4 1 5 7 3 6 8Misplaced: 1, 2, 4, 7, 8 → $h = 5$
DOWN (swap with 3):
1 2 4 3 5 7 _ 6 8Misplaced: 2, 4, 3, 7, 8 → $h = 5$
RIGHT (swap with 5, returns toward previous):
1 2 4 5 _ 7 3 6 8$h = 5$ (the initial state)
Best successor $h = 5$, but current $h = 4$.
Since no neighbor improves on $h = 4$ (all are $\geq 5$), Hill Climbing halts here.
Result
Hill Climbing gets stuck at:
1 2 4 _ 5 7 3 6 8 h = 4This is a local minimum (also a plateau/ridge situation): every move increases $h$. Therefore plain (steepest-ascent) Hill Climbing fails to reach the goal for this puzzle.
Why it fails: Hill Climbing is greedy and has no backtracking. When it reaches a state whose neighbors are all worse, it stops even though the global goal ($h=0$) is not reached. To escape, one would use techniques such as:
- Random-restart Hill Climbing
- Simulated Annealing
- Stochastic / sideways moves
- Or a complete search like A* with Manhattan distance.
Final answer: Using number-of-misplaced-tiles heuristic, Hill Climbing improves from $h=5$ to $h=4$ then gets stuck at a local minimum and cannot reach the goal state.
-
- 210 marksKnowledge definition and representation isHideAnswer
What is knowledge, representation and reasoning?When a machine is said to be passed Turing test?Give any two examples of constraint satisfaction problem.[3+5+2]
--- Knowledge refers to the information, facts, rules, and relationships about the world that an intelligent agent uses to make decisions and solve problems. It is the foundation of intelligent behavior in AI systems. - Example: "All hum...
- 310 marksClausal normal form conversionHideAnswer
Why CNF is necessary? From the following facts, show that "Charlie is a mammal" using FOPL based resolution method. a.) ows, pigs and horses are mammals b.) The child of a horse is a horse c.) Bluebeard is a horse d.) Bluebeard is Charlie's father e.) Child and father are inverse relations f.) Every mammal has a father.[10]
--- CNF is necessary for resolution-based theorem proving for the following reasons: 1. Uniform Format: Resolution works on clauses (disjunctions of literals). CNF converts all formulas into a standard set of clauses, making the process ...
- 45 marksAgent types and architecturesHideAnswer
Differentiate between goal based agent and utility based agent. [5]
--- A goal-based agent is an agent that acts to achieve a specific goal state. It uses information about its current state and a defined goal to decide which actions to take. - The agent knows what goal to achieve - Actions are evaluated...
- 55 marksNeuron structure and activation functionsHideAnswer
What is the task of activation function? What are its types? [5]
An activation function is a mathematical function applied to the output of each neuron in a neural network. Its main tasks are: 1. Introduces Non-linearity: Without an activation function, a neural network (no matter how many layers) wou...
- 65 marksDempster-Shafer theoryHideAnswer
How Dempster - Shafer theory can be used for reasoning with certainty? Explain with an example. [5]
Note: The reference notes did not contain material on this topic. The following answer is based on standard AI/Knowledge Representation curriculum as taught in BSc CSIT programs. --- The Dempster-Shafer (D-S) Theory (also called the Theo...
- 75 marksExpert system definition and purposeHideAnswer
Define expert system. Describe its architecture. [5]
Expert System: Definition and Architecture
Definition
An Expert System is an AI-based computer program that simulates the knowledge and reasoning ability of a human expert in a specific domain to solve complex problems and provide expert-level advice or decisions.
Note: Standard AI/Knowledge Engineering content is used here as no specific curriculum notes were found.
An expert system captures the knowledge of human specialists and makes it available to non-experts, enabling them to solve problems that would otherwise require human expertise (e.g., medical diagnosis, fault detection, financial planning).
Architecture of an Expert System
The major components of an expert system are:
+---------------------------+ | User Interface | +---------------------------+ | +---------------------------+ | Inference Engine | +---------------------------+ | | +----------+ +----------+ | Knowledge| | Working | | Base | | Memory | +----------+ +----------+ | +----------+ |Knowledge | |Acquisition| | Module | +----------+ | [Domain Expert / Knowledge Engineer]1. Knowledge Base
- Stores domain-specific knowledge in the form of:
- IF-THEN rules (production rules)
- Facts, heuristics, and procedures
- It is the core of the expert system
- Example:
IF fever > 102 AND cough = yes THEN diagnose = flu
2. Inference Engine
- The brain of the expert system
- Applies logical rules to the knowledge base to derive conclusions
- Uses two main reasoning strategies:
- Forward Chaining: Starts from known facts and derives conclusions (data-driven)
- Backward Chaining: Starts from a goal and works backward to find supporting facts (goal-driven)
3. Working Memory (Database)
- Stores temporary facts and intermediate results during a consultation session
- Updated dynamically as the inference engine processes rules
4. User Interface
- Allows the user to interact with the expert system
- Accepts queries and displays results/recommendations in a user-friendly manner
5. Explanation Module (Justifier)
- Explains how a conclusion was reached
- Answers questions like "Why?" and "How?" to build user trust
6. Knowledge Acquisition Module
- Facilitates the process of adding, updating, or modifying knowledge in the knowledge base
- Acts as an interface between the domain expert and the knowledge base
Summary Table
Component Role Knowledge Base Stores rules and facts Inference Engine Applies reasoning to derive conclusions Working Memory Holds temporary/session data User Interface Interaction with end user Explanation Module Justifies decisions Knowledge Acquisition Updates knowledge base
Advantages
- Available 24/7, consistent, and does not forget
- Can handle complex, domain-specific problems
- Useful where human experts are scarce
- Stores domain-specific knowledge in the form of:
- 85 marksAlpha beta pruning in game treesHideAnswer
What is the purpose of alpha beta pruning? Explain. [5]
Alpha-Beta Pruning
Purpose
The purpose of alpha-beta pruning is to reduce the number of nodes evaluated in the minimax search tree without affecting the final result. It allows the minimax algorithm to search deeper in the same amount of time by eliminating (pruning) branches that cannot possibly influence the final decision.
Note: Reference notes were not available for this topic; the following is based on standard AI curriculum material consistent with TU BSc CSIT syllabus.
Background
The Minimax algorithm explores the entire game tree to find the optimal move, but this is computationally expensive. For a game tree with branching factor b and depth d, minimax evaluates O(b^d) nodes.
Alpha-beta pruning reduces this to approximately O(b^(d/2)) in the best case, effectively doubling the searchable depth.
Key Concepts
Parameter Role Alpha (α) The best (highest) value that the MAX player can guarantee so far. Initialized to -∞ Beta (β) The best (lowest) value that the MIN player can guarantee so far. Initialized to +∞
How It Works
- The algorithm performs a standard depth-first minimax search.
- At each node, it maintains the α and β values.
- Pruning occurs when:
- At a MIN node: if the current value becomes ≤ α, prune remaining children (Alpha cutoff).
- At a MAX node: if the current value becomes ≥ β, prune remaining children (Beta cutoff).
Pruning Conditions
At MAX node: if value >= β → PRUNE (Beta cutoff) At MIN node: if value <= α → PRUNE (Alpha cutoff)
Example
Consider the following minimax tree:
MAX / \ MIN MIN / \ / \ 3 5 2 9- MAX evaluates left MIN node → gets min(3,5) = 3, so α = 3
- MAX evaluates right MIN node → sees value 2
- Since 2 < α (3), the right subtree value cannot exceed 3
- The remaining child (9) is pruned -- no need to evaluate it
- Final answer: MAX chooses 3
Advantages
- Efficiency: Reduces time complexity from O(b^d) to O(b^(d/2)).
- Same result: Always produces the same optimal move as full minimax.
- Deeper search: Allows AI to look further ahead within the same time limit.
- Practical use: Widely used in game-playing AI (chess, checkers, tic-tac-toe).
Summary
Alpha-beta pruning is an optimization technique for the minimax algorithm that prunes branches which cannot affect the outcome, using two boundary values α and β. It makes game-tree search significantly faster while guaranteeing the same optimal decision as the full minimax search.
- 95 marksScripts and conceptual dependencyHideAnswer
Illustrate your own scenario for shopping at my mall and represent those concepts using scripts. [5]
A script is a structured knowledge representation technique (proposed by Schank and Abelson) that captures a stereotyped sequence of events in a particular context. It represents common, predictable situations using: Component Descriptio...
- 105 marksDeterministic and non-deterministic enviroHideAnswer
Define deterministic and non-deterministic environment. Differentiate between BFS and DFS. [2+3]
--- An environment is deterministic if the next state of the environment is completely determined by the current state and the action performed by the agent. There is no uncertainty or randomness involved. - Example: Chess, solving a maz...
- 115 marksAmbiguities in natural languageHideAnswer
Explain the different ambiguities related to NLP. [5]
Ambiguity is one of the fundamental challenges in NLP. It occurs when a word, phrase, or sentence can be interpreted in more than one way. Since human language is inherently ambiguous, NLP systems must be designed to resolve these ambigu...
- 125 marksLearning by analogyHideAnswer
Describe the concept of learning by analogy with an example. [5]
Learning by analogy is a type of machine learning in which a system acquires new knowledge or skills by recognizing structural or functional similarities between a new, unfamiliar problem (target domain) and a previously known problem (s...