# Rational agent question from Russell and Norvig

Question from Artificial Intelligenge: A Modern Approach by Russell and Norvig (Exercise 2.1).

Suppose that the performance measure is concerned with just the first $T$ time steps of the environment and ignores everything thereafter. Show that a rational agent's action may depend not just on the state of the environment but also on the time step it has reached.

This question is extremely confusing to me. My initial thought is that this is obvious. A rational agent wants to maximize its performance, and the first $T$ time steps are a factor in the performance measure. So for instance, if the environment is in state $A$ at time step 1, the performance measure can be different than being in state $A$ at step 2 since the state of the environment in step 1 is relevant to the performance measure in the latter case. Thus as the performance measures can be different, the rational agent may make different actions.

Perhaps that is the answer, but I am still confused on why it matters that the performance measure is concerned with only a finite sequence of initial time steps. My interpretation of the question seems to make that irrelevant. Only the fact that the performance measure has some historical factor is of any concern.

Can anyone help clarify what is happening in this question?

## 3 Answers

This question is obvious as you told and its purpose is to ensure that the reader has understood a part of the chapter. You are right that the actions that the agent does will differ in the time period T. They will also differ after this period, because the agent's actions will have no value.

One example may be for a car agent that has to cover as much distance as possible and has limited fuel. If only the distance reached during the first hour counts, the car could take it in full throttle(exhausting the fuel very fast). However if there was no time limit the car agent should choose the optimal speed that maximizes the distance covered per fuel unit spent.

My first thought regarding this question was that a rational agent could be involved in some sort of time-limited event or activity, such as a sports game. In such a scenario, the agent would be required to play against an opponent and accumulate more points than the opponent within a predetermined amount of time. So, the duration of the game would be the T time steps that the performance measure is concerned with. In a game of soccer, for example, goals may be scored outside the game’s duration, but obviously, they do not matter. The agent’s style of play or tactics may change during the game depending on the score relative to the remaining time. If the agent has a comfortable point lead over its opponent with little time remaining in the game, it may choose to simply play defensively for the remainder. On the other hand, if the agent has a lower score than its opponent and there is a considerable amount of time remaining, it may choose to play more offensively in order to gain points.

Another situation in which a rational agent’s actions may depend on the time step is has reached could be taking a long exam in some given amount of time. If the agent has 60 minutes to complete 30 exam problems and has 20 problems finished after 45 minutes, it may start skipping the problems that it finds to be more difficult or time consuming and focusing on the easier or shorter ones in order to maximize the amount of problems it can answer, instead of just completing them in the order they are given and possibly not having time to answer some of the easy questions

The role of the problem generator is to gather information about the environment by suggesting actions to the performance element that temporarily violate rationality. Since the problem generator can suggest arbitrary actions for the sake of exploration, the performance measure is not the only input considered when the agent selects an action, and so the the action may depend on the time even though the performance measure does not. Note that we should not assume that we may evaluate the performance measure on or before epoch T (imo).

Intuitively, suppose we have been without water for 2 days and there is a small but insufficient drizzle of water on a rock nearby. We are in the vicinity of 2 hills. Across each hill, there may be a well or a lake. There may also be a water source upstream from the rock-drizzle, but the origin of the rock-drizzle may be underground. Collaboratively, we may choose to investigate each hill or the rock-drizzle, or continue taking turns licking the rock. Independently, we may also restrain or kill each other to increase our licking time. There's a lot of creativity involved here, so feel free to make up your own situation involving necessary resources. A funny bit is to make up a situation like this where the objective is a luxury (imagine we are at the mall..... :)