Unit 3: Question Bank & Model Answers
Course - Fundamentals of AI
Unit - Unit 3: Introduction to AI, Problem Solving and Search
Question 1: AI Definitions, Turing Test & System Approaches
Question Statement
- Explain the four approaches to AI: thinking humanly, thinking rationally, acting humanly and acting rationally. Give one definition of AI that fits each.
- Describe the Turing Test and list the capabilities a machine needs to pass it. How does the Total Turing Test extend it?
- Place each system in the approach it best fits and justify your choice:
- A customer-support chatbot
- An automated theorem prover
- A self-driving car
- A cognitive model of human problem solving
Model Answer
1. Four Approaches to AI
AI is defined along two axes: Human vs. Rational and Thought vs. Behavior.
| Approach | Focus | Core Concept | Standard Definition |
|---|---|---|---|
| Thinking Humanly | Thought Process | Cognitive modeling | "The automation of activities that we associate with human thinking, activities such as decision-making, problem solving, learning..." (Bellman, 1978) |
| Acting Humanly | Observable Behavior | Behavioral mimicry | "The art of creating machines that perform functions that require intelligence when performed by people." (Kurzweil, 1990) |
| Thinking Rationally | Thought Process | Formal logic | "The study of mental faculties through the use of computational models." (Charniak & McDermott, 1985) |
| Acting Rationally | Observable Behavior | Expected utility | "Computational Intelligence is the study of the design of intelligent agents." (Poole et al., 1998) |
2. Turing Test & Total Turing Test
- Turing Test Setup: A human interrogator communicates via text terminal with an unseen human and machine. If the interrogator cannot tell machine from human after 5 minutes, the machine passes.
- Four Capabilities Needed to Pass:
- Natural Language Processing (NLP): To communicate fluently in natural human language.
- Knowledge Representation (KR): To store facts and relationships heard or known.
- Automated Reasoning: To answer queries and draw deductions from stored facts.
- Machine Learning (ML): To detect patterns and adapt to new situations.
- Total Turing Test Extension: Adds physical interaction with real-world objects.
- Two Additional Physical Disciplines: 5. Computer Vision: To perceive and inspect objects visually. 6. Robotics: To manipulate physical objects and navigate real space.
3. Classification of AI Systems
| System | Best-Fit Approach | Justification |
|---|---|---|
| Customer-support chatbot | Acting Humanly | Simulates human dialogue, tone, and empathy in conversational interactions. |
| Automated theorem prover | Thinking Rationally | Operates strictly via formal mathematical logic to prove theorems deductively. |
| Self-driving car | Acting Rationally | Operates as an autonomous agent selecting actions that maximize transit safety and efficiency under uncertainty. |
| Cognitive model of human problem solving | Thinking Humanly | Simulates human psychological processes, working memory limits, and reaction times. |
Question 2: Water Jug Problem (State Space & Production Rules)
Question Statement
You have a 5-litre jug and a 2-litre jug, with no markings on either, and an unlimited water tap. You must get exactly 1 litre in the 5-litre jug.
- Define the state representation, initial state and goal state.
- Write the production rules.
- Find a solution path, naming the rule used at each step.
Model Answer
1. Problem Formulation
- State Representation: , where:
- : volume of water (L) in the 5L jug ().
- : volume of water (L) in the 2L jug ().
- Initial State:
- Goal State: (target: )
2. Production Rules
Let capacities be and :
| Rule | Action | Precondition | Resulting State |
|---|---|---|---|
| R1 | Fill | ||
| R2 | Fill | ||
| R3 | Empty | ||
| R4 | Empty | ||
| R5 | Pour (fill ) | ||
| R6 | Pour (fill ) | ||
| R7 | Pour all | ||
| R8 | Pour all |
3. Solution Path
| Step | State | Rule Applied | Arithmetic / Action |
|---|---|---|---|
| 0 | Start | Both jugs empty. | |
| 1 | R1 (Fill ) | Fill 5L jug to capacity. | |
| 2 | R6 (Pour ) | Fill 2L jug from 5L jug (). | |
| 3 | R4 (Empty ) | Discard water from 2L jug. | |
| 4 | R6 (Pour ) | Fill 2L jug from 5L jug (). Goal: achieved. | |
| 5 | R4 (Empty ) | (Optional) Empty 2L jug, leaving exactly 1L in . |
Question 3: Missionaries and Cannibals Problem
Question Statement
Three missionaries and three cannibals must cross a river in a boat that holds at most two people. Cannibals must never outnumber missionaries on either bank, unless no missionaries are on that bank.
- Define the state representation, initial state, goal state, actions and path cost.
- List the legal operators and the condition that makes a state unsafe.
- Draw the state space for the first four levels, marking unsafe states, and give a complete solution path.
- Why is breadth-first search a sensible choice for this problem?
Model Answer
1. Problem Formulation
- State Representation:
- : Missionaries and Cannibals on left bank.
- : Current boat position.
(Right bank is implicit: , .)
- Initial State:
- Goal State:
- Actions: Boat carries passengers where :
- Path Cost: per river crossing (total crossings).
2. Legal Operators & Unsafe Condition
- Unsafe Condition: A state is unsafe if cannibals outnumber missionaries on either bank: Safety Invariant: A state is valid if and only if .
- Legal Operators:
- Left to Right ():
- Right to Left ():
- Must satisfy: and preserve the safety invariant.
3. State Space Tree (First 4 Levels) & Solution Path
State Space Tree (Levels 0 to 3)
Complete Optimal Solution (11 Crossings)
| Step | Current State | Action Taken | Next State |
|---|---|---|---|
| 0 | Start | ||
| 1 | Send 2 Cannibals | ||
| 2 | Return 1 Cannibal | ||
| 3 | Send 2 Cannibals | ||
| 4 | Return 1 Cannibal | ||
| 5 | Send 2 Missionaries | ||
| 6 | Return 1 Missionary + 1 Cannibal | ||
| 7 | Send 2 Missionaries | ||
| 8 | Return 1 Cannibal | ||
| 9 | Send 2 Cannibals | ||
| 10 | Return 1 Cannibal | ||
| 11 | Send 2 Cannibals | [Goal] |
4. Why BFS is a Sensible Choice
- Guarantees Shortest Path: Step costs are uniform (). BFS is mathematically guaranteed to find the minimal number of river crossings ( steps).
- Prevents Infinite Loops: State space has cycles. DFS can loop indefinitely, whereas BFS explores level-by-level and terminates at the shallowest solution.
- Low Memory Impact: Total state space has only configurations ( safe). BFS's exponential space complexity is negligible here.
Question 4: Uniform Cost Search and Bidirectional Search
Question Statement
Consider the undirected graph below, with start and goal .
Graph Edge Costs:
| Edge | Cost |
|---|---|
| 1 | |
| 4 | |
| 2 | |
| 5 | |
| 1 | |
| 6 | |
| 3 |
Sub-questions:
- Apply uniform cost search. Show the priority queue after each expansion, and give the path found and its cost.
- Which path would breadth-first search return, counting edges only? Explain why it differs from the uniform cost answer.
- Explain bidirectional search, give its time complexity, and state two conditions needed to apply it.
Model Answer
1. Uniform Cost Search (UCS) Trace
Nodes are ordered in the Priority Queue () by cumulative cost .
| Step | Expanded Node | Generated Neighbors & Costs | Priority Queue Contents | |
|---|---|---|---|---|
| 0 | — | — | Initial state | |
| 1 | , | |||
| 2 | (cheaper, update), | |||
| 3 | (cheaper, update), | |||
| 4 | (cheaper, update) | |||
| 5 | Goal reached on expansion | — |
- Optimal Path:
- Optimal Cost:
2. BFS Comparison
- BFS Path: (2 hops).
- BFS Cost: .
- Why it differs:
- BFS minimizes edge count (treats all costs as ). It selects because it has only 2 edges.
- UCS minimizes cumulative cost (). It selects because its total cost is lower ().
3. Bidirectional Search
- Concept: Runs two concurrent searches: forward from start and backward from goal , stopping when their frontiers meet.
- Time Complexity: (compared to for BFS, providing an exponential speedup).
- Two Conditions Needed:
- Reversible Operators: A predecessor function must exist to generate parent nodes backwards from .
- Explicit Goal State: The goal state must be known explicitly (not an abstract property like "checkmate").
Question 5: Smart City AI Systems (Agent Architectures)
Question Statement
A smart city is deploying the five AI systems below:
System Descriptions:
| System ID | Description |
|---|---|
| S1 | A street light that switches on when its light sensor reads "dark" and off when it reads "bright". |
| S2 | A robot vacuum that keeps an internal map of which rooms it has already cleaned, because it cannot see the whole house at once. |
| S3 | A GPS navigator that plans a route to the destination the user types in. |
| S4 | A ride-hailing app that picks a route weighing travel time, fuel cost and passenger comfort. |
| S5 | A spam filter that improves its accuracy each time a user marks a mail as "spam" or "not spam". |
Sub-questions:
- Identify the agent type of each system (S1-S5) and justify each answer in one line.
- Draw the schematic diagram of a learning agent. Label its four components and explain the role of each, using S5 as the example.
- S1 works well, but S2 could not be built as a simple reflex agent. Explain why, using the idea of a partially observable environment.
Model Answer
1. System Classification
| System | Agent Type | One-Line Justification |
|---|---|---|
| S1 | Simple Reflex Agent | Maps current sensor input directly to action (dark ON) without history. |
| S2 | Model-Based Reflex Agent | Keeps an internal map to track unobservable state in a partially observable world. |
| S3 | Goal-Based Agent | Performs path planning to achieve a specified goal destination. |
| S4 | Utility-Based Agent | Evaluates tradeoffs between conflicting goals (time, fuel, comfort) using a utility function. |
| S5 | Learning Agent | Dynamically adapts classification parameters based on user feedback to improve accuracy. |
2. Learning Agent Diagram & 4 Components (Applied to S5)
- Critic: Compares the filter's prediction against user labels ("spam" / "not spam") and generates an error signal.
- Learning Element: Updates word probabilities and classification weights based on feedback from the critic.
- Performance Element: The active classifier that scores incoming emails and routes them to Inbox or Spam.
- Problem Generator: Identifies ambiguous emails near the decision boundary to request user verification.
3. Reflex Agent Viability: S1 vs. S2
- S1 is Fully Observable: The current light sensor reading contains all necessary information to decide action ().
- S2 is Partially Observable: The vacuum only senses its current room, not the status of other rooms. A simple reflex vacuum cannot tell if a clean-looking room was cleaned recently or needs cleaning, causing infinite loops and incomplete coverage. S2 requires an internal state (map) to function correctly.
Question 6: Autonomous Hospital Transport Robot (PEAS & Environment)
Question Statement
A large hospital plans an autonomous robot that carries medicines, lab samples and meals between wards. It moves through busy corridors full of patients, staff and wheelchairs, and it uses lifts to change floors. The pharmacy can add urgent orders at any time while the robot is on its way.
- Draw the schematic of a goal-based agent and a learning agent. State one situation in this robot's job where each is the better choice.
- Specify the PEAS description of the robot.
- Classify its task environment on these dimensions, with a one-line justification for each:
- Observable
- Deterministic
- Episodic
- Static
- Discrete
- Single / Multi-agent
Model Answer
1. Schematics & Situational Choice
Schematics
Situational Choices
- Goal-Based is Better: When the pharmacy injects an urgent stat order mid-journey, the agent updates its goal set and replans a new route using .
- Learning Agent is Better: For predicting corridor congestion and elevator delays across the day (e.g., shift changes at 2 PM), learning traffic trends from experience to pick faster routes.
2. PEAS Specification
| Component | Robot Specification |
|---|---|
| P - Performance | On-time delivery rate, zero collisions, safe transport of fragile samples, battery efficiency. |
| E - Environment | Corridors, wards, pharmacy, elevators, patients, doctors, wheelchairs, moving beds. |
| A - Actuators | Motorized drive wheels, steering motors, compartment locks, touchscreen, speaker, lift call transmitter. |
| S - Sensors | 2D/3D LiDAR, RGB-D depth cameras, ultrasonic bumpers, wheel odometry, RFID/Wi-Fi receiver. |
3. Task Environment Classification
| Dimension | Classification | One-Line Justification |
|---|---|---|
| Observable | Partially Observable | Sensors cannot see around blind corners, through closed doors, or across different floors. |
| Deterministic | Stochastic | Human pedestrian movements and elevator wait times introduce random, unpredictable outcomes. |
| Episodic | Sequential | Current routing actions directly determine future positions, delivery deadlines, and battery level. |
| Static | Dynamic | Pedestrians move and urgent orders arrive while the robot deliberates. |
| Discrete | Continuous | Spatial coordinates, velocity, steering angles, and time vary continuously. |
| Single / Multi-agent | Multi-Agent | Operates among active humans and other motorized hospital equipment. |