0% found this document useful (0 votes)
32 views7 pages

AI Agents

Uploaded by

sakshipowar144
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)
32 views7 pages

AI Agents

Uploaded by

sakshipowar144
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/ 7

AI agents

Favorites

Notebook Artificial Intelligence.

Tags

Last edited time @November 9, 2024 2:10 PM

Archive

Created time @November 9, 2024 1:58 PM

A simple reflex agent is a type of artificial agent that makes decisions based
solely on the current situation without considering past or future states. It follows
a set of condition-action rules: when it perceives a certain condition, it takes a
corresponding action. This approach is often effective in predictable environments
where the same condition always demands the same response.

Example: Vacuum Cleaner Agent


Imagine a simple reflex agent for a vacuum cleaner that operates in a two-tile
environment with tiles labeled "A" and "B." Here’s how it would function:

Percepts: The current tile and whether it is "Dirty" or "Clean."

Rules:

If the tile is "Dirty," then "Suck" (clean the tile).

If the tile is "Clean," move to the other tile.

The vacuum cleaner agent checks the current tile. If it’s dirty, it cleans it. If it’s
clean, it moves to the other tile without storing any memory or performing further
analysis.

Behavior Example

AI agents 1
1. If the vacuum is on tile A and it’s dirty, it will clean tile A.

2. Once tile A is clean, it moves to tile B.

3. If tile B is dirty, it will clean it; if it’s clean, it returns to tile A.

This agent makes decisions based only on the current tile's condition and doesn’t
remember past actions or try to optimize its path.
4o

You said:
in the form of table

ChatGPT said:
ChatGPT
Here’s how a simple reflex agent, like a vacuum cleaner agent, would operate in a
two-tile environment in table form:

Current Tile Tile Condition Action

A Dirty Suck (clean)

A Clean Move to Tile B

B Dirty Suck (clean)

B Clean Move to Tile A

This table represents the simple condition-action rules the agent follows:

If the current tile is dirty, the agent cleans it.

If the current tile is clean, the agent moves to the other tile.

The agent operates only based on the current tile's condition and does not retain
memory of previous actions.

4o

You said:
example foe mode based reflex agent

ChatGPT said:

AI agents 2
ChatGPT
A model-based reflex agent keeps track of part of the environment that it can't
directly observe at all times, using a simple internal model to remember past
states. This model helps it make more informed decisions even when it doesn’t
have direct access to the complete state of the environment.

Example: Vacuum Cleaner Agent with Model-Based Reflex


In this example, the vacuum cleaner operates in a larger environment with multiple
rooms (or tiles) and it keeps track of which rooms it has already cleaned. This is
useful in case it returns to a room it previously visited, allowing it to remember that
the room is clean.

Components of the Agent:


Percepts: Current room and its condition ("Dirty" or "Clean").

State Model: Memory of which rooms are clean or dirty.

Rules:

If the current room is "Dirty," clean it and update the model to remember
it’s now "Clean."

If the current room is "Clean," use the model to decide which uncleaned
room to go to next.

If all rooms are clean, stop.

Room
Current Room Internal State (Model) Action
Condition

Suck (clean), mark


Room 1 Dirty Room 1 marked as "Dirty"
"Clean"

Model updated: Room 1 Move to next unclean


Room 1 Clean
"Clean" room

Suck (clean), mark


Room 2 Dirty Room 2 marked as "Dirty"
"Clean"

Model updated: Room 2 Move to next unclean


Room 2 Clean
"Clean" room

Any Room Clean All rooms "Clean" in model Stop

AI agents 3
In this case, the agent uses its model (an internal record of room states) to
remember which rooms are clean or dirty. This enables it to avoid revisiting clean
rooms unnecessarily and ensures it doesn’t keep checking the same room if it
already knows it’s clean. This way, the model-based agent makes decisions based
not only on current percepts but also on its internal model of the environment.

4o

You said:
utility based agent

ChatGPT said:
ChatGPT

A utility-based agent evaluates possible actions based on a "utility function,"


which assigns a score to each action to reflect its desirability in achieving the
agent’s goals. This allows the agent to choose the action that maximizes its utility,
aiming not only to reach a goal but to achieve the most favorable outcome among
alternatives.

Example: Self-Driving Car Agent


Consider a utility-based self-driving car agent tasked with driving safely and
efficiently. It aims to maximize comfort, speed, and safety while reaching its
destination.

Components:
Percepts: Road conditions, speed limits, traffic, pedestrian locations, weather
conditions, and the current distance to the destination.

Utility Function: A scoring system that evaluates each action based on


multiple factors, including safety, speed, fuel efficiency, and passenger
comfort.

Rules:

Higher utility is assigned to actions that maintain safety, avoid traffic, and
follow speed limits.

AI agents 4
The agent constantly calculates and chooses the action with the highest
utility to optimize the journey.

Utility Score
Current Situation Possible Actions Chosen Action
(Examples)

Maintain speed,
Clear road, no traffic, Maintain speed: +8, Increase speed
Increase speed to 60
speed limit 60 km/h Increase to limit: +10 to limit
km/h

Change lane, Slow Change lane: +6, Slow


Heavy traffic ahead Slow down
down, Stop down: +9, Stop: +5

Reduce speed, Reduce speed: +10,


Slippery road in rain Reduce speed
Maintain speed Maintain speed: +3

Stop: +10, Slow down:


Pedestrian crossing Stop, Slow down Stop
+5

The utility-based agent uses these scores to prioritize actions based on multiple
factors, always aiming to maximize the overall utility. In this case:

Safety might be weighted more heavily than speed, so if road conditions


worsen, reducing speed would have a higher utility score than maintaining it.

If the agent faces a traffic jam, switching lanes might be given a higher utility
to reduce travel time.

This approach allows the self-driving car to balance different factors and make
optimal decisions based on varying situations, rather than following a fixed set of
rules.

4o

You said:
goal based agent

ChatGPT said:
ChatGPT

A goal-based agent makes decisions by considering specific goals it needs to


achieve. It uses its percepts to evaluate actions based on how likely they are to
achieve these goals, choosing actions that bring it closer to the desired outcome.

AI agents 5
Unlike simple reflex agents, goal-based agents plan ahead by considering future
consequences of actions.

Example: Delivery Drone Agent


Consider a goal-based agent controlling a delivery drone with the goal of
delivering a package to a specified location efficiently and safely.

Components:
Percepts: Current location, obstacles, battery level, weather conditions, and
the location of the delivery destination.

Goals: Deliver the package to the destination while avoiding obstacles,


conserving battery, and minimizing travel time.

Rules:

Plan a path to the destination.

Avoid obstacles along the way.

If battery level is low, find the nearest charging station.

Current Situation Goals Possible Actions Chosen Action

Reach destination Ascend, Begin flying Begin flying towards


Starting point
safely towards destination destination

Obstacle detected Fly around obstacle, Fly


Avoid obstacle Fly around obstacle
ahead over obstacle, Stop

Low battery Reach destination, Continue flying, Land


Land and recharge
detected Conserve battery and recharge

Near delivery Descend and deliver Descend and deliver


Deliver package
destination package package

The drone uses its goals to plan actions. In this case:

If an obstacle is detected, it chooses an action to avoid the obstacle, as this


aligns with the goal of reaching the destination safely.

If the battery is low, the agent prioritizes recharging to ensure it can complete
the delivery rather than risking a complete shutdown.

AI agents 6
This goal-based approach enables the agent to evaluate and choose actions that
not only respond to the current state but also work toward a final objective,
considering future steps and possible adjustments.

4o

AI agents 7

You might also like