Robot A
This robot is a randomised agent.Hence it will behave differently every time for each of the two initial positions of (3,5) and (7,1)
Click here for the results
Robot B
Though this robot behaves better than the previous one,there is randomness in its behaviour when the dirt values in the neighbouring grids are not distinct
Click here for the results
Robot C
Click here for the results
Part D
a. A simple reflex agent is perfectly rational when the action to be performed is perfectly deterministic and does not depend on previous actions.Hence an environment which is fully observable, deterministic,static and episodic will be best suited for such an agent.Moreover,the environment would be expected to have a finite number of states.
b.The greedy robot in B is not always deterministic.It mostly does the same task after suction at the present grid,that of moving to the local optimal grid,but when more than one local maxima exist,it moves randomly
c.It is easy to design an environment where a randomized agent will perform poorly.Any stochastic,non-deterministic and dynamic environment will do the job.For example,a randomized agent would behave poorly in a game of chess.
d.
Part E
Original image
a.Before any conclusion is met,there are certain assumptions about the capability of the robot.These are:
i)The robot can differentiate between infinitely many colours, i.e its color vision is similar to that of a human.
ii)It can perceive depth.
iii)It can perceive corners.
  With these assumptions,the robot can deduce the difference between walls and the floor,due to they being differently coloured and separated at the horizintal corner lines.As to where the floor is,the robot can perceive depth and can hence infer that the part of image which lies below its "eyes" constitutes the floor and the part that lies above its “eyes” constitutes the walls.To differentiate between the walls,it can find where the vertical corner lines lie.
b.The origin is chosen as the point of intersection of the 3 corners.Then a left handed coordinate system is used for mapping the dirt onto the grid
c.The problem here lies in the determination of the value between 0 and 1.One can really not “measure” this value objectively as the dirt would depend on factors like the contrast it makes with the floor,whether it can be sucked by the vacuum cleaner instrument used by the robot and whether it “really” is dirt.For example,a white sheet of paper will be dirt but the mosaic constituting the floor would be not.Yet,the value assigned to the paper would,in general,tend to be less than that assigned to the mosaic.
d.It is assumed that the robot has the ability to divide the image into grids of the size mentioned.Also,since it can perceive the corners,it can locate the origin as the point of intersection of the three mutually perpendicular axes.Now,since the image is closely shot,the parallax associated is negligible and hence the robot snapping the image should be present at the midpoint of the lower horizontal line of the rectangular frame.After these points have been ascertained,the robot can find its Manhattan distance from the origin easily.