Homework 1 - Problem 3: agents
* Required
SUNetID
*
For example, "psl" (this is not your student id number)
Name
Collaborators
(a) [2 points]
Given a utility function $U$, an agent that achieves the maximum value of $U$ is rational with respect to $U$. Suppose that an agent maximizes a different utility function $U'$ which is guaranteed to be at least as large as $U$. Is this agent rational with respect to $U$? Please prove or give a counterexample.
(b) [1 point]
Suppose I flip a fair coin. You guess either heads or tails and get 1 point if you're correct and 0 points otherwise. If your utility function is the number of points, construct a rational agent. There are many possibilities here, so just choose any one.
(c) [2 points]
Suppose I flip a biased coin with some probability of heads $p$ (this is the real environment), but you don't know the probability. If you guess the outcome of one flip correctly, you gain 1 point and 0 otherwise. So you build a model where the probability of heads is $q$. For which values of $p$ and $q$ is the rational agent based on the model rational in the real-world?
(d) [1 point]
Imagine constructing a very simple
reflex
agent to navigate a maze with code that looks like this:
def
reflex(percept):
// If there is a wall in front of the robot, turn right in-place.
// Else, move forward
if
percept.IsWall:
return
"Turn-Right"
else
:
return
"Move-Forward"
If the agent reaches the goal, it gains 10 points. In which of the following starting locations is the agent
rational
?
Notes:
* The
percept
variable represents the state of the block in front of the robot (whether or not its a wall).
* Turning occurs in-place.
* The agent begins facing West in locations A and B, and North in C.
A
B
C