function p = EAGER_KB_mean_chop(KB)
%

num_atoms = max(BR_vars(KB,[]));
p = zeros(num_atoms,1);

h = GEO_KB2hp(KB);
min_x = -ones(num_atoms,1);
max_x = ones(num_atoms,1);
corners = zeros(2*num_atoms,num_atoms);
options = optimoptions('linprog','Display','none');

for k = 1:num_atoms
    index = (k-1)*2 + 1;
    e = zeros(num_atoms,1);
    e(k) = 1;
    coefs = -h(:,1:end-1);
    b = h(:,end);
    x = linprog(e,coefs,b,[],[],min_x,max_x,options);
    corners(index,:) = x;
    index = index + 1;
    e(k) = -1;
    x = linprog(e,coefs,b,[],[],min_x,max_x,options);
    corners(index,:) = x;
end
p = mean(corners);

tch = 0;
