This reminds me of a fascinating problem (not sure if there's a name for it): You play the following game (say for many rounds). Someone puts different values in two envelopes (they can pick the values arbitrarily, even maliciously, each round). You want to pick the higher valued envelope. You pick an envelope, they show you the value of the other. You can hold your value or you can switch. It also works if the game…
Generate a random number T from the arctan distribution. If the number in the other envelope is greater than T, switch. For envelopes with two different numbers n, m, the above is guaranteed to give you the higher one strictly more than 50% of the time.
For example, exp^{-x^2} with normalization factor is a simple choice.