Percentage/Probability based on distance, high percentage for low value

158 Views Asked by At

Let's say there's three objects a, b, c and one goal x. I have the distances of all the three objects to the goal x:

a -> x: 2   
b -> x: 8   
c -> x: 18

I now want to calculate the percentage or probability of which object is closer to the target (and thus has the highest probability of reaching it). I already tried to sum the distances and calculate percentages based on this sum, so eg. $\frac{2}{28}$ for a, but this gives a low percentage (7,14%) for a small distance, while I would like to have a high percentage for a low distance. I thus would need a way to 'reverse' this percentage. Subtracting it from 1 of course doesn't work since they would no longer sum to 1 (100%).

So in the end, I would like to get something like this as a result:

a: 70%
b: 25%
c: 5%

I already looked into Softmax and Sigmoid, but is there nothing more simple for this? I've been breaking my head on this for 2 hours already and can't figure it out! Thanks in advance.