[go: up one dir, main page]

0% found this document useful (0 votes)
5 views6 pages

Aids Ia

The document discusses the PEAS framework for categorizing AI agents, providing descriptions for a self-driving car and a smart home thermostat. It explains the workings of utility agents, emphasizing their decision-making process based on utility functions. Additionally, it covers search algorithms like DFS and BFS, comparing their OPEN and CLOSED lists, and evaluates uninformed search algorithms based on various criteria.
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)
5 views6 pages

Aids Ia

The document discusses the PEAS framework for categorizing AI agents, providing descriptions for a self-driving car and a smart home thermostat. It explains the workings of utility agents, emphasizing their decision-making process based on utility functions. Additionally, it covers search algorithms like DFS and BFS, comparing their OPEN and CLOSED lists, and evaluates uninformed search algorithms based on various criteria.
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/ 6

Write PEAS (Performance, Environment, Actuators, Sensors) descriptions of any two applications.

In Artificial Intelligence (AI), various types of agents operate to achieve specific goals. The PEAS system is a critical
framework used to categorize these agents based on their performance, environment, actuators, and sensors.
Understanding the PEAS system is essential for grasping how different AI agents function effectively in diverse
environments. Among these agents, Rational Agents are considered the most efficient, consistently choosing the optimal
path for maximum efficiency.

PEAS Description of Two Applications:

1. Self-Driving Car:

o Performance Measure: Safety, time efficiency, passenger comfort, traffic rule adherence, and fuel
efficiency.

o Environment: Roads, traffic, pedestrians, weather conditions, traffic signals.

o Actuators: Steering wheel, accelerator, brake, indicator lights, wipers.

o Sensors: Cameras, LiDAR, GPS, speed sensors, proximity sensors.

2. Smart Home Thermostat:

o Performance Measure: Maintaining comfortable room temperature with energy efficiency.

o Environment: Room temperature, weather conditions, presence of people.

o Actuators: Heating system, cooling system, fan.

o Sensors: Temperature sensor, humidity sensor, motion sensor.

Explain the working of a utility agent.

1b. Explain the working of a Utility Agent

A Utility Agent is an advanced type of intelligent agent that makes decisions based on a utility function. Unlike simple rule-
based agents or goal-based agents, utility-based agents aim to maximize overall performance by considering multiple
possible outcomes and selecting the best one.

Working of a Utility Agent

A utility agent works by:

1. Perceiving the Environment: The agent gathers data from its surroundings using sensors.

2. Evaluating Possible Actions: It considers different actions and their possible consequences.

3. Applying a Utility Function: The agent assigns a numerical value (utility) to each possible state to measure its
desirability.

4. Selecting the Best Action: The agent chooses the action that results in the highest utility.

5. Executing the Action: The agent uses actuators to perform the chosen action.

Key Components of a Utility Agent

1. Perception: Gathers real-time data from the environment.

2. Utility Function: A mathematical function that evaluates the desirability of a state.

3. Decision-Making Mechanism: Uses utility values to select the best action.

4. Actuators: Execute the chosen action to interact with the environment.


Example of a Utility Agent

1. Self-Driving Car

 Perception: Sensors detect road conditions, traffic, and obstacles.

 Utility Function: The car assigns utility scores based on safety, fuel efficiency, and travel time.

 Decision: It chooses whether to slow down, change lanes, or stop based on the highest utility.

 Action: The car accelerates, brakes, or changes direction accordingly.

Advantages of Utility Agents

✔ More Intelligent Decision-Making: Evaluates multiple possibilities before acting.


✔ Handles Uncertainty: Can adapt to different situations instead of following fixed rules.
✔ Optimized Performance: Aims for the best possible outcome rather than just achieving a goal.

2a. Discuss the OPEN and CLOSED List as the Algorithm DFS and BFS Progresses

In search algorithms like Depth-First Search (DFS) and Breadth-First Search (BFS), the OPEN and CLOSED lists are essential
data structures that help keep track of the nodes being explored. Let’s break them down and understand how they work in
both algorithms.

1. OPEN List:

The OPEN list contains nodes that have been discovered but not yet fully explored. It’s like a "to-do list" of nodes waiting
for their turn.

 In DFS, the OPEN list works like a stack (LIFO — Last In, First Out). It always expands the most recently discovered
node.

 In BFS, the OPEN list works like a queue (FIFO — First In, First Out). It expands the earliest discovered node first.

2. CLOSED List:

The CLOSED list contains nodes that have already been fully explored — meaning their neighbors have been discovered and
added to the OPEN list.

 Once a node is moved from the OPEN list and its neighbors are expanded, it’s placed in the CLOSED list.

 This prevents the algorithm from revisiting the same node, avoiding infinite loops and redundant work.

Let’s take an example graph:

/\

B C

/\ \

D E F

Starting from A:
Working of OPEN and CLOSED Lists in DFS: 4. Working of OPEN and CLOSED Lists in BFS:

Step OPEN (Stack) CLOSED (Explored Nodes) Using the same graph:

1 A — Step OPEN (Queue) CLOSED (Explored Nodes)

2 C, B A 1 A —

3 C, E, D B 2 B, C A

4 C, E D 3 C, D, E B

5 C E 4 D, E, F C

6 F C 5 E, F D

7 — F 6 F E

How DFS Uses Lists: 7 — F

 OPEN uses a stack — the last node added How BFS Uses Lists:
