## Re: [aima-talk] Performance Measure

Expand Messages
• Hey, I don t know if i would be able to explain it to you very well, but i would still like to make a try. In the vacuum cleaner agent we assume that the
Message 1 of 5 , Oct 2, 2007
• 0 Attachment
Hey,
I don't know if i would be able to explain it to you very well, but i would still like to make a try.

In the vacuum cleaner agent we assume that the environment consist of two squares. The agent can sense the square in which it is present, and if any dirt is present in that square.
The first PEAS description says that "Clean squares remain clean"; the agent gets one point for each clean square at each time. If 1000 time steps would be considered then our agent will score anything above 998(if initially  both squares were dirty) to 1000 (if initially none of the squares were dirty).

Now in the next description, it is proposed that the vacuum-cleaner agent would be wasting energy if it is allowed to move to the other square if both the squares are clean. So very rightly the performance measure deducts one point for moving into a clean square.
• If the agent starts with both the squares as dirty and then continues for 1000 time steps as before i.e not stopping if both the squares are clean then it would score -ve 998.
• Similarly if the agent would have started with one of the squares as dirty and continues for 1000 time steps then it would end up in a score of -ve 999.
So having one more assumption makes out earlier agent ir-rational.
So the agent function has to be modified. For this agent, we could consider the following agent function:

function VACUUM_CLEANER_AGENT ( location , state ) returns action
ka = 0;  internal memory for square A
kb = 0;  internal memory for square B

if ( state == dirt ) then return SUCK
else if ( ka + kb < 2 ) and location = A then {  ka=1 ; return RIGHT }
else if ( ka + kb < 2 ) and location = B then {  kb=1 ; return LEFT }
else if ( ka + kb == 2 ) return NOP

Here we have ka & kb as state memory as said in 2.9

Abhijeet.

On 10/2/07, Chuck Wolber <chuckw@...> wrote:

This is with regards to AIMA 2nd Ed, page 36.

The description says that if a performance penalty of one point is
assessed, the agent will fare poorly. I'm at a bit of a loss to explain
how the agent could ever perform well in that situation. If, as the first
bullet indicates, the agent gets one point at each time step for a clean
square, and loses a point for each movement, wouldn't that mean the agent
could never possibly score higher than 1 or lower than 0 at the end of its
run if a peformance penalty is assessed?

(This same scenario is referenced in question 2.9, but I believe my

..Chuck..

P.S. The aima-java class TrivialVacuumEnvironment.java awards 10 points
for a clean square, rather than the one point that seems warranted based
on the rules outlined on page 36. Which is correct? I emailed Ravi Mohan

• ... I interpreted the question a bit differently. I saw no indication that the performance award of one point for being on a clean square would go away. The
Message 2 of 5 , Oct 12, 2007
• 0 Attachment
On Tue, 2 Oct 2007, Abhijeet Sinha wrote:

> Now in the next description, it is proposed that the vacuum-cleaner
> agent would be wasting energy if it is allowed to move to the other
> square if both the squares are clean. So very rightly the performance
> measure deducts one point for moving into a clean square.

I interpreted the question a bit differently. I saw no indication that the
performance award of one point for being on a clean square would go away.
The phrase "if the performance measure includes a penalty of one point for
each movement" seems to indicate that this change is "included" with the
previously stated performance measure of "one point for each clean square
at each time step".

This would mean that the agent would be awarded a point for being on a
clean square and then lose it when it wastes energy going to another clean
square. The performance measure score would always be zero.

> So having one more assumption makes out earlier agent ir-rational.

I concur because the spirit of the question seems to indicate that the
penalty performance measure does not work in tandem with the original
performance measure. I hope the wording can be reconsidered in the third
edition.

Just for fun... based on my reasoning above, wouldn't you agree that since
the score would always be zero no matter what, the agent would be
rational? Clearly it would have maximized its score.

..Chuck..
Your message has been successfully submitted and would be delivered to recipients shortly.