EECS 391/491: PROBLEM SET #2 FAQ
Recent Changes
- A "Discussion" was added to Problem 2.8 below (01/29/08, 9:30am)
Problem 2.3
We used {0,1} for our percept and action spaces in lecture, but
I have made the names more descriptive here.
Problem 2.4
We showed a state machine for puck-piling robots in Lecture #3.
Here is a state machine modeling the nest preparation of
the lowly dung beetle, as described on page 37 of R&N:
Problem 2.7
Thus, you should draw a total of 3 circuits:
- the indicated circuit from the book, which
latches (and continues to ring) if the vehicle
has seen a light in at least one previous time instance
- one of your own design that latches/rings
if the vehicle has seen a light in at least two
different time intances
- one of your own design that continues to ring
if the vehicle has seen a light in exactly two
different time instances. Hint: start with the
one you just designed, but inactivate the bell
with inhibition from some additional circuitry
that latches whether a light has been seen
in at least three time instances
As suggested above, to help make your designs
more specific, include the buzzer/bell (like Braitenberg's
example did), whose ringing signifies the condition in question.
Problem 2.8
Thus, you are to design a reflex agent and use a program to
simulate it in all
possible 1x2 worlds (see Figure 3.20. page 84 of R&N).
Note: The book's code repository might not include your language
of choice. In this case, you must write your own. However,
you can certainly look at (or even translate) the implementations given,
considering them very detailed pseudo-code.
The book website is
http://aima.cs.berkeley.edu/
About halfway down in the left column is the "Online Code Repository"
Discussion
There have been a few questions regarding this problem. Here are some
more details that may help you out.
- Overview. You need to write a simulator for a stimulus-response
agent (of your design) acting in the 1x2 world.
You need to compute its performance measure (of your design) for
each of the 8 possible worlds.
- The simulation. Your simulator need only work for a stimulus-response
agent acting in the 1x2 world. Your simulator should be able to take
an arbitrary environment (of the eight possible) as the start location.
In that case, you would have to run it 8 times to gather all 8 performance
measures for your agent. Alternatively, you could easily loop over
all environments, simulating your agent in each one to obtain its
performance measure in that environment.
- The S/R agent. You need to make an STIMULUS-RESPONSE agent,
not an arbitrary.
For example, my S-R agent (yours can vary) is the following
A, Clean --> Left
A, Dirty --> Left
B, Clean --> Left
B, Dirty --> Left
If this agent started in room B, with both squares initially dirty,
it would move to room A after the first step and then (trying to
move Left from there on each step, but running into the wall each
time) stay there for as many steps as the simulation lasted.
- The performance measure. This is not stated and is up to you.
An example of one that makes sense to me for judging/comparing different
S/R agents in this environment is as follows: simulate the agent for
10 steps, penalizing it 1 point for each square that is dirty in each time step.
So, for the initial state and agent mentioned in the previous point, the
performance would be -2 per time step (both rooms are dirty for each
time step).
- Write-up. Your writeup definitely needs to detail the
S/R agent you used as well as the performance measure you used.
You also must report the the performace measure on each of the
environemts. Finally, it would be appropriate to BRIEFLY explain a little
about how your simulator code works (data structures, looping, etc.)
Created: 2008-01-25.
Modified: 2008-01-29.