Links to Code

Results:

Bot Start Point NE(3,5) Start Point SW(7,1) Links to Output
Robot A 3.5 2.4 (3,5)    (7,1)
Robot B 7.4 4.9 (3,5)    (7,1)
Robot C 7.2 6.7 (3,5)    (7,1)

*For each instance, the output shown is for a particular run. As randomness is involved, the results may vary.

Solution to D

  1. A simple reflex agent is perfectly rational if:
  2. The greedy robot designed by me is not completely deterministic in the sense that it always tries to accomplish the task at hand in a particular fashion, but there is some randomness involved if it is surrounded by four clean squares, while itself standing over a clean square.
  3. An environment in which the clean squares are agglomerated at a particular place, and the dirty ones at some other particular place, then the randomized bot can be expected to perform very poorly.
  4. If the readings are inaccurate, the rationality of the agent becomes a little fuzzy, and it may err somewhat in selecting the square with maximum dirt, and therefore the cleaning would not be as fast or effective.
  5. Since the robot is designed to move towards unexplored regions more, it will become a little slower in cleaning. But it remains deterministic and effective. The cleaning job is still performed properly according to the data at hand.

Solution to E

  1. A long sharp edge can be used to determine if a wall has occured. But as in the case of the image above, it can also be caused by shadows. The dirt can be detected by sharp changes in color and intensity of the pixels.
    However, if a depth detection device is available, detecting walls and dirt becomes much aesier and reliable.
  2. Some dirt can be mapped to multiple grid cells, while some smaller ones are contained in single cell only:

    Photo not uploaded yet!
  3. With the variety of dirt shown in the picture, i.e., pen(which may be classified as useful instead of dirt), irremovable paint spots, dust, fruit seed, candy wrapper, etc., it is not possible to map the dirt to a value between 0 and 1.
  4. The robot must know its hardware specification, i.e., visual angle of the camera it uses, and also, it knows its own vertical height. from these two, its postion can be calculated.