function [rank] = bore(select, guessed)


[junk, index] = sort (guessed (:, end));
guessed = guessed(index, :);

[height, junk] = size(guessed);
[junk, length] = size(select);
best = guessed(1:(height./10), 1 : end - 1);
rest = guessed((height./10) + 1 : end, 1 : end -1);


rank = zeros(1,length);

for i = 1 : length
if select(1,i) == -1
	rank(1,i) = .000001;
end
end

[sB, junk] = size(best);
[sR, junk] = size(rest);

for i = 1 : length
pB = sum(best(:,i)) / sB;
pR = sum(rest(:,i)) / sR;
if (pB + pR ~= 0)
prob1(1, i) = (pB * pB) / (pB + pR);
end
if (pB + pR == 0)
prob1(1, i) = 0;
end
end

best = (best - 1) * -1;
rest = (rest - 1) * -1;

for i = 1 : length
pB = sum(best(:,i)) / sB;
pR = sum(rest(:,i)) / sR;
if (pB + pR ~= 0)
prob0(1, i) = (pB * pB) / (pB + pR);
end
if (pB + pR == 0)
prob0(1, i) = 0;
end
end

for i = 1 : length
if (rank(1,i) != 0)
	rank(1,i) = prob1(1,i) - prob0(1,i);
end
end

