3 ms·
That was my analysis as well. What the other guy does is unknown and therefore irrelevant. If you can improve your current expectation, you do. You can triviall
by CalChris 10y ago
That was my analysis as well. What the other guy does is unknown and therefore irrelevant. If you can improve your current expectation, you do. You can trivially search over that strategy space and see that, yep, 0.5 is the maximum.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
for (double d = 0.25; d < .75; d += 0.01) {
double e = 0;
for (int j = 0; j < 100000; j++) {
float r = ((float) random()) / ((float) RAND_MAX);
if (r < d)
r = ((float) random()) / ((float) RAND_MAX);
e += r;
}
printf("d %lf e %lf\n", d, e / 100000);
}
}
- SonOfLilit 10y agoCareful, working in a language without a REPL encourages you to explore less. I was working in Python, and I did this and was about to post it, but then I asked myself "well, it can't be so easy, right? Why don't I also run a two-player simulation and make sure this strategy actually beats 0.6 first?", and - see my sibling post - it surprisingly loses. I can't yet explain why[1], but you can't argue with facts. [1] probably has to do with the probability distribution having a shape more interesting than a Gaussian bell
- zodiac 10y ago> I can't yet explain why Your comment and simulation prompted me to attempt an explanation of where danielvf's analysis is incorrect, which I've posted here https://news.ycombinator.com/item?id=12941330 https://news.ycombinator.com/item?id=12941330