function probs = BR_MC_board(num_trials)
%

indexes = [13,14,15,16;9,10,11,12; 5,6,7,8;1,2,3,4];

probs = zeros(80,1);

for t = 1:num_trials
    b = CS4300_gen_board(0.2);
    [rows,cols] = find(b~=0);
    num_p = length(rows);
    for p = 1:num_p
        if b(rows(p),cols(p))==1
            index = 32 + indexes(rows(p),cols(p));
            probs(index) = probs(index) + 1;
            r = rows(p) - 1;
            c = cols(p);
            if r>0
                index = indexes(r,c);
                probs(index) = probs(index) + 1;
            end
            r = rows(p) + 1;
            c = cols(p);
            if r<5
                index = indexes(r,c);
                probs(index) = probs(index) + 1;
            end
            r = rows(p);
            c = cols(p) - 1;
            if c>0
                index = indexes(r,c);
                probs(index) = probs(index) + 1;
            end
            r = rows(p);
            c = cols(p) + 1;
            if c<5
                index = indexes(r,c);
                probs(index) = probs(index) + 1;
            end
        elseif b(rows(p),cols(p))==2
            index = 16 + indexes(rows(p),cols(p));
            probs(index) = probs(index) + 1;            
        elseif b(rows(p),cols(p))==3
            index = 64 + indexes(rows(p),cols(p));
            probs(index) = probs(index) + 1;            
            r = rows(p) - 1;
            c = cols(p);
            if r>0
                index = 48 + indexes(r,c);
                probs(index) = probs(index) + 1;
            end
            r = rows(p) + 1;
            c = cols(p);
            if r<5
                index = 48 + indexes(r,c);
                probs(index) = probs(index) + 1;
            end
            r = rows(p);
            c = cols(p) - 1;
            if c>0
                index = 48 + indexes(r,c);
                probs(index) = probs(index) + 1;
            end
            r = rows(p);
            c = cols(p) + 1;
            if c<5
                index = 48 + indexes(r,c);
                probs(index) = probs(index) + 1;
            end
        elseif b(rows(p),cols(p))==4
            index = 16 + indexes(rows(p),cols(p));
            probs(index) = probs(index) + 1;            
            index = 64 + indexes(rows(p),cols(p));
            probs(index) = probs(index) + 1;            
             r = rows(p) - 1;
            c = cols(p);
            if r>0
                index = 48 + indexes(r,c);
                probs(index) = probs(index) + 1;
            end
            r = rows(p) + 1;
            c = cols(p);
            if r<5
                index = 48 + indexes(r,c);
                probs(index) = probs(index) + 1;
            end
            r = rows(p);
            c = cols(p) - 1;
            if c>0
                index = 48 + indexes(r,c);
                probs(index) = probs(index) + 1;
            end
            r = rows(p);
            c = cols(p) + 1;
            if c<5
                index = 48 + indexes(r,c);
                probs(index) = probs(index) + 1;
            end
       end
    end
end
probs = probs/num_trials;