(deepest node) is explored first.
 OPEN uses a queue — the first node added
CLOSED keeps track of already visited nodes to avoid (shallowest node) is explored first.
cycles
 CLOSED keeps track of visited nodes, ensuring
BFS explores level by level.

5. Key Differences Between DFS and BFS with OPEN and CLOSED Lists:

Feature DFS (Depth-First Search) BFS (Breadth-First Search)

OPEN List Uses a Stack (LIFO) Uses a Queue (FIFO)

Search Order Dives deep first Explores level by level

CLOSED List Stores visited nodes Stores visited nodes

Time Complexity O(b^d) (b = branching factor, d = depth) O(b^d)

Space Complexity O(d) O(b^d)

6. Conclusion:

The OPEN and CLOSED lists play a crucial role in the efficiency and correctness of search algorithms. They help keep track of
which nodes have been discovered and which have been fully explored, preventing infinite loops and ensuring optimal
search paths.

 DFS is memory efficient but can get stuck in deep paths.

 BFS finds the shortest path but can use more memory for wide graphs.
2b. Compare Uninformed Search Algorithms Based on Time and Space Complexity, Optimality, and Completeness

Uninformed search algorithms (also called blind search algorithms) explore the search space without any knowledge about
the goal’s location—only using the problem’s definition. Let’s compare them based on key factors like time complexity,
space complexity, optimality, and completeness.

1. Types of Uninformed Search Algorithms:

 Breadth-First Search (BFS)

 Depth-First Search (DFS)

 Uniform Cost Search (UCS)

 Depth-Limited Search (DLS)

 Iterative Deepening Search (IDS)

2. Comparison Table:

Criterion BFS DFS UCS DLS IDS

Time Complexity O(b^d) O(b^d) O(b^d) O(b^l) O(b^d)

Space Complexity O(b^d) O(bd) O(b^d) O(bl) O(bd)

Optimality Yes (if costs are equal) No Yes No Yes

No (infinite No (if cutoff <


Completeness Yes Yes Yes
depth) depth)

Where:

 b = branching factor (average number of child nodes per state)

 d = depth of the shallowest goal node

 ll = depth limit in DLS

3. Explanation of Criteria:

(a) Time Complexity:

 Refers to the number of nodes expanded before reaching the goal.

 BFS, UCS, and IDS explore all nodes at one level before going deeper — resulting in high time complexity for deep
goals.

 DFS dives deep first and can sometimes be faster for lucky paths but can also take longer if the goal is far.

(b) Space Complexity:

 Refers to the memory required to store the OPEN and CLOSED lists.

 BFS and UCS store every node at a level, making their space usage exponential.
 DFS only tracks the current branch, making it more space-efficient.

 DLS and IDS improve on DFS but still suffer in wide/deep trees.

(c) Optimality:

 Whether the algorithm guarantees the least-cost or shortest path to the goal.

 BFS and UCS guarantee optimality, but DFS and DLS do not. IDS ensures optimality like BFS.

(d) Completeness:

 Whether the algorithm always finds a solution if one exists.

 BFS, UCS, and IDS are complete. DFS and DLS may fail if they dive into infinite branches or hit cutoff limits.

4.a Explain the Different Ways of Knowledge Representation

Knowledge representation is the process of encoding information about the world into a form that a computer system can
use to solve complex tasks like diagnosing medical conditions or engaging in conversation. There are four main types of
knowledge representation:

1. Logical Representation:

o Uses formal logic to represent facts and rules.

o Expresses knowledge in terms of propositional logic and predicate logic.

o Example: “If it’s raining, the ground is wet” → Rain⇒WetGroundRain \Rightarrow WetGround

2. Semantic Networks:

o Represents knowledge in the form of a graph, where nodes represent objects or concepts and edges
represent relationships.

o Visual and easy to understand, ideal for hierarchical knowledge.

o Example: “Cat is an animal” → Cat → is-a → Animal

3. Frame Representation:

o Uses data structures called frames to group related information.

o Each frame has slots (attributes) and values.

o Example: A Car frame might include slots like color, model, and engine type.

4. Production Rules:

o Uses IF-THEN rules to represent knowledge.

o Common in expert systems and decision-making systems.

o Example: IF the temperature is high, THEN turn on the fan.

Conclusion:
Each knowledge representation method has its strengths and is chosen based on the type of problem and application.
4.b Compare Forward Chaining and Backward Chaining

Both Forward Chaining and Backward Chaining are inference techniques used in rule-based systems to derive conclusions
from known facts. Let’s compare them:

Feature Forward Chaining Backward Chaining

Starts from the goal and works backward to known


Direction Starts from known facts and works toward the goal.
facts.

Approach Data-driven (bottom-up approach) Goal-driven (top-down approach)

Used when lots of data is available and we need to Used when a specific goal needs to be proven or
Use Case
derive possible conclusions. disproven.

Inefficient when there are too many rules and few Efficient when the goal is clear and rules are goal-
Efficiency
goals. specific.

Diagnosing a disease based on symptoms: IF Fever Checking if a patient has flu by working backward from
Example
AND Cough → Flu. the diagnosis to the symptoms.

Conclusion:

 Forward Chaining is great when we have many facts and need to explore outcomes.

 Backward Chaining is better when we have a specific goal and need to verify it efficiently.

You might also like