Hacker News new | ask | show | jobs
by sirclueless 2973 days ago
You can do better than that. You can guarantee there is > 50% chance you win on the first guess.
4 comments

Wow, that is very counterintuitive..

I suppose you could set any threshold x, and play so that if the first number is bigger than x you stick, otherwise you switch. This would be strictly better than random (break even) if x is within the range of numbers that A is picking from and the same as random if not.

It depends on when you measure your chances: before A has picked a generator this gives you >50% chance but if A has already picked a range to draw from that doesn't contain x then you're back to 50/50. Still, I think this would count as guaranteeing >50%?

> You can guarantee there is > 50% chance you win on the first guess.

You mean "greater than" and not "greater than or equal to"?

The latter is easy; lots of naive strategies accomplish that. But the former implies that you can declare a strategy and the puzzle offerer cannot then pick a distribution that defeats it. It's hard to imagine how you could get >50% for example if the puzzler's strategy is to pick N and N+1 for very large N.

Ok, my solution is needlessly complicated because unbounded numbers between -Infinity and Infinity has a mean of 0, so if we just pick 0 and say "if hand1 < 0 then next is bigger, otherwise smaller" strategy already gives 75% accuracy long term.

pyk's solution above works 66.6% even for the first try...

Oh that's interesting. Thank you for the clarification.