CS 470 Artificial Intelligence
Winter 2009, Instructor: Jeffrey Horn NAME: _______________________
ASSIGNMENT 2: Stimulus-Response
(S-R) versus Finite State Machines
| Handed out/Assigned: | Tuesday, March 17, 2009 |
| Due: | Tuesday, March 24, 2009 |
VEHICLE:


So a "01" input vector would mean a light source detected to the right, but nothing center or left, while "11" would mean a light source in the center . Also assume a finite detector range, defined by an arc (not shown above) with its center at the robot's center. We have two binary outputs, one for each motor. LM is left motor, RM is right. A "0" output means the motor stops, while a "1" means go forward. (so an output of 01, which is 0 to the left and 1 to the right motor, would result in an arcing turn to the left, while 10 would be a right turn)
(1) CLASS EXAMPLE, Vehicle 1a ("Fear of Light"
or "Photophobic"): Here is an example truth
table (ie., a "brain") for a strategy to TURN AWAY FROM lights (hopefully!
You can try out your strategy in the
on-line simulator).
| 0 | 0 | 1 |
1 | |
| 0 | 1 | 0 | 1 | |
| 1 | 0 | 1 |
0 |
|
| 1 | 1 | 0 | 1 |
In class, we will write out the corresponding boolean expressions for the two outputs, simplify as much as possible (extra credit for any simplification), and finally draw the circuit for each output (i.e., for each motor). See above example.
Boolean expressions: LM RM
Simplified:
CIRCUITS: LM RM
CLASS EXAMPLE, VEHICLE 1b ("Light Loving" or
"Phototrophic"): Fill
in the following blank truth table for a strategy to SEEK LIGHT.
(you can try out your strategy in the
on-line simulator)
| 0 | 0 | |||
| 0 | 1 | |||
| 1 | 0 | |||
| 1 | 1 |
CLASS EXAMPLE, VEHICLE 1c ("Light Orbiting" or "Love at a Distance", also "Light-wall Followoing"): Fill in the following blank truth table for a strategy to ORBIT lights CLOCKWISE (that is, it tries to keep a light source on its right hand side): (you can try out your strategy in the on-line simulator)
| 0 | 0 | |||
| 0 | 1 | |||
| 1 | 0 | |||
| 1 | 1 |
What is the size of the "strategy space" for vehicle 1? (i.e., how many possible output vectors exist?) ____________
(2) DIGITAL Braitenberg Vehicle 2:
This is the same as vehicle 1, except that there is one more sensor bit. Let the third sensor, "GO", (not shown) indicate whether the object detected (if any!) is a Goal or an Obstacle (hence the name GO). Let us say you are seeking light sources, but avoiding obstacles, and you have these two combo detectors, LS and RS, that can detect both obstacles and light sources (if a detector detects both, it will register only the closest, so note that ONLY ONE OBJECT WILL BE DETECTED AT ANY ONE TIME!). The detectors will use the GO bit to indicate whether the nearest detected object is a light source (GO == "1") or an obstacle (GO == ")"). Note that if no obstacle is detected, then the value of GO is meaningless.
|
|
OUTPUTS | (comments) | |||
|
GO |
LS |
|
|
RM | |
|
|
|
|
|||
|
|
|
|
|||
|
|
|
|
|||
|
|
|
|
|||
|
|
|
|
|||
|
|
|
|
|||
|
|
|
|
|||
|
|
|
|
|||
(3) DIGITAL Braitenberg Vehicle 3:
FINITE STATE MACHINE: Now let's see if we can improve on the S-R behavior above by increasing the computational power of its brain. Let us add memory, two bits worth: M0 and M1. You can think of these as internal sensors that detect the state of two "internal environment" sensors. Furthermore, you can change the state of these two bits each time step. Thus the states of the variables M0 and M1 in the INPUTS column below are read at time t, then you specify the outputs M0 and M1 to be read in at time t+1 (i.e., the next time the truth table is read).
Furthermore, we change our motors so that "0" means backwards rotation (while "1" still means FORWARD).
Finally, we restrict our two external sensors, LS and LR, to be obstacle detectors only. Furthermore, we change the geometry of our sensor sensitivity cones to be BEAMS, as in the 3D Game Studio implementation of digital Braitenbergs.
FSM: Fill in a truth table below. The strategy that I want you to implement below is a BOX escape. Assume a 2D box in which the only openings are smaller than the greatest distance between the two sensor beams (but larger than the width of the vehicle!). Assume your vehicle starts somewhere in the box and its goal is to escape:

|
INPUTS |
OUTPUTS | ||||||||
| Num10 | M0 | M1 |
LS |
RS | LM | RM | M0 | M1 | (comments) |
| 0 | 0 | 0 | 0 | 0 | |||||
| 1 | 0 | 0 | 0 | 1 | |||||
| 2 | 0 | 0 | 1 | 0 | |||||
| 3 | 0 | 0 | 1 | 1 | |||||
| 4 | 0 | 1 | 0 | 0 | |||||
| 5 | 0 | 1 | 0 | 1 | |||||
| 6 | 0 | 1 | 1 | 0 | |||||
| 7 | 0 | 1 | 1 | 1 | |||||
| 8 | 1 | 0 | 0 | 0 | |||||
| 9 | 1 | 0 | 0 | 1 | |||||
| 10 | 1 | 0 | 1 | 0 | |||||
| 11 | 1 | 0 | 1 | 1 | |||||
| 12 | 1 | 1 | 0 | 0 | |||||
| 13 | 1 | 1 | 0 | 1 | |||||
| 14 | 1 | 1 | 1 | 0 | |||||
| 15 | 1 | 1 | 1 | 1 | |||||
| 16 | 0 | 0 | 0 | 0 | |||||
(3.1) What is the size of space of all possible strategies for Vehicle 3? ___________________________