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.
In reply to Re^7: Challenge: Optimal Bagels Strategy
by ambrus
in thread Challenge: Optimal Bagels Strategy
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |