Abhijit Sharang,10007

Homework 1





Click here for the source codes


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.

  • On agent A,this has no effect as it cleans the dirt irrespective of the amount and moves randomly.
  • Agent B always cleans the dirt in the grid where it currently is.However,in worst case when neighbouring grids have almost equal amount of dirt,20% of thye times it will move to a wrong grid while applying greedy s strategy.Hence the total amount of dirt cleaned might be 20% less than the amount when the sensing is not noisy.
  • The error in cleaning would be inversely proportional to the number of grids travelled.If the robot has covered n grids do far,in worst case as described above,the dirt that it would clear would be (1-(15)n) times the dirt cleared if sensing was noise free

  • e.
  • As in the above sub-part,agent A shows no difference in behaviour.
  • For both agents A and B,the probability that a cleaned square becomes unclean between 10 and 30 moves is 0.68.For every subsequent interval of 10,it decreases to 0.32,0.05,... Hence,the probability of the agent retracing its path would be maximum between 10 and 30 moves.For agent C,in worst case,the probaility of retracing all its travveled grids would be (0.68)n.For agent B,the probability of retracing would depend on the immediate neighbours of the present grid.

  • 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.