Egg dropping contest
Javascript, 442859 442857 74825 calls



function findFloor(f){
    var max = 1;
  var min = 0;

  //First egg.
  var n = 1;
  while (f(max)) {
    min = max;
    n += 1;
    max = tetrahedral(n);
  }

  if (max &lt;= min + 1){
    return min;
  }

  //Second egg.
  do {
    var range = max - min;
    var floor = min + reverseTriangle(range);
    var smashed = !f(floor);
    if (smashed) {
        max = floor;
    } else {
        min = floor;
    }
  } while (!smashed &amp;&amp; max &gt; min + 1);

  if (max &lt;= min + 1){
    return min;
  }

  //Third egg.
  while (max &gt; min + 1){
    var floor = min + 1;
    var smashed = !f(floor);
    if (smashed) {
        max = floor;
    } else {
        min = floor;
    }
    if (smashed) {
        break;
    }
  }

  return min;

}

function reverseTriangle(x) {
    return Math.ceil((-1 + Math.sqrt(1 + 8 * x)) / 2);
}

function tetrahedral(n) {
    return n * (n + 1) * (n + 2) / 6;
}


Test here

Scores for each individual test case:

0: 1, 1: 4, 2: 4, 3: 3, 4: 5, 6: 6, 7: 6, 8: 6, 10: 6, 14: 7, 15: 8, 18: 8, 20: 7, 27: 10, 29: 9, 40: 12, 57: 10, 61: 14, 91: 16, 104: 16, 133: 16, 194: 17, 233: 16, 308: 24, 425: 26, 530: 28, 735: 31, 1057: 33, 1308: 38, 1874: 32, 2576: 47, 3162: 45, 3769: 43, 3804: 55, 4872: 52, 6309: 63, 7731: 69, 11167: 69, 11476: 80, 15223: 90, 15603: 75, 16034: 82, 22761: 69, 29204: 110, 35268: 101, 42481: 105, 56238: 126, 68723: 113, 83062: 113, 95681: 160, 113965: 149, 152145: 148, 202644: 187, 287964: 238, 335302: 175, 376279: 258, 466202: 250, 475558: 247, 666030: 256, 743517: 237, 782403: 245, 903170: 278, 1078242: 256, 1435682: 408, 1856036: 304, 2373214: 401, 3283373: 286, 4545125: 328, 6215594: 510, 7309899: 616, 7848365: 458, 8096538: 683, 10409246: 754, 15103057: 787, 20271921: 653, 22186329: 957, 23602446: 754, 32341327: 1141, 33354300: 1033, 46852754: 984, 65157555: 839, 93637992: 1539, 107681394: 1130, 152487773: 1605, 181996529: 1845, 225801707: 1760, 324194358: 2346, 435824227: 2244, 579337939: 2670, 600264328: 2620, 827690923: 3047, 1129093889: 3334, 1260597310: 3813, 1473972478: 4076, 1952345052: 3946, 1977336057: 3599, 2512749509: 4414, 3278750235: 3600, 3747691805: 5580, 5146052509: 4751


How it works:

1 egg:

When there is one egg, the best strategy is to go up 1 floor at a time and return the floor directly below the floor where it breaks first.

2 eggs:

When we have two eggs, the maximum number of floors we have to check will be the smallest n for which Tn is greater than the range of floors we have to check. Tn is the nth triangle number. The first throw will be done on the nth floor. The second throw will be done n - 1 floors above the first throw. The mth throw will be done  n - m + 1 floors above the m - 1th throw. After the egg smashes, it will take n - m throws to determine the floor by the first method.

3 eggs:

With the first of our eggs we should determine an upper limit for the highest floor. Originally, I did this by doubling the floor number each time. After analyzing the algorithm for 2 eggs I thought that maybe it would be better if each time we throw the egg, the max throws for finding the correct floor with 2 eggs would increase by 1. This can be satisfied by using the tetrahedral numbers. After the first egg smashes, we can use the above methods for our remaining eggs.

The max egg drops it requires to determine the floor should be optimal. However, a better algorithm could probably be found where the average egg drops is better.