0% found this document useful (0 votes)
33 views12 pages

Artificial Intelligence Third Semester University Exam Paper Solution

The document discusses state space representation in AI, exemplified by chess and tic-tac-toe, and emphasizes the significance of PEAS (Performance measure, Environment, Actuators, Sensors) in AI problem-solving, particularly for automatic car drivers and oil refineries. It also defines artificial intelligence, compares human and computer intelligence, outlines primary steps in AI problem-solving, and introduces the Turing Test, along with various AI concepts and search strategies like BFS, DFS, and hill climbing. Additionally, it covers expert systems, their operations, advantages, limitations, and the role of game playing as a search problem.

Uploaded by

mtech baba
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)
33 views12 pages

Artificial Intelligence Third Semester University Exam Paper Solution

The document discusses state space representation in AI, exemplified by chess and tic-tac-toe, and emphasizes the significance of PEAS (Performance measure, Environment, Actuators, Sensors) in AI problem-solving, particularly for automatic car drivers and oil refineries. It also defines artificial intelligence, compares human and computer intelligence, outlines primary steps in AI problem-solving, and introduces the Turing Test, along with various AI concepts and search strategies like BFS, DFS, and hill climbing. Additionally, it covers expert systems, their operations, advantages, limitations, and the role of game playing as a search problem.

Uploaded by

mtech baba
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/ 12

1. What is state space representation?

Explain the state space representation for


chess and tic tac toe. Discuss the significance of PEAS in AI problem solving.
Elaborate PEAS for automatic car driver and for an oil refinery. Plan which is
automated?

State Space Representation:


State space representation is a fundamental concept in AI, used to model a problem by
defining all possible states, transitions, and actions to achieve a goal. It consists of:

1. States: Configurations of the system.


2. Actions: Operations that move from one state to another.
3. Goal State: Desired final configuration.

Chess:

 States: Board positions with the arrangement of pieces.


 Actions: Legal moves for each piece.
 Goal: Checkmating the opponent.
 Chess has an enormous state space due to the complex combinations of moves and
configurations.

Tic Tac Toe:

 States: 3x3 grid with X, O, or empty spaces.


 Actions: Placing X or O in an empty cell.
 Goal: Achieving a row, column, or diagonal of three identical marks.
 The state space is smaller and simpler compared to chess.

Significance of PEAS in AI Problem Solving:


PEAS (Performance measure, Environment, Actuators, Sensors) defines the framework of an
AI agent by specifying its purpose and interaction with the environment.

PEAS Examples:

1. Automatic Car Driver:


o Performance: Safe driving, timely arrival, fuel efficiency.
o Environment: Roads, traffic, weather.
o Actuators: Steering, accelerator, brakes.
o Sensors: Cameras, radars, GPS.
2. Oil Refinery:
o Performance: Maximizing yield, maintaining safety, cost efficiency.
o Environment: Refinery setup, raw materials, market demand.
o Actuators: Valves, heaters, compressors.
o Sensors: Temperature, pressure gauges, flow meters.

Plan Automation: AI agents follow structured plans based on predefined rules or adaptive
learning to handle tasks dynamically in complex environments.
2. (a) Define artificial intelligence. Mention its areas of application. Compare
between human and computer intelligence.

Artificial Intelligence (AI):


Artificial Intelligence is the simulation of human intelligence by machines, enabling them to
perform tasks such as learning, reasoning, problem-solving, perception, and language
understanding.

Areas of Application:

 Healthcare: Diagnosis, drug discovery, robotic surgeries.


 Finance: Fraud detection, algorithmic trading, risk assessment.
 Education: Personalized learning, virtual tutors.
 Transportation: Autonomous vehicles, traffic management.
 Entertainment: Gaming, recommendation systems.

Comparison Between Human and Computer Intelligence:

Aspect Human Intelligence Computer Intelligence


Learns from experience and
Learning Learns from data and algorithms.
intuition.
Creativity Highly creative and imaginative. Limited to programmed creativity.
Slower in calculations and data
Speed Processes millions of tasks quickly.
analysis.
Adapts to complex, changing Limited adaptability based on
Adaptability
situations. programming.
Emotion Emotional and empathetic. Lacks emotions and consciousness.

