Hacker News new | ask | show | jobs
by greenbay20 2444 days ago
Note that the paper claims that no matter how player A chooses the two numbers to write down, you can always guarantee >50% chance in guessing which one is the higher one after only looking at one of the numbers. The reason this seems counter-intuitive is that the only information you're given is one of the numbers. You are not told anything about how the first player picked her numbers. Now, the reason why OP's code does not seem counter-intuitive to most is that it shows a quite different result. The OP assumed a specific distribution (which is a strong assumption, one the paper does not make) and found a strategy that yields > 50%.
3 comments

Does this hold true if Player 1 is adversarial?

If I was the Player 1 in this case, and was trying to prevent Player 2 from guessing with a greater than 50% probability, I would use this method:

Pick a random 100 digit number N (using a random number generator to pick 100 digits in order).

Flip a coin. Heads, the second number is N - 1. Tails, it is N + 1.

I would imagine you could slightly beat 50%, but the percentage would approach 50% as you added more digits to your initial number. It would probably be close to unmeasurable at 100 digits (i.e. you couldn't tell if you were doing better than 50% or not).

The result holds even if Player 1 knows Player 2's strategy and attempts to foil it, although as you correctly observe, the paper only claims >50%, and Player 1 can minimize that margin by picking the two numbers to be right next to each other (and trying to choose them such that they occur in a low-density area of Player 2's distribution f(t) ).
Yeah, as I was working it out in my head, I was realizing that it would approach 50% but never hit it, since no matter the distribution you choose, the higher number will always be greater on average than the smaller (by definition). You can approach an equal average as you choose a larger and larger range, but never hit it.... which I guess is what the paper is proving.

Practically, though, you could get close enough to 50% that it would be immeasurable by sampling.

I did not assume they chose A or B from a specific distribution, especially one centered around zero. It's just how I decided to finish coding it. You'll get >50% as long as C can fall between A and B. I guess I should have selected weird distributions for A and B to be chosen from to show that the principle holds.
I updated the code to highlight the principle a bit better.
Exactly, came to say this. The TL,DR should be, it actually is intuitive if you make specific assumptions.