Hacker Newsnew | past | comments | ask | show | jobs | submit | thedavibob's commentslogin

Yes: I'd argue that the timings actually work/worked better for Western Europe than the USA, I personally preferred doing the puzzle at 5am (UK) than the midnight equivalent, as I could finish before work (on a good day).

Nearly scratched a decent ranking once only, top 300 or so.


Either Russia (8am) or West Coast US (9pm) would be my preferred options.

Sadly it's 5am for me as I'm in the UK.

In 8 years I can say I've never once tried to be awake at 5am in order to do the puzzle. The one time I happened to still be awake at 5am during AoC I was quite spectacularly drunk so looking at AoC would have been utterly pointless.

Anything before 6.45am and I'm hopefully asleep. 7am isn't great as 7am-8am I'm usually trying to get my kid up, fed and out the door to go to school. Weekends are for not waking up at 7am if I don't need to.

9am or later and it messes with the working day too much.

Looking back at my submission times from 2017 onwards (I only found AoC in 2017 so did 2015/2016 retrospectively) I've only got two submissions under 02:xx:xx (e.g. 7am for me). Both were around 6.42am so I guess I was up a bit earlier that day (6.30am) and was waiting for my kid to wake up and managed to get part 1 done quickly.

My usual plan was to get my kid out of the door sometime between 7.30am and 8am and then work on AoC until I started work around 9am. If I hadn't finished it then I'd get a bit more time during my lunch hour and, if still not finished, find some time in the evening after work and family time.

Out of the 400 submissions from 2017-2024 inclusive I've only got 20 that are marked as ">24h" and many of these were days where I was out for the entire day with my wife/kid so I didn't get to even look at the problem until the next day. Only 4 of them are where I submitted part 1 within 24h but part 2 slipped beyond 24h.

Enormous understatement: I were unencumbered by wife/kids then my life would be quite a bit different.


> Recovering this power is why Brexit was so important. With it we can build the green infrastructure we need as we built the railways - via dictatorial Acts of Parliament that brook no opposition.

Like, for example, the High Speed Rail (London-West Midlands) Act, which passed in 2017 and was pootling through parliament from 2013? i.e. almost entirely before even the Brexit referendum, and definitely before Brexit?


Have you skimmed through the Act?

It was passed, deliberately, with thousands of pages of legalese, riders, caveats, opt-outs, etc…

Very different from a one page Act that would delegate supreme power to some HSR committee with the power to destroy anyone who resists.


> you can select an initial guess that is offset from 50

Given that 7 guesses covers 128 numbers, you can offset by +/- 14 without actually affecting the "worst case" of the algorithm (i.e. provided you have at most 64 either side of your guess). As you say, randomly selecting this offset would neuter most adversarial examples (purposefully chosen to fall into the gaps of binary search) and would possibly completely remove the benefits from adversarial choice (though a tailored distribution on offset might be required there).

I'd be interested in such an analysis too.


> Given that 7 guesses covers 128 numbers

I might be confused, but don't 7 guesses actually cover 255 numbers? I think you have to count all nodes in the search tree, not only the leafs, because you can get the correct number before reaching a leaf node.

Or more generally k guesses cover 2^(k+1)-1 numbers, e.g. with one guess you get the answers correct/high/low, which can cover 3 numbers)

Maybe there is a mistake in my thinking, because this would mean you can cover 127 numbers with 6 guesses so you could not lose the original game.

Edit: My mistake is that you still have to explicitly guess even if you know the precise answer already, so you cannot cover 3 numbers with 1 guess. This means 7 guesses cover 127 numbers.


Your logic is correct but you are off-by-one. 1 guess gets you 1 number, so the formula is 2^k - 1, and 7 guesses thus covers 127 numbers.

You can also view it as a recurrence:

  f(1) = 1
  f(n) = 2*f(n - 1) + 1 = 2^n - 1
But your binary search tree example is more intuitive.


Yes, you are right. In this game, you can know the answer after 6 guesses, but then you also have to tell him, which counts as the 7th guess.


You are correct that you can know the answer in 6, but actually winning requires you to “guess” that one last time once you know it.


That approach would still leave you weak to always picking 1 or 100. Without proof, I believe the optimal guessing strategy would perform equal (on average) for every number, to not give the opponent any standout choice (common for optimal strategies, but not always the case). If my math serves me right, that would be an average of log2(100) = 6.64 guesses for any number, which would make you lose 0.64$ on average.


Although upon further thinking, you could then sprinkle in some binomial searches to abuse the uniformity. So the -0.64$ is merely a lower bound.


You forget that the quick guesses bring you more than $1!

As the original article says, on average you can win $0.20. But that's indeed the upper bound if we speak of the adversarial number picking.


I don't think you have to put your random offset all in the first guess either. Maybe you could random offset +/- 7 on the first guess, +/- 3 or 4 on the next, something like that.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: