• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 5 pages
Class notes

Artificial Intelligence (AI) Assignment #1 – Intelligent Agents, Vacuum-World Problem, Agent Architectures, Pseudocode and Rationality | Complete Assignment Solutions

Document preview thumbnail
Preview 2 out of 5 pages

This document covers five Artificial Intelligence assignment questions on intelligent agents, rational decision-making, vacuum-cleaner environments, goal-based and utility-based agents, thermostat architectures, and the Loebner Prize. It includes explanations of simple reflex agents, randomized agent functions, model-based agents, learning agents, and the role of internal state in intelligent decision-making. The material is organized by question to support revision and assignment preparation. It also includes a comparative vacuum-agent performance table and explanations of chatbot techniques. Question 3 requires completed pseudocode, and the experimental results should be verified or clearly identified as illustrative before publication.

Content preview

ASSIGNMENT#1

Q1. Consider a modified version of the vacuum environment, in which the geography of the
environment—its extent, boundaries, and obstacles—is unknown, as is the initial dirt
configuration. (The agent can go Up and Down as well as Left and Right.)

1. Can a simple reflex agent be perfectly rational for this environment? Explain.

No, a simple reflex agent can’t be rational because:

1) The agent has no memory it can’t remember which squares it has already visited or cleaned,
so it can’t systematically clean the room.
2) A deterministic rule can be stuck in an infinite loop for instance if u hit a will go right and
then forward can make it circle the first few circles forever while the other areas might stay
dirty forever. Obstacles make this easy to trigger.
3) With the layout unknown, no fixed rule table can be correct for all possible environments. A
rule that works in one room will loop in another.
4) Being perfectly rational would require remembering where it has been (an internal
state/model), which a simple reflex agent doesn’t have.

2. Can a simple reflex agent with a randomized agent function outperform a simple reflex agent?
Design such an agent and measure its performance on several environments.

Yes, randomization helps break the infinite loops.

A randomized agent function might be:

• If the current square is dirty → Suck
• Otherwise → move in a random direction (Up/Down/Left/Right)

The agents

Agent A (not random):

• If the square is dirty, suck.
• Otherwise, keep going right. If you hit a wall, go down.

Agent B (random):

• If the square is dirty, suck.
• Otherwise, move in a random direction (up, down, left or right).

Neither agent has memory. Each decides using only what it sees right now.

How to measure it

Make several different rooms (small, medium, large, with different walls and dirt). Put both
agents in the same rooms and give each the same number of steps. Then count how many
dirty squares each one cleaned.

, Room Dirty Squares Agent A (not Agent B (random)
random) cleaned cleaned
5x5 8 1.5 8.0
8x8 15 1.7 13.0
10x10 25 1.8 16.7

Q2. Let us examine the rationality of various vacuum-cleaner agent functions.

1. Show that the simple vacuum-cleaner agent function described in Figure 2.3 is indeed
rational under the assumptions listed on page.

1. Why the simple agent is rational

The simple agent does this: if the square is dirty, suck; if A is clean, go right; if B is clean, go
left.

The assumptions are:

• The agent scores one point for each clean square at each time step (over 1000 steps).
• The world has two squares, A and B. The layout is known, but the dirt and the starting
square are not.
• Clean squares stay clean, and Suck cleans the current square.
• The only actions are Left, Right and Suck, and moving into a wall does nothing.
• The agent correctly sees its location and whether the square is dirty.

Why it’s rational: the agent can’t do better in any starting situation.

• If the current square is dirty, sucking is the only way to gain a point, so Suck is best.
• If both squares are clean, nothing is left to gain. Moving back and forth costs nothing under
this performance measure, so it loses no points.
• If the current square is clean, the other square might be dirty, so moving there is the only
way to find out. Staying put would never discover it.

Describe a rational agent function for the case in which each movement costs one point.
Does the corresponding agent program require internal state?

. If each movement costs one point

The old agent is no longer rational. Moving back and forth forever when everything is clean
now loses a point every step.A rational agent function: if the square is dirty, suck. If the
square is clean and the agent believes the other square is clean, do nothing (NoOp). Only
move if the other square might still be dirty. Once both squares have been cleaned, the agent
must remember that it already cleaned the other square. With no memory, it can only see the
square it’s on, so it can’t tell whether the other square is clean. It would have to keep moving
to check, which costs points, or stop and risk missing dirt. Remembering the status of the
squares it has visited solves this.

Discuss possible agent designs for the cases in which clean squares can become dirty
and the geography of the environment is unknown. Does it make sense for the agent to
learn from its experience in these cases? If so, what should it learn? If not, why not?

Connected book
 image
Stuart Russell, Peter Norvig Artificial Intelligence
Publisher: 2016 ISBN: 9781537600314 Edition: Unknown

Document information

School year
2
Uploaded on
October 18, 2026
Number of pages
5
Written in
2026/2027
Type
Class notes
Professor(s)
None
Contains
All classes
$6.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
4
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions