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

Okay, that makes sense.

That said, it still seems like a complicated scoring mechanism. I offer:

my $score = ( $totalTries - $minimumTries ) * ( ( $totalTime - $timeInCheckSub ) / $totalTries );

With the number of tries for any given attempt being set to the theoretical maximum for any erroneous solution returned.


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.
RIP PCW It is as I've been saying!(Audio until 20090817)

Replies are listed 'Best First'.
Re^5: Challenge: Optimal Bagels Strategy
by ambrus (Abbot) on Sep 28, 2009 at 08:58 UTC

    I recommended the score being simply the total number of tries, with the restriction that each program is tested with the same multiset of solutions. I'd now like to augment this with the condition that there be only a few (say three) different (v, p) pairs tested (in the scoring runs at least), and the score and winner computed separately for each pair, because the submissions can behave really differently for each pair, so there's no fair scoring algorithm that works. (I also suggested elsewhere in this thread that these few parameter pairs be published in advance.)

    (And yes, I want to write a submission, I even have an idea, but I don't have much time on my hands now because of, you know, Real Life occupations. Sorry.)

    (Update: I'm not saying I'll write a well-scoring solution or have a good idea, I just mean some working submission and some idea.)

      I recommended the score being simply the total number of tries,

      Then a brute-force solution scores the same as a clever algorithm even if it takes a year to complete.


      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.

        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.

Re^5: Challenge: Optimal Bagels Strategy
by Anonymous Monk on Sep 27, 2009 at 11:56 UTC

    Now we'll only need more solution proposals, or else all this meta discussion will remain rather academic :-)

      Trying--it's quite tough,


      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.