COS 335 — Artificial Intelligence
Complete Course Notes & 100 MCQs
University of Nigeria, Nsukka
Department of Computer Science
Topics Covered:
• Part 1: Introduction to Artificial Intelligence
• Part 2: Agents in AI
• Part 3: Search Algorithms in AI
• Part 4: Knowledge-Based Agents
• Part 5: Knowledge Representation
• Part 6: Propositional Logic in AI
• Part 7: Types of Inference Rules
• Part 8: First-Order Logic (FOL)
• Part 9: The Wumpus World
• Part 10: Pattern Recognition
• 100 Multiple Choice Questions with Answers
PART 1: INTRODUCTION TO ARTIFICIAL INTELLIGENCE
What is Artificial Intelligence?
Artificial Intelligence (AI) is a branch of Computer Science through which we create intelligent machines
that can behave like humans, think like humans, and make decisions. The key idea is the simulation of
human intelligence into machines to help them solve problems. AI exists when a machine can have
human-based skills including Learning (acquiring new knowledge), Reasoning (applying logic to reach
conclusions), and Solving Problems (finding solutions to challenges).
Why Do We Need AI?
• To combat human errors and human inefficiencies — AI doesn't get tired, distracted, or biased.
• To facilitate human interaction with machines — AI makes communication with technology more
natural.
• To enhance human productivity — AI automates repetitive tasks.
• To help automate processes and facilitate the advancement of technology.
Broad Classification of AI (by Capability)
Narrow AI (Weak AI): The most common type today — a specific-purpose AI trained for and able to
perform a dedicated task. Examples: voice assistants, spam filters, recommendation systems. Cannot go
beyond what it was trained to do.
General AI: Can perform any intellectual task with the efficiency of a human. The idea is a system that can
be smarter and think like a human on its own. Not yet achieved.
Super AI: Hypothetical future level where machines surpass human intelligence entirely, with their own
consciousness, sentiments, and self-awareness.
Classification of AI by Functionality (Type 2)
Reactive Machines: Most basic type. Don't store memories or past experience. Only focus on current
scenarios and react. Example: IBM's Deep Blue chess engine.
Limited Memory: Can store data for a short period and use it for a limited time. Example: Self-driving
cars.
Theory of Mind: Understands human emotions and is able to interact socially like human beings. Still in
research stages.
Self-Awareness: The future of AI. Machines with their own consciousness, sentiments, and
self-awareness.
Goals of AI
• To replicate human intelligence
• To solve knowledge-intensive tasks
• An intelligent connection of perception and action
• To build machines which can perform tasks requiring human intelligence
• Artificial Intelligence is vast and needs all other fields
Advantages of AI
• High accuracy with less error (takes decisions from pre-experiences)
• High speed and fast decision-making abilities
• High reliability
• Useful for risky environments
• Digital Assistant functionality
• Useful as a public utility (e.g., self-driving cars)
Disadvantages of AI
• Very expensive
• Over-dependency slows human intellect
• Prone to cyber vulnerabilities and malware
• Security issues
• Cannot think outside the box — lacks genuine creativity
• Increased dependency on machines
• No original creativity
Applications of AI
Astronomy, Healthcare (human diagnosis), Gaming, Finance, Data Security, Travel and Transport,
Robotics, Entertainment, Agriculture, Education.
PART 2: AGENTS IN AI
What is an Agent?
An agent is anything that perceives its environment through sensors and acts on that environment through
actuators. You can have a human agent, a robotic agent, or a software agent. An agent runs in the
continuous cycle of Perceiving → Thinking → Acting.
Sensor: A device that detects changes in the environment and sends information to other electronic
devices.
Actuator: A component of a machine that converts energy into motion — responsible for moving and
controlling a system.
Intelligent Agents
An Intelligent Agent is an autonomous entity that acts upon an environment using sensors and actuators to
achieve its goal. It may learn from the environment to perform better over time. An Intelligent Agent must:
(1) have the ability to perceive its environment, (2) use observations to make decisions, (3) decisions
should result in actions, (4) actions taken must be rational.
PEAS Representation
PEAS = Performance measure, Environment, Actuators, Sensors. It is the type of model an AI agent
works upon.
Self-driving car example: Performance = comfort, safety, time; Environment = roads, other cars, road
signs; Actuators = steering wheel, brakes; Sensors = speedometer, accelerator, GPS.
Vacuum cleaner example: Performance = cleanliness; Environment = room, child, obstacles; Actuators =
wheels, brushes; Sensors = engine, camera, bump sensor.
Types of AI Agents
1. Simple Reflex Agent: Takes decisions based only on current percepts, ignoring history. Succeeds only
in fully observable environments. Problems: very limited intelligence, doesn't adapt to environmental
changes.
2. Model-Based Reflex Agent: Works in partially observable environments by tracking the situation. Has
two factors: the model (how things happen) and the internal state (current state representation based on
history).
3. Goal-Based Agent: Besides current state, also guided by its goal — which describes the desirable
situation or condition it wants to achieve.
4. Utility-Based Agent: Similar to goal-based but provides extra utility measurements assessing how well
the goal is achieved. Useful when many possible alternatives exist.
5. Learning Agent: Learns from past experiences. Starts with basic knowledge and adapts. Has four
components: Learning Element, Critic, Performance Element, Problem Generator.
Rational Agent
A rational agent has a clear preference and acts to maximize its performance measures with all possible
actions. In reinforcement learning: correct actions give positive rewards; wrong actions give negative
rewards. Rationality is judged on: the performance measure (success criterion), agent's prior knowledge,
the best possible action available, and the sequence of perception.
PART 3: SEARCH ALGORITHMS IN AI
Key Terminologies
Search: A step-by-step procedure to solve a search problem in a given search space.
Search Space: Represents a set of possible solutions which a system may have.
Start State: The state from which the agent begins the search.
Goal Test: A function which observes a current state and returns whether the goal is achieved.
Search Tree: A tree representation of a search problem. The root node corresponds to the initial state.
Transition Model: Description of what each action does.
Path Cost: A function assigning a numeric cost to each path.
Solution: An action sequence leading from start node to goal node.
Optimal Solution: The solution with the lowest cost among all solutions.
Properties of a Search Algorithm
Completeness: Guarantees to return a solution if one exists.
Optimality: The found solution is guaranteed to be the best solution.
Time Complexity: A measure of time for an algorithm to complete its task.
Space Complexity: The maximum storage space required at any point within the search.
Types of Search Algorithms
Search algorithms are classified into Uninformed (Blind) Search and Informed (Heuristic) Search.
Uninformed Search Algorithms
Breadth-First Search (BFS): Searches breadth-wise, expanding all nodes at the current level before
going deeper. Uses a queue. Advantages: provides a solution if any exists; finds minimal cost solution.
Disadvantages: requires lots of memory; slow if goal is far from root.
Depth-First Search (DFS): Recursive algorithm traversing to the deepest node first. Uses a stack.
Advantages: requires less time for solutions farther from root. Disadvantages: possibility of infinite loops.
Depth-Limited Search: Solves DFS infinite loop problem by treating nodes at the depth limit as having no
successors. Memory efficient. May not be optimal.
Uniform Cost Search (UCS): For weighted graphs; finds the path with lowest cumulative cost. Optimal at
every state. Disadvantage: doesn't care about number of steps, can go into infinite loop.
Iterative Deepening DFS: Finds the depth limit by gradually increasing it. Combines BFS memory
efficiency and DFS speed. Drawback: repeats work of previous phases.
Informed (Heuristic) Search Algorithms
Uses domain knowledge via a heuristic function that estimates how close the agent is to the goal.
Best First Search (Greedy): Always selects the path appearing best at the moment. More efficient than
BFS/DFS. Can get stuck in a loop. Not optimal.
A* Algorithm: Uses both heuristic function AND cost to reach the node from the start state. Finds the
shortest path. Optimal and complete. Disadvantages: can have complexity issues; requires large memory.
PART 4: KNOWLEDGE-BASED AGENTS
What is a Knowledge-Based Agent?
Knowledge-based agents maintain an internal state of knowledge, reason over that knowledge, update
their knowledge after observation, and take action. They have two main parts:
Knowledge Base (KB): A collection of sentences expressed in a knowledge representation language,
storing facts about the world. It is the central component of knowledge-based agents.
Inference System: Derives new sentences from existing ones. Applies logical rules to the KB to deduce
new information. Works mainly via Forward Chaining and Backward Chaining.
Conditions for a Knowledge-Based Agent
• The agents must represent states and actions
• Incorporate new percepts
• Update the internal representation of the world
• Deduce the internal representation of the world
• Deduce appropriate action
Levels of a Knowledge-Based Agent
Knowledge Level, Logical Level, Implementation Level.
Approaches to Designing a Knowledge-Based Agent
Declarative Approach: Creates a knowledge-based agent by initializing with an empty knowledge base
and telling it all the sentences to use.
Procedural Approach: Directly encodes the desired behavior as a program code.
PART 5: KNOWLEDGE REPRESENTATION
What is Knowledge Representation?
Knowledge Representation (KR) is the part of AI concerned with how an AI agent thinks and how that
thinking contributes to intelligent behaviour. It represents information about the real world so that a
computer can understand and use it to solve complex real-world problems.
Types of Knowledge in AI
Declarative Knowledge: Knowledge to know about something — includes concepts, facts, and objects.
Procedural Knowledge (Imperative): Knowing how to do something — includes rules, strategy, and
agenda. Can be directly applied to any task.
Heuristic Knowledge: Knowledge of some expert about a field or subject.
Meta Knowledge: Knowledge about what we know — truths about the real world.
Structural Knowledge: Basic knowledge for problem solving — describes relationships between
concepts and objects.
Requirements for a KR System
Representational Accuracy: Ability to represent all kinds of required knowledge.
Inferential Adequacy: Ability to manipulate representational structures to produce new knowledge.
Inferential Efficiency: Ability to direct the inferential mechanism into the most productive directions.
Acquisitional Efficiency: Ability to acquire new knowledge easily using automatic methods.
Four Techniques of Knowledge Representation
1. Logical Representation
A language with concrete rules dealing with propositions, with no ambiguity. Consists of precisely defined
syntax and semantics. Categorized into Propositional Logic and Predicate/First-Order Logic. Advantages:
enables logical reasoning; basis for programming languages. Disadvantages: restrictions; may not be
natural; inference may not be efficient.
2. Semantic Network Representation
Represents knowledge in graphical networks — nodes represent objects, arcs describe relationships. Two
types of relations: IS-A (Inheritance) and Kind-of-relation. Advantages: natural, transparent, simple.
Drawbacks: high computational time; lacks standard quantifiers; not intelligent on its own.
3. Frame Representation
A record-like structure with a collection of attributes (slots) and their values (facets) describing an entity.
Also known as slot-filter knowledge representation. Advantages: groups related data; flexible; easy to add
new attributes; easy to visualize. Disadvantages: inference mechanism not easily processed; generalized
approach.
4. Production Rules
Consist of condition-action pairs: 'If condition then action.' Has three parts: set of production rules, Working
Memory, and the recognize-act cycle. When multiple rules fire simultaneously, a conflict set is created and
conflict resolution selects one rule. Advantages: expressed in natural language; highly modular.
Disadvantages: no learning capability; many active rules causes inefficiency.
PART 6: PROPOSITIONAL LOGIC IN AI
What is Propositional Logic?
Propositional Logic (PL) is the simplest form of logic where all statements are made by propositions —
declarative statements that are either true or false. Also called Boolean Logic, Propositional Calculus, or
Sentential Logic. Essential for knowledge representation, reasoning, and decision-making.
Tautology: A proposition formula which is always true (also called a valid sentence).
Contradiction: A proposition formula which is always false.
Contingency: A proposition formula which has both true and false values.
Types of Propositions
Atomic Propositions: Simple propositions consisting of a single proposition symbol — must be either true
or false. Example: '2+2 is 4' (true), 'The Sun is cold' (false).
Compound Propositions: Constructed by combining simpler propositions using logical connectives.
Example: 'It is raining today and the compound is wet.'
Logical Connectives
Negation (~P or ¬P): Reverses the truth value of P.
Conjunction (P ^ Q): AND — true only when both P and Q are true.
Disjunction (P v Q): OR — false only when both P and Q are false.
Implication (P -> Q): IF-THEN — false only when P is true and Q is false. Equivalent to ~P v Q.
Biconditional (P <=> Q): IF AND ONLY IF — true when P and Q have the same truth value.
Precedence of Connectives (Highest to Lowest)
• 1st — Parenthesis ( )
• 2nd — Negation (~)
• 3rd — Conjunction (^)
• 4th — Disjunction (v)
• 5th — Implication (->)
• 6th — Biconditional (<=>)
Important Equivalences
P -> Q is equivalent to ~P v Q (Contrapositive: ~Q -> ~P).
Converse of P->Q is Q->P. Inverse is ~P->~Q. Contrapositive is ~Q->~P.
Limitations of Propositional Logic
• Cannot represent relations like OR, SOME, NONE (e.g., 'All girls are intelligent').
• Limited expressive power.
• Cannot describe sentences in terms of their properties or logical relationships.
PART 7: TYPES OF INFERENCE RULES
What are Inference Rules?
Rules of Inference in AI are templates for generating valid arguments. Applied to derive proof in AI — a
sequence of conclusions leading to a desired goal.
1. Modus Ponens: If P and P->Q is true, then Q is true. Notation: (P->Q, P) / Q. Example: 'If I am sleepy
then I go to bed' (P->Q), 'I am sleepy' (P), therefore 'I go to bed' (Q).
2. Modus Tollens: If P->Q is true and ~Q is true, then ~P is true. Notation: (P->Q, ~Q) / ~P. Example: 'If I
am sleepy then I go to bed' (P->Q), 'I do not go to bed' (~Q), therefore 'I am not sleepy' (~P).
3. Hypothetical Syllogism: If P->Q and Q->R are true, then P->R is true. Notation: (P->Q, Q->R) / P->R.
4. Disjunctive Syllogism: If PvQ is true and ~P is true, then Q is true. Notation: (PvQ, ~P) / Q.
5. Addition: If P is true, then PvQ is true. Notation: P / PvQ.
6. Simplification: If P^Q is true, then Q or P is also true. Notation: (P^Q) / Q or (P^Q) / P.
7. Resolution: If PvQ and ~P^R is true, then QvR is true. Notation: (PvQ, ~P^R) / QvR.
PART 8: FIRST-ORDER LOGIC (FOL)
Why First-Order Logic?
Propositional logic cannot represent complex sentences like 'Some humans are intelligent' or 'Godwin likes
cricket.' First-Order Logic (FOL) — also called Predicate Logic or First-Order Predicate Logic — is an
extension to PL that is sufficiently expressive for natural language statements. FOL assumes the world
contains Objects, Relations, and Functions.
Basic Syntactic Elements of FOL
Constants: 1, 2, A, John, Mumbai, cat,...
Variables: x, y, z, a, b,...
Predicates: Brother, Father, >,...
Functions: sqrt, LeftLegOf,...
Connectives: ^, v, ~, =>, <=>
Equality: ==
Quantifiers: For all (V), There exists (E)
Quantifiers in First-Order Logic
Universal Quantifier (For all): Specifies that a statement is true for everything. Uses implication (->) as
the main connective. Read as 'For all x,' 'For each x,' or 'For every x.' Example: 'All men drink coffee' = For
all x: man(x) -> drink(x, coffee).
Existential Quantifier (There exists): Statement is true for at least one instance. Uses AND (^) as the
main connective. Read as 'There exists an x,' 'For some x,' or 'For at least one x.' Example: 'Some boys
are intelligent' = There exists x: boys(x) ^ intelligent(x).
Points to Remember
• Main connective for universal quantifier (For all) is implication ->.
• Main connective for existential quantifier (There exists) is AND (^).
• For all x, For all y is similar to For all y, For all x.
• There exists x, There exists y is similar to There exists y, There exists x.
• There exists x, For all y is NOT similar to For all y, There exists x.
Free and Bound Variables
Free Variable: Occurs outside the scope of the quantifier. Example: For all x, There exists y [P(x, y, z)],
where z is a free variable.
Bound Variable: Occurs within the scope of the quantifier. Example: For all x [A(x) B(y)], here x and y are
bound variables.
FOL Inference Rules for Quantifiers
Universal Generalization: If P(c) is true for any arbitrary element c, conclude For all x P(x).
Universal Instantiation (UI): From For all x P(x), infer P(c) for any constant c.
Existential Instantiation: From There exists x P(x), infer P(c) for a new constant c. Applied only once.
Existential Introduction: From P(c), infer There exists x P(x).
Unification
Unification is the process of making two different logical atomic expressions identical by finding a
substitution. The substitution variables are called the Most General Unifier (MGU). Conditions: same
predicate symbol, same number of arguments, no two similar variables in the same expression.
PART 9: THE WUMPUS WORLD
Overview
The Wumpus World is a simple world example used to illustrate the worth of a knowledge-based agent
and to represent knowledge representation. Inspired by the video game 'Hunt the Wumpus' by Gregory
Yob in 1973.
Rules of the Wumpus World
• The cave has 4x4 rooms (16 total) connected with passageways.
• A knowledge-based agent navigates the cave.
• There is a Wumpus (beast) that eats anyone entering its room. The agent has one arrow to shoot it.
• There are bottomless Pits — falling in means stuck forever.
• There is gold in one room. The agent's goal is to find the gold and climb out safely.
• Note: The Wumpus is STATIC and cannot move.
• Navigation clues: Rooms adjacent to Wumpus have STENCH. Rooms adjacent to Pits have
BREEZE.
• The agent starts at position (1,1).
PART 10: PATTERN RECOGNITION
What is Pattern Recognition?
Pattern recognition is the automated recognition of patterns and regularities in data. Applications:
statistical data analysis, signal processing, image analysis, information retrieval, bioinformatics, data
compression, computer graphics, and machine learning. It originated in engineering and statistics.
In machine learning, pattern recognition is the assignment of a label to a given input value. A pattern is
comprised of two fundamental things: Collection of observations, and the concept behind the observation.
Types of Output in Pattern Recognition
Classification: Assigns each input to one of a given set of classes.
Regression: Assigns a real-valued output to each input.
Sequence Labeling: Assigns a class to each member of a sequence (e.g., part of speech tagging).
Parsing: Assigns a parse tree to an input sentence describing syntactic structure.
Basic Principles and Design Considerations
Feature Representation: How data is represented is critical — features must capture the underlying
structure.
Similarity Measure: Compares similarity between two data points.
Model Selection: Choosing the appropriate model (linear, nonlinear, probabilistic) for the problem.
Evaluation: Assessing performance using appropriate metrics and datasets.
Pre-processing: Cleaning, scaling, or transforming data to make it suitable for analysis.
Feature Selection: Selecting the most relevant features to improve performance and reduce complexity.
Training and Learning in Pattern Recognition
Supervised Learning: A labeled training dataset is provided. The algorithm learns to generalize to new
data. Used in classification.
Unsupervised Learning: No labeled data. Finds inherent patterns in data. The unsupervised equivalent
of classification is Clustering.
Semi-supervised Learning: Combines labeled and unlabeled data (small labeled set + large unlabeled
set).
Training Set vs Testing Set
Training Set (80%): Used to build the model. Training rules and algorithms give relevant information on
how to associate input data with output decisions.
Testing Set (20%): Used to verify whether the system produces correct output after training. Measures
the accuracy of the system.
Applications of Pattern Recognition
• Image processing, segmentation, and analysis
• Computer vision (biological and biomedical imaging)
• Seismic analysis
• Radar signal classification/analysis (e.g., AP mine detection)
• Speech recognition
• Fingerprint identification
Advantages of Pattern Recognition
• Solves classification problems
• Solves the problem of fake biometric detection
• Useful for cloth pattern recognition for visually impaired people
• Helps in speaker diarization
• Can recognize objects from different angles
Disadvantages of Pattern Recognition
• Syntactic pattern recognition approach is complex and very slow
• Sometimes a larger dataset is required for better accuracy
• Cannot explain why a particular object is recognized
100 MULTIPLE CHOICE QUESTIONS WITH ANSWERS
SECTION A: Introduction to AI (Q1–Q15)
Q1. What is Artificial Intelligence?
A) A branch of mathematics concerned with computation
B) A branch of Computer Science through which intelligent machines are created that can behave and
think like humans
C) A programming language for building robots
D) A type of database management system
Answer: B
Q2. Which of the following is NOT a reason for developing AI?
A) To combat human errors and inefficiencies
B) To replace all human beings in the workforce permanently
C) To enhance human productivity
D) To facilitate human interaction with machines
Answer: B
Q3. Narrow AI is best described as:
A) AI that surpasses human intelligence
B) AI that can perform any intellectual task with human efficiency
C) AI that is trained for and can perform a specific dedicated task
D) AI with self-awareness and consciousness
Answer: C
Q4. Which type of AI is considered hypothetical and not yet achieved?
A) Narrow AI
B) General AI
C) Super AI
D) Both B and C
Answer: D
Q5. Reactive Machines in AI:
A) Store memories for future use
B) Understand human emotions
C) Only focus on current scenarios and react without storing past experiences
D) Have self-awareness
Answer: C
Q6. A self-driving car is an example of which type of AI by functionality?
A) Reactive Machine
B) Limited Memory
C) Theory of Mind
D) Self-Awareness
Answer: B
Q7. Which of the following is an advantage of AI?
A) No original creativity
B) Over-dependency slows human intellect
C) High accuracy with less error because it takes decisions from pre-experiences
D) It is very expensive
Answer: C
Q8. Which of the following is NOT an application of AI?
A) Astronomy
B) Manufacturing paper manually
C) Healthcare diagnosis
D) Robotics
Answer: B
Q9. What are the goals of AI? Select the most complete answer.
A) To replicate human intelligence and solve knowledge-intensive tasks
B) Only to build robots
C) To replace programming languages
D) To increase internet speed
Answer: A
Q10. AI exists when:
A) A machine executes code
B) A machine can have human-based skills like learning, reasoning, and problem-solving
C) A computer connects to the internet
D) A database stores information
Answer: B
Q11. Theory of Mind AI:
A) Is the most basic type of AI
B) Can store data for a short period
C) Understands human emotions and is able to interact socially like human beings
D) Has already been fully developed
Answer: C
Q12. Which is a disadvantage of AI?
A) High speed
B) High reliability
C) It cannot think outside the box and lacks genuine creativity
D) Useful for risky environments
Answer: C
Q13. The simulation of human intelligence into machines to solve problems defines:
A) Machine Learning only
B) Artificial Intelligence
C) Data Science
D) Computer Graphics
Answer: B
Q14. Type 2 classification of AI is based on:
A) Capabilities
B) Functionalities
C) Cost
D) Speed
Answer: B
Q15. Self-Awareness AI is considered:
A) The most basic type of AI
B) Already commercially available
C) The future of Artificial Intelligence
D) Equivalent to Narrow AI
Answer: C
SECTION B: Agents in AI (Q16–Q30)
Q16. An agent in AI is best described as:
A) Any piece of software
B) Anything that perceives its environment through sensors and acts through actuators
C) Only a robotic physical machine
D) A database program
Answer: B
Q17. PEAS stands for:
A) Pattern, Execution, Accuracy, Speed
B) Performance measure, Environment, Actuators, Sensors
C) Perception, Evaluation, Action, System
D) Processing, Encoding, Analysis, Storage
Answer: B
Q18. Which component converts energy into motion and controls a system?
A) Sensor
B) Knowledge Base
C) Actuator
D) Inference Engine
Answer: C
Q19. The cycle an agent runs in is:
A) Input -> Output -> Reset
B) Perceiving -> Thinking -> Acting
C) Learning -> Forgetting -> Relearning
D) Reading -> Writing -> Executing
Answer: B
Q20. A Simple Reflex Agent:
A) Stores complete memory of the environment
B) Takes decisions based only on current percepts and ignores history
C) Is goal-directed and plans ahead
D) Provides utility measurements
Answer: B
Q21. The Model-Based Reflex Agent can work in:
A) Fully observable environments only
B) No observable environments
C) Partially observable environments by tracking the situation
D) Virtual environments only
Answer: C
Q22. Which agent type additionally knows its goal describing the desirable situation?
A) Simple Reflex Agent
B) Model-Based Reflex Agent
C) Goal-Based Agent
D) Learning Agent
Answer: C
Q23. The Utility-Based Agent differs from the Goal-Based Agent by:
A) Having no sensors
B) Providing extra utility measurements assessing how well the goal is achieved
C) Operating without actuators
D) Storing no knowledge
Answer: B
Q24. The Learning Agent's four conceptual components include all EXCEPT:
A) Learning Element
B) Critic
C) Problem Generator
D) Sensor Array
Answer: D
Q25. What is a Rational Agent?
A) An agent that refuses to act
B) An agent that acts to maximize its performance measures with all possible actions
C) An agent that only follows pre-programmed rules
D) An agent with no learning capability
Answer: B
Q26. In reinforcement learning for a rational agent:
A) Every action gives the same reward
B) Correct actions give positive rewards; wrong actions give negative rewards
C) No rewards are given
D) All rewards are negative
Answer: B
Q27. For a vacuum cleaner in PEAS, the Performance measure is:
A) Wheels and brushes
B) Room, child, obstacles
C) Engine, camera, bump sensor
D) Cleanliness
Answer: D
Q28. The architecture of an AI agent is:
A) The agent program
B) The machinery that the agent executes on
C) The knowledge base
D) The inference system
Answer: B
Q29. Which type of agent is useful when there are many possible alternatives?
A) Simple Reflex Agent
B) Model-Based Agent
C) Goal-Based Agent
D) Utility-Based Agent
Answer: D
Q30. The Problem Generator component in a Learning Agent is responsible for:
A) Selecting external actions
B) Taking feedback from the environment
C) Making improvement by learning
D) Actions that lead to new and informative experiences
Answer: D
SECTION C: Search Algorithms (Q31–Q45)
Q31. Search in AI is best defined as:
A) Looking up information in a database
B) A step-by-step procedure to solve a search problem in a given search space
C) Internet searching
D) Comparing two algorithms
Answer: B
Q32. Which is NOT one of the three main factors of a search problem?
A) Search Space
B) Start State
C) Goal Test
D) Memory Size
Answer: D
Q33. A Search Tree's root node corresponds to:
A) The goal state
B) The final solution
C) The initial state
D) The deepest node
Answer: C
Q34. A search algorithm is said to be complete if:
A) It finds all solutions
B) It guarantees to return a solution if one exists
C) It runs in constant time
D) It uses minimal memory
Answer: B
Q35. Uninformed (Blind) Search:
A) Uses domain knowledge extensively
B) Uses heuristic functions
C) Does not contain domain knowledge and operates in a brute-force way
D) Only works on trees, not graphs
Answer: C
Q36. Breadth-First Search (BFS):
A) Traverses to the deepest node first
B) Searches breadth-wise, expanding all nodes at the current level before going deeper
C) Only works on weighted graphs
D) Uses a stack data structure
Answer: B
Q37. What data structure does Depth-First Search use?
A) Queue
B) Priority Queue
C) Stack
D) Array
Answer: C
Q38. Depth-Limited Search solves the problem of:
A) Memory inefficiency in BFS
B) Infinite loops in DFS
C) Weighted path traversal
D) Multi-agent environments
Answer: B
Q39. Uniform Cost Search is used for:
A) Unweighted graphs only
B) Finding the shortest path regardless of cost
C) Traversing a weighted tree/graph with the lowest cumulative path cost
D) Depth-limited exploration
Answer: C
Q40. Iterative Deepening DFS combines benefits of:
A) UCS and A*
B) BFS and DFS in terms of fast search and memory efficiency
C) DFS and Greedy
D) BFS and UCS
Answer: B
Q41. A Heuristic Function in informed search:
A) Finds the exact cost to the goal
B) Takes the current state as input and estimates how close the agent is to the goal
C) Is used only in uninformed search
D) Replaces the transition model
Answer: B
Q42. The Best First Search (Greedy) algorithm:
A) Is always optimal
B) Always selects the path that appears best at that particular moment
C) Never gets stuck in a loop
D) Uses a stack data structure
Answer: B
Q43. A* Algorithm is unique because:
A) It uses only the heuristic function
B) It uses only the path cost
C) It uses both the heuristic function and cost to reach the node from start
D) It does not maintain an open list
Answer: C
Q44. An Optimal Solution is:
A) The first solution found
B) The solution with the highest cost
C) The solution with the lowest cost among all solutions
D) Any complete solution
Answer: C
Q45. Space Complexity in search algorithms refers to:
A) Time taken by the algorithm
B) The maximum storage space required at any point within the search
C) The number of nodes in the search tree
D) The branching factor
Answer: B
SECTION D: Knowledge Representation (Q46–Q60)
Q46. The Knowledge Base in a knowledge-based agent is:
A) The sensor of the agent
B) A collection of sentences in a knowledge representation language storing facts about the world
C) The actuator component
D) The search algorithm
Answer: B
Q47. The Inference System in AI:
A) Stores facts permanently
B) Applies logical rules to the knowledge base to deduce new information
C) Controls the agent's physical actuators
D) Generates random outputs
Answer: B
Q48. Knowledge Representation is responsible for:
A) Controlling hardware
B) Representing information about the real world so computers can understand and use it
C) Compiling code
D) Storing user passwords
Answer: B
Q49. Procedural Knowledge is also known as:
A) Declarative Knowledge
B) Heuristic Knowledge
C) Imperative Knowledge
D) Meta Knowledge
Answer: C
Q50. Which type of knowledge is 'knowledge of some expert about a field or subject'?
A) Declarative Knowledge
B) Procedural Knowledge
C) Structural Knowledge
D) Heuristic Knowledge
Answer: D
Q51. Inferential Adequacy in a KR system means:
A) The ability to represent all kinds of required knowledge
B) The ability to acquire new knowledge automatically
C) The ability to manipulate representational structures to produce new knowledge
D) The ability to store data
Answer: C
Q52. Acquisitional Efficiency means:
A) The ability to direct the inferential mechanism productively
B) The ability to acquire new knowledge easily using automatic methods
C) The ability to represent all knowledge types
D) The ability to perform logical inference
Answer: B
Q53. Semantic Network Representation uses:
A) Tables with rows and columns
B) If-then rules
C) Graphical networks with nodes representing objects and arcs describing relationships
D) Logical expressions only
Answer: C
Q54. Frame Representation is also known as:
A) Production rule system
B) Semantic network
C) Slot-filter knowledge representation
D) First-order logic
Answer: C
Q55. In Production Rules, a Conflict Set occurs when:
A) Only one rule fires
B) No rules are applicable
C) A new situation generates and multiple production rules fire together
D) The knowledge base is empty
Answer: C
Q56. The Declarative Approach to designing a knowledge-based agent involves:
A) Directly encoding desired behavior as program code
B) Initializing with an empty knowledge base and telling it all sentences to use
C) Using only production rules
D) Building semantic networks manually
Answer: B
Q57. Which is a drawback of Semantic Network Representation?
A) It is not a natural representation of knowledge
B) It takes more computational time and lacks standard quantifiers
C) It cannot represent any relationships
D) It requires physical hardware
Answer: B
Q58. Inheritable Knowledge requires:
A) Data stored in random locations
B) All data stored in inheritable classes in hierarchical order
C) Only procedural rules
D) No class structure
Answer: B
Q59. The AI Knowledge Cycle is:
A) Input -> Processing -> Output
B) Perception -> Learning -> Knowledge Representation and Reasoning -> Planning -> Execution
C) Collection -> Storage -> Retrieval
D) Sensing -> Acting -> Resting
Answer: B
Q60. In Frame Representation, Facets are:
A) The types of sensors used
B) The various aspects of a slot that enable constraints on the frames
C) The top-level categories in the hierarchy
D) The rules in a production system
Answer: B
SECTION E: Propositional Logic and Inference Rules (Q61–Q80)
Q61. Propositional Logic is also called:
A) Predicate Logic
B) Boolean Logic, Propositional Calculus, or Sentential Logic
C) Frame Logic
D) Semantic Logic
Answer: B
Q62. A proposition formula which is always true is called:
A) Contradiction
B) Contingency
C) Tautology
D) Theorem
Answer: C
Q63. A proposition formula which is always false is called:
A) Tautology
B) Contingency
C) Contradiction
D) Negation
Answer: C
Q64. Which of the following is NOT a proposition?
A) '2+2 is 4'
B) 'The Sun is cold'
C) 'Where is Rohini?'
D) '5 is a prime number'
Answer: C
Q65. The conjunction (P ^ Q) is true when:
A) P is true and Q is false
B) P is false and Q is true
C) Both P and Q are false
D) Both P and Q are true
Answer: D
Q66. The disjunction (P v Q) is false only when:
A) Both P and Q are true
B) P is true and Q is false
C) Both P and Q are false
D) P is false and Q is true
Answer: C
Q67. The implication (P -> Q) is false only when:
A) P is false and Q is true
B) P is true and Q is false
C) Both are true
D) Both are false
Answer: B
Q68. A -> B is logically equivalent to:
A) A ^ B
B) ~A ^ B
C) ~A v B
D) A v ~B
Answer: C
Q69. Precedence order of connectives (highest to lowest):
A) Negation, Parenthesis, Conjunction, Disjunction, Implication, Biconditional
B) Parenthesis, Negation, Conjunction, Disjunction, Implication, Biconditional
C) Implication, Biconditional, Conjunction, Disjunction, Negation, Parenthesis
D) Biconditional, Implication, Disjunction, Conjunction, Negation, Parenthesis
Answer: B
Q70. The Contrapositive of P -> Q is:
A) Q -> P
B) ~P -> ~Q
C) ~Q -> ~P
D) P ^ ~Q
Answer: C
Q71. The Converse of P -> Q is:
A) ~Q -> ~P
B) Q -> P
C) ~P -> ~Q
D) P ^ Q
Answer: B
Q72. Two propositions are logically equivalent when:
A) They have different truth values
B) The columns in the truth table are identical to each other
C) One implies the other but not vice versa
D) They share the same variables
Answer: B
Q73. A limitation of Propositional Logic is:
A) It is too complex to evaluate
B) It cannot represent relations like OR, SOME, NONE (e.g., 'All girls are intelligent')
C) It has too many connectives
D) It cannot handle tautologies
Answer: B
Q74. Modus Ponens states:
A) If ~Q is true and P->Q is true, then ~P is true
B) If P is true and P->Q is true, then Q is true
C) If PvQ and ~P, then Q
D) If P^Q then Q
Answer: B
Q75. Modus Tollens states:
A) If P is true and P->Q is true, then Q is true
B) If P->Q is true and ~Q is true, then ~P is true
C) If PvQ and ~P, then Q
D) If P^Q then Q
Answer: B
Q76. Hypothetical Syllogism states:
A) If PvQ and ~P, then Q
B) If P is true then PvQ is true
C) If P->Q is true and Q->R is true, then P->R is true
D) If P->Q and ~Q, then ~P
Answer: C
Q77. Disjunctive Syllogism states:
A) If P->Q and P, then Q
B) If PvQ is true and ~P is true, then Q is true
C) If P^Q then Q
D) If P->Q and Q->R, then P->R
Answer: B
Q78. The Addition rule of inference states:
A) If P^Q then P
B) If P->Q and ~Q then ~P
C) If P is true, then PvQ will be true
D) If PvQ and ~P^R, then QvR
Answer: C
Q79. The Resolution rule states:
A) If P^Q is true then Q is true
B) If P is true then PvQ is true
C) If PvQ and ~P^R is true, then QvR is also true
D) If P->Q and Q->R then P->R
Answer: C
Q80. In a biconditional (P <=> Q), the result is True when:
A) P is true and Q is false
B) P is false and Q is true
C) P and Q have the same truth value (both true or both false)
D) At least one of P or Q is true
Answer: C
SECTION F: First-Order Logic and Pattern Recognition (Q81–Q100)
Q81. First-Order Logic is also known as:
A) Boolean Logic
B) Predicate Logic or First-Order Predicate Logic
C) Frame Logic
D) Propositional Calculus
Answer: B
Q82. FOL is needed because:
A) Propositional logic is too powerful
B) Propositional logic cannot represent complex sentences like 'Some humans are intelligent'
C) FOL has fewer connectives
D) FOL is simpler than propositional logic
Answer: B
Q83. The Universal Quantifier (For all) is read as:
A) There exists
B) For some
C) For all / For each / For every
D) At least one
Answer: C
Q84. The Existential Quantifier is used with which main connective?
A) Implication ->
B) Negation ~
C) AND / Conjunction ^
D) Biconditional <=>
Answer: C
Q85. 'Some boys are intelligent' in FOL is written as:
A) For all x: boys(x) -> intelligent(x)
B) There exists x: boys(x) ^ intelligent(x)
C) ~For all x: boys(x)
D) For all x: boys(x) ^ intelligent(x)
Answer: B
Q86. 'All birds fly' in FOL is written as:
A) There exists x: bird(x) -> fly(x)
B) For all x: bird(x) -> fly(x)
C) There exists x: bird(x) ^ fly(x)
D) ~For all x: bird(x)
Answer: B
Q87. A Free Variable in FOL is one that:
A) Occurs within the scope of the quantifier
B) Is bound to a constant
C) Occurs outside the scope of the quantifier
D) Is always universally quantified
Answer: C
Q88. Universal Instantiation allows us to:
A) Infer For all x P(x) from P(c)
B) Infer P(c) by substituting a ground term for a variable in For all x P(x)
C) Replace existential sentences
D) Introduce existential quantifiers
Answer: B
Q89. Existential Instantiation can be applied:
A) Multiple times on the same sentence
B) Only to universal sentences
C) Only once to replace the existential sentence
D) Unlimited times
Answer: C
Q90. Unification in FOL:
A) Splits two expressions apart
B) Makes two different logical atomic expressions identical by finding a substitution
C) Converts FOL to propositional logic
D) Eliminates quantifiers
Answer: B
Q91. The MGU stands for:
A) Multiple Goal Unifier
B) Most General Unifier
C) Minimal Graph Unit
D) Model Generalization Update
Answer: B
Q92. Knowledge Engineering is:
A) The process of building robots
B) The process of constructing a knowledge base in first-order logic
C) The design of search algorithms
D) The training of neural networks
Answer: B
Q93. In the Wumpus World, the agent's goal is:
A) To kill the Wumpus
B) To find the gold and climb out without falling into Pits or being eaten
C) To map all 16 rooms
D) To shoot all arrows
Answer: B
Q94. In the Wumpus World, Stench indicates:
A) There is gold nearby
B) A pit is adjacent
C) The Wumpus room is adjacent
D) A breeze is detected
Answer: C
Q95. Pattern Recognition is:
A) Finding patterns in source code
B) The automated recognition of patterns and regularities in data
C) A manual classification process
D) A type of database query
Answer: B
Q96. Supervised Learning in Pattern Recognition assumes:
A) No labeled data is available
B) A set of training data with correctly labeled instances has been provided
C) The algorithm works by trial and error only
D) No training is required
Answer: B
Q97. Clustering is the unsupervised equivalent of:
A) Regression
B) Parsing
C) Classification
D) Sequence labeling
Answer: C
Q98. The Feature Vector in pattern recognition is:
A) A scalar value
B) A d-dimensional column vector formed by taking a set of features together
C) A single measurement
D) A label assigned to a class
Answer: B
Q99. Generally, what percentage of a dataset is used for training?
A) 50%
B) 60%
C) 80%
D) 90%
Answer: C
Q100. Which of the following is a real-time application of Pattern Recognition?
A) Database normalization
B) Fingerprint identification
C) Sorting algorithms
D) Memory allocation
Answer: B