(b) Discuss the primary steps in problem solving with Al. Elaborate with an example.

Primary Steps in Problem Solving with AI:

1. Define the Problem: Identify the goal and constraints.


2. Formulate the Problem: Represent it using state space, initial state, goal state, and
operators.
3. Choose a Search Strategy: Select techniques like BFS, DFS, or heuristic-based
algorithms.
4. Execute the Strategy: Apply the chosen algorithm to find solutions.
5. Evaluate the Solution: Verify correctness and efficiency.

Example:
In a maze-solving robot:

 Define: Find the exit.


 Formulate: Represent the maze as nodes and paths.
 Search: Use BFS for the shortest path.
 Execute: Traverse nodes.
 Evaluate: Ensure the shortest route to the exit
3. (a) Describe Turing Test. If the turing test is passed does this show that computer's
exhibit intelligence? State your reasons. What advances do you think to be made
in order for the turing test to be passed by a machine?

Turing Test:
Proposed by Alan Turing in 1950, the Turing Test evaluates a machine's ability to exhibit
human-like intelligence. A human evaluator interacts with a machine and a human through
text-based communication. If the evaluator cannot reliably distinguish between the two, the
machine is said to have passed the test.

Does Passing the Turing Test Prove Intelligence?


Passing the test indicates the machine's ability to mimic human behavior but does not
necessarily prove true intelligence or understanding. It reflects effective programming rather
than consciousness, creativity, or emotional intelligence.

Advances Needed to Pass the Turing Test:

1. Improved Natural Language Processing (NLP) for nuanced conversation.


2. Enhanced Contextual Understanding to handle complex or abstract topics.
3. Better Learning Algorithms for adaptability.
4. Integration of Emotional Intelligence to simulate empathy.
5. General AI Development to mimic human reasoning and problem-solving.

These advancements would bring machines closer to exhibiting human-like interaction.

(b) Define the following Agent, Agent function, Agent program rationality and Reflex
agent.

Agent: An agent is an entity that perceives its environment through sensors and acts upon it
using actuators to achieve a goal.

Agent Function: It maps percept sequences (inputs from sensors) to actions, defining the
behavior of the agent in response to its environment.

Agent Program: The implementation of the agent function as code or algorithms that dictate
how an agent processes inputs and determines actions.

Rationality: A rational agent performs actions that maximize its performance measure based
on its knowledge and percept history.

Reflex Agent: A simple agent that selects actions solely based on the current percept, without
considering history or future implications.
4. (a) Compare and contrast breadth first search strategy with depth first search
strategy. Suggest some applications to which each is best suited.

Breadth-First Search (BFS):


BFS explores all nodes at the current depth before moving to the next level. It uses a queue
and guarantees finding the shortest path in unweighted graphs but requires significant
memory for large graphs.

Depth-First Search (DFS):


DFS explores as far as possible along one branch before backtracking. It uses a stack (or
recursion) and is memory-efficient but may not find the shortest path and can get stuck in
infinite loops in cyclic graphs without a cutoff.

Comparison:

 Time Complexity: Both are O(V+E), where V = vertices, E = edges.


 Space Complexity: BFS requires more memory than DFS.
 Path Optimality: BFS finds the shortest path; DFS does not guarantee it.

Applications:

 BFS: Shortest path finding (e.g., social networks, unweighted mazes).


 DFS: Solving puzzles (e.g., mazes, Sudoku), topological sorting, and detecting cycles
in graphs.

(b) Prove each of the following:

(i) BFS as a Special Case of Uniform-Cost Search:


Uniform-Cost Search (UCS) explores nodes in order of path cost. BFS is a special case where
all edges have equal cost (e.g., 1), making UCS expand nodes level by level, like BFS.

(ii) UCS as a Special Case of A Search*:


A* search uses f(n)=g(n)+h(n)f(n) = g(n) + h(n)f(n)=g(n)+h(n), where g(n)g(n)g(n) is path
cost and h(n)h(n)h(n) is the heuristic. UCS is a special case of A* when h(n)=0h(n) =
0h(n)=0, focusing solely on path cost.

