I have written a small analysis of that same problem using simple Python code, a couple of years ago: https://cjauvin.blogspot.com/2012/12/find-true-love-on-datin...
Show HN: Learn When to Quit
21–30 of 48 posts
Re: Show HN: Learn When to Quit
#22The distribution of numbers is not uniform across the 0..googol here. The implementation first chooses the length of the number, then fills in the digits. This makes it biased towards smaller numbers. Does it still have the same optimal strategy as for uniform generation?
Yep. The optimal strategy depends only on the relative ordering of elements, not on their magnitudes or any other property. So the strategy is the same for any continuous distribution. (With a discrete distribution, the possibility of ties slightly affects things. But in this particular game, ties seem to be very improbable, so they can be ignored.)
Re: Show HN: Learn When to Quit
#23How does this change when you're heavily punished for ending up with a much lower number (e.g., in finding a partner, biz deal, etc)? Among a set of losing plays, I presume it's 50/50 on whether you turn over every card (and end up with the last one). So a third of the time you end up in the optimal case, another third you end up doing pretty well, and another third you're subject to absolutely random chance. Guess t…
If you do know the distribution, and have some objective function, and samples are "free", you get a different model that you can solve inductively backwards from the case of "the last sample".
A different model is that your objective function is still on order, but it gives some points for "closer to best". Maybe you score minus n for picking the nth best sample. In that case the model need not have a known distribution (It's different if you do or don't.) And the strategy us different: if the 99th sample out of 100 is the second best you've seen so far, you should take it. (Which can't possibly be optimal in the original model.)
Re: Show HN: Learn When to Quit
#24Madden: "Now with no timeouts I think that the Patriots, with this field position they have to just run the clock out, you have to play for overtime now. I don't think you want to force anything here, you don't want to do anything stupid because you have no timeouts and you are backed up." Summerall: Brady is in the shotgun and he's gonna throw it ..." https://www.youtube.com/watch?v=GC4qgrUgF9I&feature=youtu.be... A…
Re: Show HN: Learn When to Quit
#25Re: Show HN: Learn When to Quit
#26Consider using a monospace font. It is difficult to tell how large one number is relative to another when each digit has a different width
Nice job with this, I learned something new today :)
Re: Show HN: Learn When to Quit
#27Comma's would be friendlier than decimal groupings for North American users; also right-aligning would be nice.
Re: Show HN: Learn When to Quit
#28Earlier quoted context omitted.
Semi-relevant: https://en.wikipedia.org/wiki/Benford%27s_law
People, I just ran this simple script on my terminal using Node and I got a pretty uniform result. a = {} for(let i = 0; i My result: { '0': 9917, '1': 10015, '2': 9957, '3': 10107, '4': 10019, '5': 10037, '6': 10120, '7': 9914, '8': 10042, '9': 9872 }
Re: Show HN: Learn When to Quit
#29Re: Show HN: Learn When to Quit
#30This is the Secretary Problem. https://en.wikipedia.org/wiki/Secretary_problem
The solution wouldn't be to still skip 1/e if you got something like googol - 1 on the first try.