function res = DT_driver(KB_DT,X)
%

num_pts = length(X(:,1));

res = zeros(num_pts,1);

wb = waitbar(0,'driver');
for p = 1:num_pts
    [p num_pts]
    waitbar(p/num_pts);
    KB = KB_DT;
    literals = BR_data2literals(X(p,:));
    for el = 1:length(literals)
        KB(end+1).clauses = literals(el);
        KB(end).prob = 1;
    end
%    [probs,q] = BR_MC3(KB,200,500);
    [probs,q,tr] = BR_MC_query_MC(KB,100,0.001,1000);
    [val,label] = max(probs(1:3));
    res(p) = label;
end
close(wb);