(iii) BFS, DFS, UCS as Special Cases of Best-First Search:


Best-First Search selects nodes based on an evaluation function f(n)f(n)f(n).

 BFS: f(n)=f(n) =f(n)= depth.


 DFS: f(n)=f(n) =f(n)= stack order.
 UCS: f(n)=g(n)f(n) = g(n)f(n)=g(n), path cost.
5. Explain hill climbing search strategy and write its algorithm. Explain the
difficulties like local maximum, plateau, ridge etc. Aslo explain its advantages also.

Hill Climbing Search Strategy:


Hill climbing is a local search algorithm that iteratively moves toward a solution by selecting
the neighbor with the highest evaluation (fitness) value. It is analogous to climbing a hill,
seeking the highest peak based on local information, without backtracking.

Algorithm:

1. Initialize the current state.


2. Evaluate neighboring states.
3. Move to the neighbor with the highest value.
4. Repeat until no better neighbors exist (local maximum or goal).

Challenges:

1. Local Maximum: A peak lower than the global maximum. The algorithm stops
prematurely.
2. Plateau: A flat region where all neighbors have equal value, causing stagnation.
3. Ridges: Narrow pathways to higher peaks that require multiple steps in a specific
direction, which hill climbing cannot handle efficiently.

Advantages:

 Simple and easy to implement.


 Requires minimal memory.
 Efficient for problems with a smooth search space.

Overcoming Challenges:

 Random Restarts: Restart the algorithm from random points to escape local maxima.
 Simulated Annealing: Allow occasional moves to worse states to explore a broader
search space.
 Stochastic Hill Climbing: Randomly choose among uphill moves instead of the
steepest one.

Applications:
Hill climbing is effective in optimization problems like job scheduling, route planning, and
function optimization where global search techniques are infeasible.

By refining its implementation and combining it with other methods, the limitations can be
mitigated, making it a practical approach for various scenarios.
6. (a) What is passing? Explain the various parsing techniques in brief?

Passing refers to the process of analyzing a string of symbols (typically source code) to
determine its grammatical structure according to a formal grammar. Parsing is essential in
compilers and interpreters to understand code syntax.

Parsing techniques:

1. Top-down Parsing: Starts from the root and tries to derive the string. Examples:
Recursive descent, LL parsing.
2. Bottom-up Parsing: Begins from the leaves (input symbols) and reduces them to the
start symbol. Examples: LR parsing, SLR.
3. LL Parsing: Left-to-right scan, left-most derivation.
4. LR Parsing: Left-to-right scan, right-most derivation.

(b) Differentiate between the following:

(i) Declarative vs Procedural Knowledge:

 Declarative Knowledge refers to factual information or "knowing that." It is explicit


and can be easily stated or described, such as facts, concepts, and rules. Examples
include knowing that Paris is the capital of France or understanding the Pythagorean
theorem.
 Procedural Knowledge refers to "knowing how" to do something. It involves skills,
actions, or processes and is often implicit. For example, knowing how to ride a bike or
solve a mathematical equation represents procedural knowledge.

(ii) Domain-Specific vs Domain-Independent Knowledge:

 Domain-Specific Knowledge is specialized knowledge pertaining to a particular field


or subject. It includes detailed facts, principles, and techniques relevant to that
domain. Examples include medical knowledge, legal systems, or financial concepts.
 Domain-Independent Knowledge is general knowledge applicable across various
domains. It includes cognitive strategies, problem-solving techniques, and broad
concepts like reasoning, critical thinking, or general mathematical principles that can
be used in multiple contexts.
7. What do you mean by first order predicate logic ?

Write the basic syntac c elements used in first order logic. Explain the quan fiers
used in first order logic by giving example explain nested quan fiers.

Differen ate between proposi onal logic and predicate logic. Represent the
following statements in logic:

(a) Some employees are sick today

(b) No employees earns more than President of India.

(c) All employees earning 4 Lakh or more in a year pay taxes

First-order Predicate Logic (FOL) is an extension of propositional logic that allows for
more expressive reasoning about objects and their relationships. It deals with predicates,
quantifiers, and variables to express complex statements about individuals and their
properties. FOL is foundational for computer science, artificial intelligence, and formal
reasoning systems. It can represent statements like "All humans are mortal" or "There exists a
person who is taller than John."

