function [pits,Wumpus] = EAGER_MC_atom_probs(breezes,stenches,num_trials,...
    pit_prob,visited,safe,wumpus_dead)
%

PIT = 1;
BOTH = 4;
WUMPUS = 3;

pits = zeros(4,4);
pits(4,1) = 0;
Wumpus = zeros(4,4);

OK_boards = 0;
for t = 1:num_trials
    b = EA_constrained_MC(pit_prob,visited,breezes,stenches,safe,...
        wumpus_dead);
    OK = 1;
%    b = CS4300_gen_board(pit_prob);
%    OK = EAGER_OK_board(b,breezes,stenches,visited);
    if OK==1
        OK_boards = OK_boards + 1;
        [rows,cols] = find(b==PIT);
        num_pits = length(rows);
        for p = 1:num_pits
            pits(rows(p),cols(p)) = pits(rows(p),cols(p)) + 1;
        end
        [rows,cols] = find(b==WUMPUS|b==BOTH);
        if ~isempty(rows)
            Wumpus(rows(1),cols(1)) = Wumpus(rows(1),cols(1)) + 1;
        end
    end
end
pits = pits/OK_boards;
Wumpus = Wumpus/OK_boards;
