in reply to Re^6: Challenge: Optimal Bagels Strategy
in thread Challenge: Optimal Bagels Strategy

You can't brute force the largest case where v = 10 and p = 36 by far. More importantly my problem with your formula is that if it's taken seriously, it might favor solutions that run within a millisecond and are optimized for speed in complicated ways, which I wouldn't quite like. As a compromise, how about at least changing your formula in the following way:

score = (totalTries - minimumTries) * max((totalTime - timeInCheckSub) / totalTries, smallTimeConstant)

On second thought, do as you want, I probably don't really care about any scoring or winning here, I'd like to write a solution that satisfy me, and learn from it. If you make a common and mostly mechanical framework, it should rather rigorously test the solutions for correctness and be a developer's aid rather than select a winner.

  • Comment on Re^7: Challenge: Optimal Bagels Strategy

Replies are listed 'Best First'.
Re^8: Challenge: Optimal Bagels Strategy
by BrowserUk (Patriarch) on Sep 28, 2009 at 11:28 UTC
    On second thought, do as you want,

    Hell. I'm still trying to get mine to cover all the edge cases.

    I was just trying to simplify midLifeXis' 4 criteria into something that allows us to compare algorithm against algorithm in a sane way. He did ask for suggestions, so I gave him one.

    Grr. Paranoia!


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.