AI Answers
AI Answers
Goal: Create a system that acts to achieve the best possible outcome.
Focus: Optimal decision-making based on goals and environment.
Method: Use rationality to maximize performance measures.
Example: Self-driving cars that make decisions to reach a destination safely and
efficiently.
2. How are the intelligent systems categorized?
3. What are the various components of an AI?
1. Perception
2. Knowledge Representation
The data collected from the environment needs to be stored in a structured format.
This helps the AI system compare information, learn patterns, and make decisions.
Example: A chatbot stores previous conversations to improve its responses.
Techniques:
o Propositional Logic
o First-Order Logic
3. Learning
Learning is a crucial part of AI, enabling it to adapt and improve over time.
Types of Learning:
o Trial and Error (Unsupervised Learning): The system tries multiple actions, remembers successful
ones, and discards failures.
o Supervised Learning: The AI is trained using labeled data to generate correct outputs.
Example: A spam filter learns from emails labeled as spam or non-spam.
4. Reasoning
5. Problem Solving
4. Define rational agent and explain the concept of rationality with suitable example.
Rationality refers to the ability of an agent to make decisions that lead to the
best possible outcome or maximize its performance measure, given the
information it has.
Example,
The vacuum cleaner detects dirt in a corner (percept).
Using its knowledge base, it plans the most efficient path to clean the dirt while
avoiding obstacles.
Fully Observable: The agent has complete access to all relevant information about the environment.
Example: Chess, where the entire board is visible.
Partially Observable: The agent has limited or noisy perception of the environment.
Example: Self-driving cars, where sensors may not detect all obstacles.
Static: The environment does not change while the agent is making decisions.
Example: A Sudoku puzzle where numbers remain fixed.
Dynamic: The environment changes while the agent operates.
Example: A self-driving car navigating changing traffic.
Known: The agent has full knowledge of how the environment works.
Example: Playing a board game with fixed rules.
Unknown: The agent must learn how the environment works through exploration.
Example: A robot learning to navigate an unfamiliar terrain.
7. What is meant by PEAS descriptor? Give PEAS description for a given agent.
8. Explain the Goal based agent with block diagram stating its pros and cons.
9. What are the basic building blocks of learning agent with a neat block diagram?
10. Explain the steps in problem formulation for state space with example.
11. Explain the concept, implementation, algorithm and performance measures for the
following search techniques with suitable examples:
(i) Depth First Search.
(ii) Breadth First Search.
(iii) Depth Limited Search.
(iv) Bidirectional Search.
(v) A* Search.
Concept:
DFS is an algorithm for traversing or searching tree or graph data structures. It starts
at the root node (or any arbitrary node in the case of a graph) and explores as far as
possible along each branch before backtracking.
Implementation:
Stack Data Structure: DFS uses a stack to keep track of the nodes to visit
next.
3. If the stack is empty and the goal has not been found, return failure.
Performance Measures:
Time Complexity: O(V + E), where V is the number of vertices and E is the
number of edges.
Example:
Start at A.
Concept:
BFS is an algorithm for traversing or searching tree or graph data structures. It starts
at the root node and explores all the neighboring nodes at the present depth level
before moving on to nodes at the next depth level.
Implementation:
Queue Data Structure: BFS uses a queue to keep track of the nodes to visit
next.
Algorithm:
1. Start by enqueueing the root node.
3. If the queue is empty and the goal has not been found, return failure.
Performance Measures:
Time Complexity: O(V + E), where V is the number of vertices and E is the
number of edges.
Space Complexity: O(V), due to the queue storage.
Example:
Start at A.
Concept:
DLS is a variation of DFS where the search is limited to a specified depth. This is
useful to prevent the search from going too deep in infinite or very large trees.
Implementation:
Stack Data Structure: Similar to DFS but with a depth limit.
Algorithm:
1. Start by pushing the root node onto the stack with depth 0.
o If the depth is less than the limit, push all unvisited neighbors onto the
stack with incremented depth.
3. If the stack is empty and the goal has not been found, return failure.
Performance Measures:
Time Complexity: O(V + E), where V is the number of vertices and E is the
number of edges.
Example:
Bidirectional search runs two simultaneous searches—one forward from the initial
state and the other backward from the goal—hoping that the two searches meet in
the middle.
Implementation:
Two Queues: One for the forward search and one for the backward search.
Intersection Check: Check if the current node in the forward search is in the
backward search's visited set and vice versa.
Algorithm:
1. Initialize two queues: one for the forward search and one for the backward
search.
3. If either queue is empty and the goal has not been found, return failure.
Performance Measures:
Time Complexity: O(b^(d/2)), where b is the branching factor and d is the
depth of the shallowest solution.
Example:
They meet at C.
(v) A* Search
Concept:
A* is a best-first search algorithm that finds the least-cost path from a given initial
node to one goal node. It uses a heuristic function to estimate the cost from the
current node to the goal.
Implementation:
Priority Queue: A* uses a priority queue to prioritize nodes with the lowest
estimated total cost.
Algorithm:
1. Initialize the open list with the start node and its f-score (g + h).
o For each successor, if it is not in the open list or has a better f-score, add
it to the open list.
3. If the open list is empty and the goal has not been found, return failure.
Performance Measures:
Time Complexity: O(b^d), where b is the branching factor and d is the depth
of the solution.
Example:
Consider a graph with nodes A, B, C, D, E and heuristic values:
Start at A.
Each of these search techniques has its own strengths and weaknesses, making them
suitable for different types of problems and constraints.