function [err,q] = BR_sentence_err(KB,samps)
%

err = 0;
m = length(KB);
[num_samps,n] = size(samps);
counts = zeros(m,1);
p = zeros(m,1);
for c = 1:m
    p(c) = KB(c).prob;
end
for s = 1:num_samps
    for c = 1:m
        counts(c) = counts(c) + BR_sat(KB(c).clauses,samps(s,:));
    end
end

q = counts/num_samps;
err = norm(q-p);
