0

A robot Randomly searches a target. at each time step it makes the decision of going straight, left or right with a probability of 0.8,0.1,0.1 with a constant speed.

I have defined random variables(two dimensonal) to all of the 7 outcomes for 2 moves(left straight, left left, left right, straight right, straight straight, right right, right straight) according to their location and thus calculated the mean(4.27) and variance(1.8961). Can anyone help me how to carry out the monte carlo simulation for estimating the mean and the variance in matlab?

Thank you

happyme
  • 233
  • 2
  • 5
  • 16
  • 2
    You need to be much more precise and explain your problem better if you want to get help. Why 7 outcomes? When you combine 3 possibilities with 3 possibilities you get 9 possibilities. Why combine only two – is there a guarantee that the target has been found after two steps? mean and variance of what? Movement is in two dimensions? How is the distribution of the location of the target relative to the initial position and orientation of the robot? – A. Donda Nov 27 '13 at 19:26
  • Thank you for your insights! Yes, the target will be found in two steps. I am combining only two, with respect to the arrival at the same positions for several outcomes. (We decide the orientation of the robot, as we decide the straight, left and right.) Let us suppose the robot stands at the origin of x-y co-ordinate axis. – happyme Nov 27 '13 at 19:34

2 Answers2

1

Here Evaluating human visual search performance by Monte Carlo methods and heuristic model we used

R = normrnd(mu,sigma)

given mu (in your case mean(4.27)) and sigma ( radix of variance(1.8961)), then we used a vector method (8 directions)

5 4 3
 \|/ 
6-o-2
 /|\
7 0 1

where the mean was centered on to 4 (more or less like your case).

I hope this helps.

venergiac
  • 7,469
  • 2
  • 48
  • 70
0

Thank you all for your help! I figured out a way with the help of the above answer!:

Step=random('uniform',0,1,1,2*(samples/run));
%% Defining directions
% for each step, if, 0<step<0.1,turn left;
% 0.1<step<0.2,turn right;
% step>0.2, go straight;
%% 7 outcomes

thus calculating the mean and variance through expectation!

happyme
  • 233
  • 2
  • 5
  • 16