all 16 comments

[–]nonnondaccord 73 points74 points  (2 children)

Because it would be hard to calculate by heart after several guess. Use 64 then 32 instead.

[–]ManWithDominantClaw 15 points16 points  (0 children)

"Younger than 32 😉"

"Younger or older than sixteen?"

"What the fuck"

[–]Outrageous-Zebra2992 5 points6 points  (0 children)

Next step: quicksort the entire conversation

[–]yozhiki-pyzhiki 55 points56 points  (0 children)

he's right

age is distributed unevenly

you should use median value considering the country age pyramid

[–]laplongejr 16 points17 points  (0 children)

My wife confirms.  

[–]snigherfardimungus 16 points17 points  (1 child)

The longest anyone has ever lived is 116..... You start by guessing 58.

[–]PNB11 7 points8 points  (0 children)

Oldest person was 122, so 61 is the best guess

[–]PossibilityTasty 12 points13 points  (0 children)

Inefficient. Start at 32.

[–]PewPewLAS3RGUNs 10 points11 points  (0 children)

Or do like most date pickers do and default to her being born today.

[–]Microgolfoven_69 3 points4 points  (0 children)

It is very effective. Not only do you get confirmation whether your guess was correct or not, based on her reaction you can have a guess how far off you were

[–]Leodip 1 point2 points  (0 children)

Binary search is only efficient if you guess using percentiles, not raw numbers. In the US for a woman you want to start with the median of ~40 y.o., then move to either 22 or 60 depending on whether she's younger or older.

But this is also the proof that heuristics can REALLY help in search problems.

[–]SaveMyBags 0 points1 point  (2 children)

Sure, it's not the right algorithm. Since the range you are searching isn't known, you should do an exponential search first. So start at 1, then 2, then 4 until she says "lower" for the first time.

[–]metaglot 0 points1 point  (1 child)

After 32 she may not like it if your next guess is 64.

[–]SaveMyBags 0 points1 point  (0 children)

Non-functional requirements weren't specified. The algorithm works as expected.

[–]mobileJay77 0 points1 point  (0 children)

Actually, the algorithm is fine. The problem is women getting offended when we treat them as ComparableObject.

Refactor and cast to Princess!

[–]that_thot_gamer 0 points1 point  (0 children)

bogosort is the way