function [xn, yn, force] = takeActionKB(explored,r, c, ps, bb, PKB, board, found)
ls = [2, 3, 5, 6, 7, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28];



X = sort(ps(ls));
Y = sort(bb(ls));

force = 0;
for i = 1:16
            s = find(ps(ls) == X(i));
            if(bb(ls(s)) < Y(15) || found == 1) 
                s2 = PKB.m_bw_map(ls(s));
                s2 = convertStringsToChars(s2);
                xn = str2num(s2(2));
                yn = str2num(s2(3));
                row = 4 - yn + 1;
                col = xn;
     
              %  Y(15)
              %  Y(16)
            if explored(row,col) == -1 && ~(row == r && col == c) && hasExploredNeighbor(explored, row, col) && board(row, col) ~= 3

                return;
            end
            end
end


[x, y] = find(explored == -1);


yn = 4 - y(1) + 1;
xn = x(1);
    
end