Basic Syntactic Elements of First-Order Logic

1. Constants: Represent specific objects in the domain (e.g., John, 2).


2. Variables: Stand for arbitrary elements in the domain (e.g., x, y).
3. Predicates: Represent properties or relations of objects (e.g., Likes(x, y) or
IsStudent(x)).
4. Functions: Map objects to objects (e.g., FatherOf(x)).
5. Logical connectives: Like AND (∧), OR (∨), NOT (¬), and IMPLIES (→).
6. Quantifiers: Express the extent of the claim (universal or existential).
8. Define expert system. Compare a human expert with an artificial expert system.
With the help of a block diagram explain the operations of an expert system. Write
the main advantages in keeping the knowledge base separate from the control
module in knowledge-based system. Elaborate the advantages and limitations of
an expert system.

An Expert System is a computer program designed to mimic the decision-making abilities of


a human expert in a specific domain. It uses a knowledge base of facts and rules, along with
an inference engine, to solve complex problems and provide expert-level solutions in areas
such as medicine, engineering, and finance. Expert systems aim to replicate human expertise
and provide reasoning, diagnosis, and problem-solving capabilities in specialized areas.

Comparison: Human Expert vs Artificial Expert System

 Human Expert:
o Experience-based: Relies on years of experience and intuition.
o Flexible: Can handle ambiguous situations and adapt to new information.
o Emotional intelligence: Capable of understanding the emotional and
psychological aspects of a problem.
 Artificial Expert System:
o Knowledge-based: Relies on explicitly defined rules and data.
o Consistency: Performs consistently without fatigue or emotional bias.
o Limited flexibility: Can only handle situations within its programmed
knowledge base and defined rules.

Operations of an Expert System

The operations of an expert system can be explained with the following block diagram:

1. Knowledge Base: Stores domain-specific knowledge in the form of rules, facts, and
relationships.
2. Inference Engine: Processes the knowledge base and applies logical reasoning to
draw conclusions or make decisions based on user input.
3. User Interface: Allows users to interact with the system, providing data and
receiving output.
4. Knowledge Acquisition: Mechanism for adding or updating knowledge in the
system.
5. Explanation System: Provides a rationale for the system’s conclusions or
recommendations.

Advantages of Separating Knowledge Base from Control Module

 Maintainability: Changes to the knowledge base can be made without altering the
control structure.
 Scalability: New knowledge can be added without modifying the overall system
architecture.
 Flexibility: The system can be easily updated, and different knowledge bases can be
plugged into the same control module.
 Modularity: Easier to manage and test components separately.
Advantages of Expert Systems

1. Consistency: Provides consistent advice, avoiding human error.


2. Availability: Can operate 24/7, unlike human experts.
3. Efficiency: Quickly processes information and delivers decisions.
4. Knowledge Preservation: Retains expert knowledge even after the expert’s
retirement.

Limitations of Expert Systems

1. Limited Knowledge Scope: Restricted to the domain defined in the knowledge base.
2. No Intuition: Cannot mimic human intuition or emotional intelligence.
3. Complexity in Knowledge Acquisition: Gathering and codifying knowledge from
human experts can be time-consuming and difficult.
4. High Initial Cost: Developing an expert system requires significant resources for
knowledge base creation and system development.

9. (a) Why is game playing defined as search problem? Illustrate minimax search
procedure with example. Also write its limitation.

Game Playing as a Search Problem

Game playing is considered a search problem because, in a game, the objective is to explore
different possible moves (states) from a given position, considering future outcomes, until an
optimal decision is found. Each possible move represents a state, and each subsequent set of
moves forms a tree of possibilities, which can be searched using various algorithms to
determine the best course of action. The goal is to find the most optimal path (winning
strategy) given the rules of the game.

Minimax Search Procedure

The minimax algorithm is a decision-making algorithm used in two-player, zero-sum games


like chess or tic-tac-toe. It assumes that both players act optimally, with one player aiming to
maximize their score and the other aiming to minimize it.

Steps in Minimax:

1. Generate the Game Tree: List all possible moves from the current state.
2. Assign values to terminal nodes (leaf nodes) based on the outcome of the game (win,
lose, or draw).
3. Backpropagate values: Starting from the terminal nodes, backpropagate values up
the tree. At each level, if it's the maximizing player's turn, take the maximum value; if
it's the minimizing player's turn, take the minimum value.
4. Choose the optimal move: The root node's value determines the best move for the
current player.
Example:
For a simple game tree, consider a tree where the maximizing player aims for the highest
value (e.g., a win), and the minimizing player aims for the lowest value (e.g., a loss). After
evaluating the leaves and propagating values, the algorithm will choose the move with the
optimal value for the maximizing player.

Limitations of Minimax Algorithm

1. Exponential Time Complexity: The search space grows exponentially with the depth
of the game tree, making it computationally expensive for large games.
2. No Handling of Uncertainty: Assumes both players will play optimally, which may
not always be true in real-world scenarios.
3. Not Ideal for Complex Games: In games with large state spaces (e.g., chess), the
minimax algorithm becomes impractical without optimization techniques like pruning
(alpha-beta pruning).

(b) Write a note on LISP programming.


LISP (LISt Processing) is a high-level, functional programming language developed in the
late 1950s, primarily used for artificial intelligence (AI) research. It is known for its symbolic
expression (S-expression) syntax, where code and data are represented as nested lists. LISP
supports recursion, dynamic typing, and garbage collection. Its powerful features include
symbolic computation, pattern matching, and first-class functions. Although it is less
commonly used today, LISP remains influential in AI and the development of modern
functional programming languages.

10. (a) Differentiate between the following:

(i) Tacit Knowledge vs Explicit Knowledge

 Tacit Knowledge: Personal, unstructured knowledge gained from experience. It is


hard to communicate and transfer (e.g., intuition, skills).
 Explicit Knowledge: Clearly documented, structured, and easy to transfer. It can be
written down or recorded (e.g., manuals, textbooks).

(ii) Uninformed Search vs Heuristic Search

 Uninformed Search: Searches blindly without any domain-specific knowledge (e.g.,


Breadth-First Search, Depth-First Search).
 Heuristic Search: Uses domain-specific knowledge (heuristics) to guide the search
process towards the goal more efficiently (e.g., A* Search).
(b) Analyse the following problem showing with respect to the characteristics of the
problems encountered in the field of AI:

(i) Water Jug Problem

In the Water Jug Problem, the goal is to measure a specific amount of water using two jugs
with different capacities. The problem involves finding a sequence of actions (fill, empty,
pour) that leads to the desired amount of water in one jug.

Characteristics:

1. State Space: The state is represented by the amount of water in each jug (e.g., (x, y),
where x and y are the water amounts in the two jugs). The state space is relatively
small but can increase with larger jug capacities.
2. Initial State: Both jugs are initially empty or filled to a known quantity.
3. Goal State: The goal is to reach a specific amount of water in one of the jugs.
4. Operators: The operators include filling the jugs, emptying them, and pouring water
from one jug to the other.
5. Search Type: It is an example of a problem with well-defined operators, typically
solved using uninformed search algorithms (e.g., breadth-first search).
6. Solution Path: The path to the solution involves a series of logical moves based on
mathematical reasoning.

(ii) 8-Tile Puzzle

In the 8-Tile Puzzle, the objective is to arrange the tiles from a scrambled configuration to a
goal state by sliding them into adjacent empty spaces.

Characteristics:

1. State Space: The state is represented by the arrangement of the tiles in a 3x3 grid.
There are 9! (362,880) possible states.
2. Initial State: The tiles are in a scrambled order, and the empty space is located
somewhere in the grid.
3. Goal State: The tiles are arranged in a specific order, usually with the numbers in
sequence and the empty space in the bottom-right corner.
4. Operators: The operators are sliding a tile into the adjacent empty space, which
depends on the position of the empty space.
5. Search Type: The problem requires informed search algorithms (like A* with a
heuristic), as the search space is large and requires guidance to find the most efficient
solution.
6. Solution Path: The solution is a sequence of moves that transforms the initial
scrambled configuration into the goal configuration.

You might also like