text:
Egg dropping contest
Your challenge:
You are on the 0th floor of a infinitely tall building. At any floor, you can walk to the window and drop an egg.  Your goal is to figure out the highest floor that the egg can withstand without breaking.  However, you have a maximum of 3 eggs to use to figure this out, but you need to minimize the number of tries.
In formal terms:

You are given a function f(n) which returns bool(n <= X) for an unknown X, where 0 <= X
You must return the value of X (without accessing it directly)
f(n) must only return False a maximum of 3 times (in a single test case).  If it returns False more than that, then your answer is disqualified.

Restrictions
Your score is the total number of calls you make to f(n) (in the test cases below)
If you wish, you may forgo passing in a function, and simply "simulate" the above situation.  However, your solving algorithm must know nothing of X.
Your algorithm should not hard code the test cases, or a maximum X.  If I were to regenerate the numbers, or add more, your program should be able to handle them (with a similar score).
If your language doesn't support arbitrary precision integers, then you may use the long datatype.  If your language doesn't support either, then you are out of luck.
The nth test case is generated using the following:
g(n) = max(g(n-1)*random(1,1.5), n+1), g(0) = 0, or approximately 1.25^n
Test cases:
0,1,2,3,4,6,7,8,10,14,15,18,20,27,29,40,57,61,91,104,133,194,233,308,425,530,735,1057,1308,1874,2576,3162,3769,3804,4872,6309,7731,11167,11476,15223,15603,16034,22761,29204,35268,42481,56238,68723,83062,95681,113965,152145,202644,287964,335302,376279,466202,475558,666030,743517,782403,903170,1078242,1435682,1856036,2373214,3283373,4545125,6215594,7309899,7848365,8096538,10409246,15103057,20271921,22186329,23602446,32341327,33354300,46852754,65157555,93637992,107681394,152487773,181996529,225801707,324194358,435824227,579337939,600264328,827690923,1129093889,1260597310,1473972478,1952345052,1977336057,2512749509,3278750235,3747691805,5146052509

This is a code-challenge, and the person with the lowest score wins!

Related (see also questions linked in my comment on that one).

@PeterTaylor my problem is different to the "classic" egg problem in that it doesn't have a maximum floor.

Related question on Puzzling SE (but also with a maximum floor number).

If I drop one egg from the window of the zeroth floor of any building, I'm pretty sure it will smash. Problem solved

This actually sounds more like a puzzle rather than a coding challenge...

Can we use libraries for arbitrary precision math?

@Doᴡɴɢᴏᴀᴛ absolutely.

I don't understand the distribtuion. What's n and g (n)?

@NathanMerrill That's not a distribution unless we know an upper bound for n.

@FUZxxl there is no upper bound to the test cases.  For the nth test case, there is an upper bound of n^1.5

@NathanMerrill Point is, this is essentially useless as we can't know anything about how probable each size of x is as you refuse to specify what we can assume about n. It's impossible to write an optimized answer if we don't know all the parameters of how you run the scoring. If you would tell us “your code is run on 100 test cases from n = 0 to 99,” that would be a useful guarantee. Or if you made g independent of n.

@FUZxxl Basically, find the algorithm that uses the asymptotically lowest number of egg drops to find n as n increases to infinity.

Voting to close: Without a probability distribution to fairly replicate the scoring process, the winning criterion is not objective.

Comments are not for extended discussion; this conversation has been moved to chat.

@NathanMerrill You could probably find a better winning criteria using the information in this room.

Wait, so the test case is X?

Will there always be the number of test cases you gave? The distribution crucially depends on that number.

@xnor for scoring, yes.  The test cases you see above are not going to change.  However, your program should be able to handle any number as input without needing dramatically more calls.  (For example, if you use the proven optimal algorithm using the maximum test case listed, that is not allowed)

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 <= 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 && max > min + 1);

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

  //Third egg.
  while (max > 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.

Java, 68985 calls
public static long solve(Predicate<Long> eggSurvives) {
  long bestFloor = 0, e1 = 1, e2;

  for(long callsDone = 2; eggSurvives.test(e1); bestFloor = e1, e1 += callsDone * callsDone++);

  for(e2 = bestFloor;; bestFloor = e2) {
    e2 += Math.max((long)Math.sqrt(e1 - e2), 1);

    if(e2 >= e1 || !eggSurvives.test(e2)) {
      break;
    }
  }

  for(long e3 = bestFloor + 1; e3 < e2 && eggSurvives.test(e3); e3++) {
    bestFloor = e3;
  }

  return bestFloor;
}

Test results:
0: 1 1: 4 2: 4 3: 4 4: 4 6: 6 7: 6 8: 6 10: 7 14: 6 15: 7 18: 7 20: 8 27: 10 29: 10 40: 10 57: 10 61: 9 91: 9 104: 11 133: 18 194: 20 233: 18 308: 18 425: 17 530: 17 735: 28 1057: 31 1308: 30 1874: 30 2576: 39 3162: 47 3769: 60 3804: 34 4872: 65 6309: 37 7731: 48 11167: 79 11476: 39 15223: 56 15603: 82 16034: 93 22761: 88 29204: 111 35268: 110 42481: 127 56238: 126 68723: 135 83062: 117 95681: 115 113965: 137 152145: 138 202644: 115 287964: 234 335302: 223 376279: 244 466202: 220 475558: 193 666030: 214 743517: 225 782403: 230 903170: 338 1078242: 223 1435682: 303 1856036: 384 2373214: 453 3283373: 542 4545125: 459 6215594: 525 7309899: 600 7848365: 388 8096538: 446 10409246: 466 15103057: 650 20271921: 822 22186329: 899 23602446: 698 32341327: 804 33354300: 1065 46852754: 1016 65157555: 1408 93637992: 1390 107681394: 1638 152487773: 1283 181996529: 1877 225801707: 2067 324194358: 1842 435824227: 3110 579337939: 2983 600264328: 1817 827690923: 2450 1129093889: 2981 1260597310: 3562 1473972478: 4237 1952345052: 2244 1977336057: 3585 2512749509: 2893 3278750235: 3101 3747691805: 5182 5146052509: 4107

Test program:
import java.util.function.Predicate;

public class Eggs {
  private static long totalCalls;
  private static long calls;

  public static void main(String[] args) {
    for(long maxFloor : new long[] {0,1,2,3,4,6,7,8,10,14,15,18,20,27,29,40,57,61,91,104,133,194,233,308,425,530,735,1057,1308,1874,2576,3162,3769,3804,4872,6309,7731,11167,11476,15223,15603,16034,22761,29204,35268,42481,56238,68723,83062,95681,113965,152145,202644,287964,335302,376279,466202,475558,666030,743517,782403,903170,1078242,1435682,1856036,2373214,3283373,4545125,6215594,7309899,7848365,8096538,10409246,15103057,20271921,22186329,23602446,32341327,33354300,46852754,65157555,93637992,107681394,152487773,181996529,225801707,324194358,435824227,579337939,600264328,827690923,1129093889,1260597310,1473972478,1952345052,1977336057,2512749509L,3278750235L,3747691805L,5146052509L}) {
      long resultingFloor = solve(f -> {
        calls++;
        return f <= maxFloor;
      });

      if(resultingFloor != maxFloor) {
        throw new RuntimeException("Disqualified");
      }

      System.out.print(maxFloor + ": " + calls + " ");
      totalCalls += calls;
      calls = 0;
    }

    System.out.println("\nCalls = " + totalCalls);
  }

  public static long solve(Predicate<Long> eggSurvives) {
    long bestFloor = 0, e1 = 1, e2;

    for(long callsDone = 2; eggSurvives.test(e1); bestFloor = e1, e1 += callsDone * callsDone++);

    for(e2 = bestFloor;; bestFloor = e2) {
      e2 += Math.max((long)Math.sqrt(e1 - e2), 1);

      if(e2 >= e1 || !eggSurvives.test(e2)) {
        break;
      }
    }

    for(long e3 = bestFloor + 1; e3 < e2 && eggSurvives.test(e3); e3++) {
      bestFloor = e3;
    }

    return bestFloor;
  }
}

While optimizing I aimed for trying to make the number of attempts with each egg roughly equal.

The first egg goes up in number of floors based on the number of attempts so far.
The second egg skips floors based on the square root of the maximum number of attempts that could be left (based on the lower and upper bound established by the first egg) so that the average number of attempts for the 3rd and final egg should on average be the same as attempts for the 2nd egg.

Ruby, 67466 66026 calls
$calls = 0

def drop n
    $calls += 1
    n <= $x
end

def test
    min = 0
    test = 8
    i = 8
    while drop(test)
        min = test
        test += i*i
        i+=1
    end
    max = test
    test = min+((max-min)**0.4).to_i
    while drop(test)
        min = test
        test = min+((max-min)**0.5).to_i
    end
    return min if min+1 == test
    min += 1 while drop(min+1)
    min
end

Test code:
tests = [0,1,2,3,4,6,7,8,10,14,15,18,20,27,29,40,57,61,91,104,133,194,233,308,425,530,735,1057,1308,1874,2576,3162,3769,3804,4872,6309,7731,11167,11476,15223,15603,16034,22761,29204,35268,42481,56238,68723,83062,95681,113965,152145,202644,287964,335302,376279,466202,475558,666030,743517,782403,903170,1078242,1435682,1856036,2373214,3283373,4545125,6215594,7309899,7848365,8096538,10409246,15103057,20271921,22186329,23602446,32341327,33354300,46852754,65157555,93637992,107681394,152487773,181996529,225801707,324194358,435824227,579337939,600264328,827690923,1129093889,1260597310,1473972478,1952345052,1977336057,2512749509,3278750235,3747691805,5146052509]
tests.each{|n|$x = n;test;$calls}
puts $calls

Results:
0: 3, 1: 4, 2: 4, 3: 5, 4: 5, 6: 5, 7: 6, 8: 4, 10: 6, 14: 6, 15: 7, 18: 10, 20: 6, 27: 7, 29: 9, 40: 10, 57: 13, 61: 15, 91: 13, 104: 13, 133: 15, 194: 12, 233: 18, 308: 16, 425: 15, 530: 15, 735: 16, 1057: 32, 1308: 30, 1874: 35, 2576: 35, 3162: 54, 3769: 32, 3804: 29, 4872: 45, 6309: 42, 7731: 55, 11167: 72, 11476: 60, 15223: 55, 15603: 71, 16034: 94, 22761: 82, 29204: 119, 35268: 106, 42481: 123, 56238: 127, 68723: 110, 83062: 95, 95681: 139, 113965: 149, 152145: 149, 202644: 144, 287964: 219, 335302: 189, 376279: 183, 466202: 234, 475558: 174, 666030: 235, 743517: 195, 782403: 235, 903170: 346, 1078242: 215, 1435682: 245, 1856036: 422, 2373214: 448, 3283373: 512, 4545125: 378, 6215594: 502, 7309899: 486, 7848365: 440, 8096538: 496, 10409246: 566, 15103057: 667, 20271921: 949, 22186329: 829, 23602446: 746, 32341327: 799, 33354300: 964, 46852754: 1125, 65157555: 1317, 93637992: 1000, 107681394: 1361, 152487773: 1215, 181996529: 2004, 225801707: 1752, 324194358: 1868, 435824227: 3084, 579337939: 2592, 600264328: 1726, 827690923: 2577, 1129093889: 3022, 1260597310: 2582, 1473972478: 3748, 1952345052: 2035, 1977336057: 3712, 2512749509: 2859, 3278750235: 2888, 3747691805: 5309, 5146052509: 4234

This algorithm works like my old algorithm, but has a few differences:

The first egg drop is at floor 8

The first increment is 8*8 = 64

These numbers are a result of random fine tuning by hand.


text:
Tips for golfing in Forth
What general tips do you have for golfing in Forth (and its clones)? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Forth (e.g. "remove comments" is not an answer).

Avoid explicit loops at all costs
Forth has two looping constructs, x y do ... loop, and lesser known [begin] ... [until] x y where x and y are values for limit and index, or conditions to be noted, respectively.
These are very slow, very wordy (haha) and overall rather bloaty, so only use them if you need to.
Instead, like a proper functional language (which Forth is, really), one should prefer recursivity over explicit loops because it tends to be shorter and makes a better use of the language.

Forth has a lot of cool builtin words, many of which are helpful for crafting the sorts of algorithms found on PPCG.
A bad but illustrative example of this are the words for increment (1+) and decrement (1-). They save a byte over writing 1 + to increment the top of the stack.
Additonally, here is a handy list of many (probably not all) words found in modern distributions like gforth.

Leave the junk
Programs aren't required to be stack-safe.
Instead, they can leave extra junk on the stack if it saves you bytes. In Forth, the "return value" is leaving something on top of the stack. It probably doesn't matter what junk you have below that on the stack unless you're using recursion and stack depth matters.

Watch the stack
When writing your code, pay attention to what happens on the stack at each command. I usually draw it out as I go, like so:
6       6
7       7 6
* DUP   42 42

As you go like this, you may find it easier to recognize when you can make use of stack operations like ROT, -ROT, 2DUP, 2OVER, etc...

Try using various double-cell words
This includes double-cell arithmetic, bitwise, number comparison and stack manipulation words. Double-cell integer literals also count.

Appending a period on an integer literal (e.g. 1.) gives a double-cell literal. For small numbers, it means pushing an extra zero at the cost of only one byte.
m+ = 0 d+ ~= under+ (not exactly, since overflow may occur.)
d2* and d2/ could be used to extract/push one bit from a word.
a b c d d= = a c = b d = and
a b c d d<> = a c <> b d <> or
Words that copy two numbers at once, e.g. 2dup, 2over, 2tuck have a good chance to win over local variables.

(gforth-specific) Utilize the separate floating-point stack
gforth has a separate stack for floating-point numbers. Even if you're only dealing with integers, offloading some work and storage to the FP stack may result in shorter code overall, either by avoiding explicit stack manipulation or using FP-specific operations not available on the main stack. Returning to the FP stack is also a perfectly valid option (except when the task is to return a boolean).

FP-related operations (arithmetic, stack manipulation) usually cost one more byte each (the f prefix, as in f+, fdup etc.). FP number literals also cost one more byte (postfix e, as in 1e), but some numbers can tie or even save a byte (e.g. 1e3 instead of 1000).
Some operations are missing on the FP stack, probably the most painful being 1+ and 1-.
FP stack's unique operations include f** (power), falog (power of 10), fsqrt, and various exp, log, trigonometry-related ones.
You can move numbers between main and FP stacks via s>f (single to float), f>s (float to single), d>f (double to float), f>d (float to double). At times, the "double" variations may be used to produce or consume an extra zero.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Lipogram "quine"
Task

Take a single Unicode character as input.
Output a program in the same language that also obeys this specification, but which does not contain the input character.
If your program is run with input a, and then the output program is then run with input b, then the program it outputs is ALLOWED to contain character a. However, b is still not allowed to appear in this program. In other words, only the input into the most recent incarnation of the program is forbidden to appear.
Regardless of what the title may say, standard quine rules apply.

Shortest program wins. Program must be at least one byte long.
Example
If the program is ABCD. (# is an comment)
> slangi "ABCD"
A
EBCD          # "FBCD" "JGGJ" "UGDKJGDJK" are all OK
> slangi "EBCD"
C
ABGD          # "EBGD" "UIHDAIUTD" are all OK
> slangi "ABGD"
B
AFCD
> slangi "AFCD"
Z
ABCD

Where slangi is an interpreter for a fictitious language.

Wouldn't this challenge less verbose languages? Several use words for instruction names, so it would be very difficult and/or impossible to avoid characters such as e.

It's very difficult to write in English without e, yet Gadsby does it.

I'm assuming no quine functions?

CJam, 45 41 38 35 bytes
{`"OX$_?"+_l&{{H)+`}/"\He,}":)}&}_~

If the input character is none of the characters "$&)+,/:?HOX\_`el{}, this program prints the following, slightly modified version of itself. Try it online!
{`"OX$_?"+_l&{{H)+`}/"\He,}":)}&}OX$_?

Otherwise, the program prints the following, obfuscated version of the modification. Try it online!
''r'4'a'j'6'q'Q'4'='q'~'8'''Z';'='r''A'4'n'Z'w'>''4'L';''8''a'j'6'q'Q]If-~

Note that some of the characters are unprintable. Try it online!
How it works
{`"OX$_?"+_l&{{H)+`}/"\He,}":)}&}_~

{                               }    Define a code block.
                                 _~  Push a copy and execute the copy.
 `                                   Push a string representation of the block.
  "OX$_?"                            Push that string.
         +_                          Concatenate and push a copy.
           l&                        Intersect the copy with the input.
             {                }&     If the intersection is non-empty:
              {    }/                  For each character of the concat. strings:
               H)                        Push 18.
                 +                       Add it to the character.
                  `                      Inspect; turn 'c into "'c".
                     "He,}"            Push that string.
                           :)          Increment each char. Pushes "If-~"

In the first possible output program, we avoid using ~ to be able to use it in the other program. Therefore, instead of _~, the modified program ends with OX$_?, which works as follows.
O        Push "" (falsy).
 X$      Push a copy of the code block.
   _     Push yet another copy.
    ?    Ternary if; since "" is falsy, execute the second copy.

Finally, in the remaining output program,
''r'4'a'j'6'q'Q'4'='q'~'8'''Z';'='r''A'4'n'Z'w'>''4'L';''8''a'j'6'q'Q]

wraps all those characters in an array, therefore pushing the following string.
"'4aj6qQ4=q~8'Z;=r'104nZw>'4L;'8'j6qQ"

If- subtracts 18 from each character code, pushing the string
"{`\"OX$_?\"+_l&{{H)+`}/\"\He,}\":)}&}OX$_?"

which ~ the evaluates.

JavaScript (ES6), 356 340 327 308 303 263
Now using Function`...``` for the second program:
f=(b=y=>[for(x of`f=${f};f()`)x.charCodeAt().toString(y).toUpperCase()])=>alert([`eval('\\${b(8).join('\\')}')`,`eval(String.fromCharCode(${b(10).map(x=>'+9-8'.repeat(x))}))`,'Function`\\x'+b(16).join('\\x')+'```'][1+"0e1v2a3l4(5'6'7)\\".indexOf(prompt())%2]);f()

The function packs itself into one of three possible programs:

The first program calls eval on a string literal containing the function's code with each character escaped as an octal value.
eval('\146\165...')

The second program redirects the browser to a javascript: URL containing the function's code with each character URL encoded. This is the only way I could think to evaluate code without using parentheses. It also escapes the letters in 'eval'.
window["\x6coc\x61tion"]["hr\x65f"]="j\x61\x76\x61script:%66%75..."

The last program is painfully long. It builds the function's code by adding one (+9-8) at a time to get each character code. This is to avoid using the octal digits.
eval(String.fromCharCode(+9-8+9-8+9-8+9-8...))

The correct program is indexed by searching a carefully constructed string for the input character:
[`program_1`,`program_3`,`program_2`][1+"0e1v2a3l4(5'6'7)\\".indexOf(prompt())%2]

Here's an ungolfed, untested version. It might not work because of newlines in the source.
function f() {
    // convert source code of current function to bytes
    var bytes = Array.map(f + 'f()', x => x.charCodeAt());

    // pack this function's code in one of three possible programs,
    // depending on the input
    var input = prompt();

    // PROGRAM 1 - only contains characters: eval(')01234567\
    // eval('\146\165...')
    var source = "eval('\\" + bytes.map(x => x.toString(8)).join('\\') + "')";

    // PROGRAM 2 - doesn't contain characters: eval('')
    // window["\x6coc\x61tion"]["hr\x65f"]="j\x61\x76\x61script:%66%75..."
    // -> window["location"]["href"] = "javascript:..."
    if ("eval(')".includes(input)) {
        source = 'window["\\x6coc\\x61tion"]["hr\\x65f"]="j\\x61\\x76\\x61script:%';
        source += bytes.map(x => x.toString(16).toUpperCase()).join('%') + '"';
    }

    // PROGRAM 3 - doesn't contain characters: 01234567\
    // eval(String.fromCharCode(+9-8+9-8+9-8+9-8...))
    if ('01234567\\'.includes(input)) {
        source = "eval(String.fromCharCode(";
        source += bytes.map(x => '+9-8'.repeat(x)).join(',') + '))';
    }

    console.log(source);
}
f()

function f(){ ... };f() can be (f=_=>{ ... })(). Here's an example: http://www.es6fiddle.net/iiz2nq0l/

Even better: f=(_=prompt())=>...;f(). Input is stored as _.

Also, no need for console.log, function output is fine.

Won't using Function`[code]`.call``; work for you, instead of redirecting? Here is a working example: http://www.es6fiddle.net/ij023v49/ (See? No evil()! Erm, I mean eval()...)

Well, you have learned something today. Just be aware that the this object will be that empty template string. It relies on the Function constructor, which allows you to create a function, instead of running eval(). The function will have the code contained within the first parameter. I use it a lot to get the real window, using Function('return this')(). Since you can't use (), I've abused a little of ES6's kindness to try to spit an usable function that you can run without (). For that, you need the .call() method, which calls the function with a new  this object.

@IsmaelMiguel can you use:
Function`return 1```

@DomHastings You can use that, but it won't execute. The .call``  is to make sure that it is called. Without it, you could do A=Function`return 1`,A, with no byte savings.

@IsmaelMiguel but it does call the function (as if with an empty param)? Apologies if I missed the need to use call, but if you aren't using this in the code that shouldn't matter right? I mostly wanted to share because I thought that three backticks in a row would be a syntax error and was surprised when they didn't! I did also wonder if using template string eval would be shorter too, but since you can't return anything from it probably not...

@DomHastings Now I see what you did there! That is magnificent! That is way cooler than my code! That is really quite a nice saving! The reason why I went this way is because on the 2nd function, you can't use any of the chars eval('). grc found a way to execute code by redirecting to a javascript: url. Since the Function prototype doesnt contain any of the forbiden chars, I though he could use that to run his code. But you... You smashed it! Well done! Really good idea! I am surprised that it works as well!

Thanks. I've improved it, but It's a shame you can't use octal encoding inside string templates...

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Hotel room numbering
Given an input of a "hotel" in ASCII art with a single room marked, output the
room number according to certain rules.
Here's an example of an ASCII hotel:
               ##
               ##
#####          ##
#####  ######  ##
#####  ######  ##
#####  ######  ##

Here are a few more things about the ASCII hotels:

Each "building" is represented by a rectangle of # characters, where each
# represents a "room".
The above hotel consists of three buildings. Each building is separated by
two columns of spaces, and the lowest "floor" will always be on the last
line.
Each building will always have anywhere from 1-9 "floors" (rows) and 1-9
"rooms" on each floor. There will also always be 1-9 buildings.
Rooms are numbered as follows: [building #][floor #][room on floor #]. For
example, let's mark a few rooms in the above drawing:
               ##
               ##
#####          ##
#####  ####$#  ##
##%##  ######  ##
#####  ######  #@

The room marked with the % is room 123 (building 1, floor 2, 3rd room on
floor). Similarly, the room marked with the $ is room 235, and the @ is
room 312.
Buildings, floors, and "nth room on floor"s are always 1-indexed.

The input will consist of an ASCII hotel with a single room replaced with an
asterisk (*). This is the room for which you must output the room number. The
input must be taken as a single string, but you may use commas as line
separators instead of newlines (in case your language of choice cannot take
multiline input or if it's shorter to take single-line input). You may
optionally require a trailing comma/newline. You may also pad lines with
trailing spaces to make the input a complete rectangle.
Since this is code-golf, the shortest code in bytes wins.
Test cases (contained within a single code block to conserve vertical space):
Input:
*

Output: 111

Input:
#  #  *  #  #

Output: 311

Input:
#####
#####
####*
#####
#####

Output: 135

Input:
         #####
         #####           ######
         #####           ######
#  #  #  #####  #  #  #  ######  *

Output: 911

Input:
#
#  #
#  #  ##
#  #  ##  ###
#  #  ##  ###  #####
#  #  ##  ###  ##*##  ########
#  #  ##  ###  #####  ########

Output: 523

Input:
           #
           *
           #
           #
           #
           #
           #
           #
#########  #  #

Output: 281

Input:
                        ########*
                        #########
                        #########
                        #########
                        #########
                        #########
                        #########
                        #########
#  #  #  #  #  #  #  #  #########

Output: 999

Will there ever be a completely empty input

@Doᴡɴɢᴏᴀᴛ There will always be an asterisk somewhere, so no.

Can we require the input to be padded with spaces to make a rectangle of characters?

@KSFT Sure. Edited post to specify that.

For some weird reason you start counting at 1, not at 0. ;-p

Seriously: it might be usefull to add that you buildings are always rectangular in shape (right?)

@agtoever Yes, they are.

I'm finishing a Python solution. Is an input in the form of a comma separated Python list of strings ok (for example 3 buildings with 2 floors: ["#  #  #","#  *  #"]), or must I stick to `"#  #  #,#  *  #"?

@agtoever No, it must be a single string, as stated in the question.

Ok. I'll adjust my answer accordingly in a few hours.

Is the newline/comma a line separator, or a line terminator (my solution relies on the former) - that is, is there a newline/comma at the end of the input?

@ecatmur Either one; whichever is more convenient. (Edited into question)

Do all buildings start from ground level?

@immibis Yes, they always do.

CJam, 34 31 bytes
qN/W%zSf-La%{_{s'*&}#_)@@=}3*;\

This requires the input to be padded to a rectangle with spaces.
Try it online! Alternatively, run all test cases.
Explanation
qN/      e# Read input and split into lines.
W%z      e# Rotate 90° counter-clockwise.
Sf-      e# Remove all spaces from the rows.
La%      e# Split into buildings. We've now got a 3D array of rooms, where the first
         e# dimension is the building, the second the room number and the third is the
         e# the floor number.
{        e# Run this block three times. At each stage it will find the index of the "*"
         e# along the current dimension and leave the element at that index on the stack
         e# for the next round...
  _      e#   Duplicate the current array.
  {      e#   Find the index of the first element where this block yields something
         e#   truthy...
    s    e#     Flatten into a single string.
    '*&  e#     Set intersection with "*".
  }#
  _)     e#   Duplicate the index and increment it, because the results should be 1-based.
  @@=    e#   Pull up the array and the other copy of the index and select the
         e#   corresponding element.
}3*
;\       e# We've now got the building, room and floor index on the stack, as well as the
         e# "*" character itself. We discard the character and swap the room and the floor
         e# floor number. When the three indices are printed back-to-back at the end of
         e# the program, that will yield the desired result.

Pyth, 34 bytes
LxKh/#\*b\*jkhM[//<hJ_.zyJd2xJKycK

Demonstration
This uses a golfing trick I've never used before: Assigning to a variable (K) inside a function (y) to save a partial result from that function.
Explanation:
LxKh/#\*b\*jkhM[//<hJ_.zyJd2xJKycK
L                                     Define y(b):      (b is a list of strigs)
    /#\*b                             Filter b for strings containing '*'
   h                                  Take the first such string
  K                                   Store it in K
 x       \*                           And return the index of '*' in that string.
                      .z              Take the input as a list of strings
                     _                Reverse it (bottom to top)
                    J                 Store in J
                   h                  Take the bottommost row
                        yJ            Find y(J). This is the index in whichever
                                      row of J has the * of the *. Also store
                                      that row in K.
                  <                   Slice J up to that index.
                 /        d           Count the number of spaces
                /          2          Divide by 2. This is the building number.
                            xJK       Take the index in J of K. This is the floor.
                                cK    Chop K on whitespace.
                               y      Find the index in whatever element of K has
                                      the * of the *. This is the room number.
                                      This also overwrites K, but we don't care.
               [                      Gather the above into a list.
             hM                       Convert 0-indexing to 1-indexing.
           jk                         Concatenate. Print implicitly.

JavaScript (ES6), 142 136 bytes
h=>h.split`
`.reverse(r=0).map((t,i,l)=>r?0:(f=i+1,b=1,l[o=0].slice(0,r=t.indexOf`*`+1).replace(/  /g,(_,s)=>o=++b&&s+2),r-=o))&&[b]+f+r

6 bytes saved thanks to @nderscore!
Explanation
h=>
  h.split`
`                            // get each line of the input string
  .reverse(                  // reverse the lines to make getting the ground floor easy
    r=0)                     // initialise r to 0
  .map((t,i,l)=>             // for each line of the reversed input string
    r?0:(                    // if the marked room has not been found yet:
      f=i+1,                 // f = floor number
      b=1,                   // b = building number, default to 1
      l[o=0].slice(0,        // get the substring of 0 to the marked room, default o to 0
        r=t.indexOf`*`+1)    // r = absolute index of room + 1 (or 0 if not found)
      .replace(/  /g,(_,s)=> // count the spaces between buildings
        o=++b&&s+2),         // increment b, o = index of marked room's building
      r-=o                   // make r relative to the room's building
    )
  )
  &&[b]+f+r                  // output the result ([b] casts b to a string)

Test

var solution = h=>h.split`
`.reverse(r=0).map((t,i,l)=>r?0:(f=i+1,b=1,l[o=0].slice(0,r=t.indexOf`*`+1).replace(/  /g,(_,s)=>o=++b&&s+2),r-=o))&&[b]+f+r
<textarea id="input" rows="8" cols="60">#
#  #
#  #  ##
#  #  ##  ###
#  #  ##  ###  #####
#  #  ##  ###  ##*##  ########
#  #  ##  ###  #####  ########</textarea>

<button onclick="result.textContent=solution(input.value)">Go</button>

Some byte savings (-6): .map((t,i,l)=> , slice(0,r=t.indexOf\*`+1),o=++b&&s+2,[b]+f+r`

@nderscore Thanks, I really like the [b]+f+r tip!

awk, 70
!i{i=index($0,"*")}i{$0=substr($0,0,i);f++}END{print NF f length($NF)}

Example:
Input:
#
#  #
#  #  ##
#  #  ##  ###
#  #  ##  ###  #####
#  #  ##  ###  ##*##  ########
#  #  ##  ###  #####  ########

While no * was found, do nothing.
#
#  #
#  #  ##
#  #  ##  ###
#  #  ##  ###  #####
A * is found in column 14. From now on, truncate and increment the floor counter.
#  #  ##  ###  ##*    f=1
#  #  ##  ###  ###    f=2
Awk automatically splits $0 into space separated fields, counted by builtin NR.
In the end, NR and f hold hotel and floor number.
The room number is the length of the last hotel.

C, 131 130 119 113 bytes
b,f,i,j=111;main(c){for(;c=~getchar();)c&32?f+=10,b=i=0:++i<j?c%3?f=j,j=i:c&2?b+=50-b%50:++b:0;printf("%d",b+f);}

Takes input on stdin; input must not have a terminating newline. Assumes 2's complement.
Ungolfed:
// Declare variables (default type is int) and initialize, by default to 0:
b,    // Building number (multiplied by 100, 0-based) + room number (0-based)
f,    // Floor (111-based, multiplied by 10)
i,    // Current column of input character within line (1-based)
j = 111; // Column of asterisk character once found (1-based), 111 before then
main (c)    // Declare main function and variable c to hold input character
{
  for (;    // Loop on input
    c = ~getchar();  // Read a character into c, bitwise inverted to break
                     // EOF (numeric value -1). This means that following
                     // operations (on the ASCII value of the input) are
                     // also inverted.
    )
    c & 32 ?              // Newline?
      f += 10, b = i = 0 :  // Increment floor; reset building, room, column
      ++i < j ?             // Increment column; before asterisk, or asterisk not yet found?
        c % 3 ?               // Asterisk character?
          f = j, j = i :        // Reset floor and record column
          c & 2 ?               // Space character?
            b += 50 - b % 50 :    // Increment building and reset room
            ++b :                 // Otherwise, # character; increment room
        0;                    // After asterisk; do nothing
  printf("%d", b + f);  // Write out results
}

I'm sure that trick must be used a lot in golfing, but I've never seen a program before which uses stdio, yet breaks if it's included!

@Dave an empty pair of parens is just a waste of a potential expression, and headers are a luxury :) Also stole one or two of your ideas to golf it down.

Nice. I like the building increment - saves another 3 bytes. I've nicked that idea back and managed to match your new bytecount, but I can't improve on it any further.

Stackgoat, 73 bytes [non-competing]
Stackgoat is a stack-based language that has nothing to do with goats.
y'#ZGDYZG'*iVXsV@"\\*"ZGN2/1+y'#ZG' ZG'q:Nq'*i-yXsq'*i@"[#*]+"M0M1-@'*i1+

It's a fairly new language so let me know if they're any problems with it. I gave myself quite a headache figuring this out so this is about as much as I'm golfing this.
Explanation
This program has 3 parts for each 3 digits of the room number
y'#ZG    // Remove all # from input
D        // Duplicate
YZG      // Remove all spaces
'*i      // Index of *
V        // Reverse stack
Xs       // Split on spaces
V@       // Unreverse, item at *'s index
"\\*"ZG  // Remove all *s
N        // Get length
2/1+     // Divide by 2, add 1

y'#ZG    // Remove all #
' ZG     // Remove all spaces
'q:      // Store in q
N        // Get length
q'*i     // *'s index in q
-        // Subtracted from length

yXs      // Split on newlines
q'*i     // Get index of * in q
@        // Get indexed-th line
"[#*]+"M // Match all buildings
0M       // Get *'s building no.
1-       // Subtract one
@        // nth building at right line
'*i      // *'s index
1+       // Added to one

Relevant

This appears to use two new features implemented after the challenge was posted, so the answer is noncompeting.

Out of curiosity, @Doorknob -- where is that rule defined? I tried searching and looking in all the logical places, but I couldn't find anything on it...

@Alex Here specifically for new features. Here for entirely new languages.

Ruby, 103
->n{r=x=b=0
n.lines{|s|(t=s=~/\*/)&&(x=t;r=($`.reverse+' ')=~/ /)
r+=10;b=s[0..x].count" "}
b*50+r+101}

Ungolfed in test program
g=->n{
  r=x=b=0
  n.lines{|s|                  #for each line in n
    (t=s=~/\*/)&&              #if the line contains an asterisk
      (x=t                     #record its position in x. $` is a special variable containing the part of the string to the left of the last match made.
      r=($`.reverse+' ')=~/ /) #reverse $` and search for the index of the first space to find room number (before the search a space is appended in case it is 1st building.)
    r+=10                      #increment r by 10 for the floor number (obviously this will have been reset to the row ith the asterisk by the previous line)
    b=s[0..x].count" "}        #count the number of spaces left of x in the current row to find building number (loop will exit with calc from bottom row, which is the correct one.)
b*50+r+101}                    #multiply number of spaces by 50 to get 1st digit, add r for 2nd and 3rd digit. Then add 101 to correct 1st and 3rd digits from 0-indexed to 1-indexed.

puts g["
*"]

puts g["
#  #  *  #  #"]

puts g["
#####
#####
####*
#####
#####"]

puts g["
         #####
         #####           ######
         #####           ######
#  #  #  #####  #  #  #  ######  *"]

puts g["
#
#  #
#  #  ##
#  #  ##  ###
#  #  ##  ###  #####
#  #  ##  ###  ##*##  ########
#  #  ##  ###  #####  ########"]

puts g["
           #
           *
           #
           #
           #
           #
           #
           #
#########  #  #"]

puts g["
                        ########*
                        #########
                        #########
                        #########
                        #########
                        #########
                        #########
                        #########
#  #  #  #  #  #  #  #  #########"]

I really like the clever use of `$`` in this one.

JavaScript (ES6), 121
x=>x.split`
`.reverse().map((r,f,h,a=r.indexOf`*`)=>x=~a?(h=h[0].slice(0,a).split`  `).length+[f+1]+-~h.pop().length:x)|x

Less golfed and explained
H=x=>x.split`\n` // split in lines
  .reverse() // reverse, so we can scan bottom up
  .map( (r,f,h) => // exectute for each line
         // r is the current row
         // f in the row index, so that f+1 is the floor number
         // h is the reversed array, h[0] is the bottom floor
       ~(a=r.indexOf`*`) // a is the position of '*' in the line, if found - else 0
       && ( // if a >= 0
         h = h[0]        // bottom floor line
             .slice(0,a) // ... truncated at position of '*'
             .split`  `, // ... and splitted at '  ', as an array
         x = h.length  // the array len is the building number
             + [f+1]   // floor number, using [] to force string concatenation
             + -~ h.pop().length // the length of the last array element is the number
                                 // of chars in the block before '*'
                                 // increment by 1 to get the room number
      )
  )
  && x // return the found value

TEST

H=x=>x.split`
`.reverse().map((r,f,h,a=r.indexOf`*`)=>x=~a?(h=h[0].slice(0,a).split`  `).length+[f+1]+-~h.pop().length:x)|x

// test
console.log=x=>O.textContent+=x+'\n';

;[['*',111],['#  #  *  #  #',311],
[`#####
#####
####*
#####
#####`,135],
[`         #####
         #####           ######
         #####           ######
#  #  #  #####  #  #  #  ######  *`,911],
[`#
#  #
#  #  ##
#  #  ##  ###
#  #  ##  ###  #####
#  #  ##  ###  ##*##  ########
#  #  ##  ###  #####  ########`,523],
[`           #
           *
           #
           #
           #
           #
           #
           #
#########  #  #`,281],
[`                        ########*
                        #########
                        #########
                        #########
                        #########
                        #########
                        #########
                        #########
#  #  #  #  #  #  #  #  #########`,999]]
.forEach(t=>{
  var i=t[0],k=t[1],r=H(i)
  console.log(i+'\n' + (k!=r?'Error '+r+' expected '+k:'Ok '+r)+'\n')
})

Python 2.7, 153 168 characters
I liked this challenge! If a Python list is ok as input (see testsuite for examples), this solution works.
Edit 2016-01-05: added one line (10 characters) to split the string in multiline.
Short explanation:

t is the row in which the room is located (counted from the top-row as array index = 0);
i is the index of the room in its row;
the building is calculated as the number of double white spaces in the bottom row until i;
floor is the number of row minus t;
room is the index of the first double whitespace in the reversed string from i until the beginning of the floor with the room, appended by a whitespace to cover for the case that the room is in the first building.

Code:
def r(l):
 l=h.split(",")
 a,w,s="*","  ",str
 t=l.index(filter(lambda c:a in c,l)[0])
 i=l[t].find(a)
 return s(l[-1][:i].count(w)+1)+s(len(l)-t)+s((l[t][i::-1]+w).find(w))

Testsuite:
cases = [
         (["*"], 111),
         (["#  #  *  #  #"], 311),
         (["#####","#####","####*","#####","#####"], 135),
         (["         #####","         #####           ######","         #####           ######","#  #  #  #####  #  #  #  ######  *"], 911),
         (["#","#  #","#  #  ##","#  #  ##  ###","#  #  ##  ###  #####","#  #  ##  ###  ##*##  ########","#  #  ##  ###  #####  ########"], 523),
         (["           #","           *","           #","           #","           #","           #","           #","           #","#########  #  #"], 281),
         (["                        ########*","                        #########","                        #########","                        #########","                        #########","                        #########","                        #########","                        #########","#  #  #  #  #  #  #  #  #########"], 999)
        ]

for idx,(hotel,roomnr) in enumerate(cases):
    output=r(hotel)
    if str(output)==str(roomnr):
        result="SUCCESS"
    else:
        result="FAILURE!!!"
    print "Case {} gives output: {}. Correct output is: {}. Result: {}".format(idx,output,roomnr,result)

Snails, 32 bytes
A
\*{l\#,|r,9d.,{|=~r,9{|l.,\ \#

Never seen this one before; impressive. Alas, 1 byte longer than CJam...

@Doorknob http://codegolf.stackexchange.com/a/47495/8478

C, 142 138 137 bytes
#include <stdio.h>
f,b,x,p=110;main(c){while(~(c=getchar()))c<11?f+=c,b=x=0:x++<p?++b,c&2?c&8?f=p,p=x:0:(b+=50-b%50):0;printf("%d",b+f);}

(123 119 118 bytes + 19 for #include line)
I stole the value merging idea from ecatmur, but I've merged them in quite a different way (saves 8 bytes in the end). This also makes the same assumption that EOF == -1.
The input is taken from stdin, and must not have whitespace or newlines after the last building on the last line, so an example input would be:
printf "##\n##       #\n##  ##*  #\n##  ###  #" | ./hotel
# or for better visualisation:
printf "##\n##       #\n##  ##*  #\n##  ###  #" | tee /dev/fd/2 | ./hotel;echo ""

Breakdown:
// Globals initialise to 0
f,     // floor number * 10 + shift
b,     // building number * 100 + room number
x,     // current column
p=110; // will store column of * (must start >= 11*9-2, and 110 will be used later)
main(c){
    while(~(c=getchar()))              // For each character until EOF
        c<11                           //  Is \n? (10)
            ?f+=c,                     //   Add 10 to floor number
             b=x=0                     //   Reset building, room, column
            :x++<p                     //  Else, is column <= *?
                  ?++b,                //   Add to room number
                   c&2                 //   Is # or *?
                      ?c&8             //   If *:
                          ?f=p,p=x:0   //    Set floor to 110, set p to column
                      :(b+=50-b%50)    //   If ' ': go to next building
                  :0;
    printf("%d",b+f);                  // Result is building+room+floor+shift
}

Great idea to reuse the initial column constant, and to use the character values as constants.

You may be able to save a byte by changing &&(f=p,p=x) to ?f=p,p=x:0 - the second operand of a ternary conditional has implicit parentheses.

@ecatmur good point; thanks!

Haskell, 128 125 bytes
l=length
f h|b<-snd$break(elem '*')$lines h,q<-fst(span(<'*')$b!!0)++"*"=l(last$words$q)+10*l b+l(words$take(l q)$last b)*100

Usage example: f "#  #  *  #  #" -> 311.
How it works:
b<-snd$break(elem '*')$lines h      -- split the input into a list of lines
                                    -- and assign b to the lines starting with
                                    -- the one that includes * up to the end,
                                    -- i.e. drop leading lines without the *
q<-fst(span(<'*')$b!!0)++"*"        -- assign q to the line with the *, but strip
                                    -- off all chars after the *

l(last$words$q)                     -- the room on floor number is the length of
                                    -- the last word of q
10*l b                              -- the floor number is 10 times the length of b
l(words$take(l q)$last b)*100       -- the hotel number is 100 times the number of
                                    -- words in the last line cut down to the
                                    -- length of q

                                    -- add for final room number

Lua, 165 Bytes
l={}i=1while(l[i-1]~="")do l[i]=io.read()o=l[i]:find"%*"x=o or x y=o and i or y i=i+1 end print(#l[i-2]:sub(1,x):gsub("%S+%s*","#")*100+(i-y-1)*10+#l[y]:match"#-%*")

Ungolfed
l={}
i=1
while(l[i-1]~="")do
    l[i]=io.read()
    o=l[i]:find"%*" --find "*", and record:
    x=o or x        --position and
    y=o and i or y  --current floor
    i=i+1
end
print(#l[i-2]:sub(1,x):gsub("%S+%s*","#")*100 --[[Take last string of list, and then
                                                  take the substring up until the
                                                  asterisk. Substitute any substrings
                                                  that include nonspace characters
                                                  (%S+) followed by a minimum of 0 space
                                                  characters (%s*) with one character
                                                  (in this code snippet I chose # for no
                                                  particular reason.) Then take the length
                                                  of this string, with the # operator.
                                                  The %S+%s* regex and gsub do the bulk
                                                  of the magic.
                                                ]]
      +(i-y-1)*10                             --[[Total number of lines minus '*' floor
                                                  minus one.
                                                ]]
      +#l[y]:match"#-%*")                     --[[Find the substring on the asterisk floor
                                                  with '#' symbols preceding an asterisk.
                                                ]]

CoffeeScript, 110 bytes & JavaScript, 121 bytes
(s)->s.split('\n').reverse().map((f,g)->f.split('  ').map((h,i)->r=h.indexOf('*');s=''+i+g+r if r>-1));111+1*s

Readable
(s)->
    s.split '\n'
        .reverse()
        .map (f,fi)->
            f.split('  ')
                .map (h,hi)->
                    ri = h.indexOf('*')
                    s = ''+hi+fi+ri if ri>-1
    111+1*s

Basically same thing in Javascript:
(s)=>{s.split('\n').reverse().map((f,g)=>f.split('  ').map((h,i)=>{r=h.indexOf('*');r>-1?s=''+i+g+r:''}));return 111+1*s}

Java, 231 Bytes
String a(String a){String[]b=a.split("\n");int i=0,c=b.length,m;String x,k=" ";for(;i<c;i++){x=b[c-1].substring(0,b[i].indexOf("*")+1);m=x.length();a=m>0?""+(m-x.replace(k+k,k).length()+1)+(c-i)+(m-x.lastIndexOf(k)-1):a;}return a;}

De-Golfed
 String a(String a) {
     String[] b = a.split("\n");                                // Split the input into floor lines
     int i = 0, c = b.length, m;                                // i=floor line counter c= number of floor lines
     String x, k = " ";
     for (; i < c; i++) {                                       // Loop through floor lines
        x = b[c - 1].substring(0, b[i].indexOf("*") + 1);       // x = part of bottom floor line up to '*' position in current line (Empty string when no '*')
        m = x.length();                                         // m = length of floor line part
        a = m > 0 ? "" + (m - x.replace(k + k, k).length() + 1) // if m>0 ('*' is on this line) set a=building no+floor no+room no.   building no calculated by replacing double space in x with single space and compare length to x (+1)
              + (c - i)                                         // floor number is total floor lines (c) - floor line loop counter (i)
              + (m - x.lastIndexOf(k) - 1) : a;                 // room number is m ('*' position in x) - position of last space in x (-1)
     }
     return a;                                                  // return the result at the end.
  }

Powershell, 154 bytes
param($s)filter s{$s|sls $_ -a|% M*|% Le*}(($s-split'
')[-1]|% s*g 0('(?m)^.*\*'|s)|sls '^|  '-a|% M*).Count,('(?ms)(?<=\*.*)$'|s).Count,('#*\*'|s)-join''

Less golfed test script:
$f = {

param($s)

filter s{
    $s|sls $_ -AllMatches|% Matches|% Length
}                                   # select an array of lengths of all matches of the string $s by pattern $_

$hpos='(?m)^.*\*'|s                 # horizontal position of the room in the source string
$basement=($s-split"`n")[-1]        # basement floor string

$building=($basement|% substring 0 $hpos|sls '^|  ' -AllMatches|% Matches).Count
                                    # truncate the basement to the position of the room
                                    # and count all double spaces or a 'start of string'
$floor=('(?ms)(?<=\*.*)$'|s).Count  # count all 'end of line' after the room
$room='#*\*'|s                      # count all #, preceding the room, and room itself

$building,$floor,$room-join''

}

@(

,(@"
*
"@, 111)

,(@"
#  #  *  #  #
"@,311)

,(@"
#####
#####
####*
#####
#####
"@, 135)

,(@"
        #####
        #####           ######
        #####           ######
#  #  #  #####  #  #  #  ######  *
"@, 911)

,(@"
#
#  #
#  #  ##
#  #  ##  ###
#  #  ##  ###  #####
#  #  ##  ###  ##*##  ########
#  #  ##  ###  #####  ########
"@, 523)

,(@"
        #
        *
        #
        #
        #
        #
        #
        #
#########  #  #
"@, 281)

,(@"
                        ########*
                        #########
                        #########
                        #########
                        #########
                        #########
                        #########
                        #########
#  #  #  #  #  #  #  #  #########
"@, 999)

) | % {
    $n,$expected = $_
    $result = &$f $n
    "$($result-eq$expected): $result"
}

Output:
True: 111
True: 311
True: 135
True: 911
True: 523
True: 281
True: 999

05AB1E, 34 bytes
|€SζJðмõ¡εεR'*k>]DOZ©k>;ò®«sĀ€ƶ˜à«

Zip with string-lists is currently bugged. €SζJ could have been just ζ in the old Python legacy version of 05AB1E, but for some reason doesn't work in the Elixir rewrite version anymore.
Try it online or verify all test cases.
Explanation:
|                    # Take the input split by newlines
                     #  i.e. "   ###\n#  ###\n#  ###  ##\n#  ##*  ##"
                     #   → ["   ###","#  ###","#  ###  ##","#  ##*  ##"]
 €S                  # Convert each to a list of characters
   ζ                 # Zip, swapping rows and column
    J                # Join them together to a string again
                     #  → [" ###","    ","    ","####","####","###*","    ","    ","  ##","  ##"]
     ðм              # Remove all spaces
                     #  → ["###","","","####","####","###*","","","##","##"]
       õ¡            # Split on empty strings
                     #  → [["###"],[],["####","####","###*"],[],["##","##"]]
ε                    # Map each building to:
 ε                   #  Map each column of the building to:
  R                  #   Reverse the column
   '*k              '#   Get the 0-indexed index of "*"
      >              #   Increase it by 1 to make it 1-indexed
]                    # Close both maps
                     #  → [[0],[],[0,0,1],[],[0,0]]
 D                   # Duplicate the resulting list
  O                  # Sum each building
                     #  → [0,0,1,0,0]
   Z                 # Get the max (without popping)
                     #  → 1
    ©                # Store this max in the register (without popping)
     k>              # Get the index (+ 1) of this max in the sum-list
                     #  → 3
       ;             # Halve it
                     #  → 1.5
        ò            # Round it up to the nearest integer (bankers rounding)
                     #  → 2
         ®           # Retrieve the value from the register again
          «          # Merge the two digits together
                     #  → 21
           s         # Swap so the duplicate list is at the top again
            Ā        # Trutify (0 remains 0, every other integer becomes 1)
                     #  → [[0],[],[0,0,1],[],[0,0]]
             €       # For each building:
              ƶ      #  Multiply the integer with the 1-indexed index
                     #  → [[0],[],[0,0,3],[],[0,0]]
               ˜     # Flatten the list
                     #  → [0,0,0,3,0,0]
                à    # Pop the list, and get the max
                     #  → 3
                 «   # Merge it with the other two digits (and output implicitly)
                     #  → 213

Dart, 165 bytes
F(List s)=>s.indexWhere((a)=>a.contains('*'));f(String s){var b=s.split('\n'),v=F(b),c=b[v].split('  '),w=F(c),x=c[w].indexOf('*')+1;return '${w+1}${b.length-v}$x';}

Try it online!


text:
1+1 = 10, 1+2 = 3
Write a function or program than can do simple arithmetic (addition, subtraction, multiplication and division) in both base 10 and base 2.
The function will take a mathematical expression as input, and output the correct result in the correct base. The input will be n numbers separated by one or several operators (+ - * /).
If all input values contain only 0 and 1, all values are considered to be binary. If at least one digit is 2-9, all values are considered to be base 10.
Rules:

You can assume there will only be one operator between numbers (10*-1 will not appear)
You can assume there will be no parentheses.
Normal operator precedence (try the expression in the google calculator if you're in doubt).
You can not assume there will only be integers
There will be no leading zeros in input or output
You can assume only valid input will be given
You can assume all input values are positive (but the minus operator may make negative output possible, 1-2=-1 and 10-100=-10)
REPL is not accepted
You may choose to take the input as separate arguments, or as a single argument, but the input has to be in the correct order.

I.e. you may represent 1-2 with the input arguments 1, -, 2, but not 1, 2, -.

You must accept the symbols + - * / in the input, not plus, minus etc.
You must support floating point values (or up to the maximum limit of your language, however supporting only integers is not accepted).
eval is accepted

Examples:
1+1
10

1010+10-1
1011

102+10-1
111

1+2+3
6

10*10*10
1000

11*11*11
11011

10*11*12+1
1321

10.1*10.1
110.01

20.2*20.2
408.04

10/5
2

110/10
11

Also accepted (optional line or comma-separated input):
10
+
10
-
1
11    <-- This is the output

This is code golf, so the shortest code in bytes will win.

In the case of 110/10, is 11.0 acceptable?

@isaacg yes, that's ok :-)

The downvote... why?

Japt, 77 72 62 60 62* 60 59 51 bytes
OvUf"[2-9]" ?U:"({Ur"[\\d.]+""º$&e14+P n2 /2pE¹"})¤

Explanation (more or less the same as for the JS answer):
Ov                       //eval...
  Uf"[2-9]"              //if input contains the digits 2 to 9
    U:                   //then it's base 10, just compute
    Ur"[\\d.]+"          //otherwise replace all the numbers
    "º$&e14+P n2 /2pE¹"  //with their base 10 equivalents
                         //I.e., take every number, multiple by 10^14, convert to
                         //base 10 and divide by 2^14
                         // º and ¹ are multiple brackets
    ¤                    //means "s2", i.e. convert the result to binary

Try it online!

* didn't divide properly

As of 5 days ago, JS's eval is assigned to Ox. I'll see if it can be further shortened.

@Eth Thanks, this saves 5 bytes.

5 more bytes saved: OxUf"[2-9]" ?U:`({Ur"\\d+(\\.\\d+)?""(($&e14+P).n(2)/16384)"}).s(2) It's probably possible to make it generate Japt code instead of JS, then use Ov to evaluate that.

Yup, 62 bytes :) OvUf"[2-9]" ?U:Ur"\\d+(\\.\\d+)?""~~[$&e14+P n2 /16384]" +" s2 The ~~[...] is necessary because mismatched parentheses in a string mess with the transpiler.

@Eth Heh, I've come with another 62 bytes solution thanks to the Ov

16384 => 2pE ;)

@Ethprod Exactly!

51: OvUf"[2-9]" ?U:"({Ur"[\\d.]+""º$&e14+P n2 /2pE¹"})¤

@Eth yep, shortening this too, but didn't think about ¤

(sorry for late) You can save 1 byte on using %d instead of \\d (PS: This is 51 chars, but 54 bytes due to use of multibyte characters)

JavaScript ES6, 87 971 1002 1063 102 101 98 1004 93 88 86 bytes
e=>eval(e.match`[2-9]`?e:`(${e.replace(/[\d.]+/g,"('0b'+$&e14)/16384")}).toString(2)`)

Demo + explanation:

function c(e){
    return eval(
      e.match`[2-9]`?                  //check if there are numbers 2 to 9
        e:                             //if there're, just compute the result
        "("+
         e.replace(                    //otherwise replace...
           /[\d.]+/g,                  //any number...
           "(('0b'+$&e14)/16384)"    //...with itself converted to base 10
         )
        +").toString(2)"               //compute the result and convert it to binary
    )
}

document.write(
   c("1.1*1.1")+"
"+
   c("1010+10-1")+"
"+
   c("102+10-1")+"
"+
   c("1+2+3")+"
"+
   c("10*10*10")+"
"+
   c("11*11*11")+"
"+
   c("10*11*12+1")+"
"+
   c("10.1*10.1")+"
"+
   c("20.2*20.2")+"
"+
   c("10/5")+"
"+
   c(`10
      +
      10
      -
      1`)
)

1 - forgot about floats
2 - again floats problem: parseInt floors binary so I have to multiply by 1e14 and then divide by 16384
3 - hope that's achieved the given task, now start to golf :D
4 - there was a bug with dividing

106^3 bytes? That's more than a million!

@Eth I knew such a comment was coming ;D

You can change e.match(/[2-9]/g) to e.match\[2-9]``.

@nicael ('0b'+$&*1e14)/1638 this should work but I'm not 100% sure

@Doᴡɴɢᴏᴀᴛ Hah, here it is :) Seems to work properly.

/\d+(\.\d+)?/g => /[\d.]+/g?

@Eth Haha, didn't even think that there're not so many characters that the regex should be that strict, nice solution :)

@nicael, very nice. It might have been unclear in the question text, but the input with line breaks was optional in case your language/program/function couldn't handle a one-line input. I don't know if you're using extra chars to support the last example, but if you do: It's not necessary, so you can shorten your code a bit =)

@Stewie No extra chars, that's a feature of JavaScript when using template strings. Note how the last example is wrapped in \`` instead of "` :)

Hmm, weird syntax highlighting bug: in the explanation line that starts with a regex, the parser thinks the second slash starts the regex, not the first. Thus, the comment is black instead of grey.

@Eth Yeah, noticed this.

Jolf, 31 bytes, noncompeting
I added a decent amount of functions inspired by this challenge, and, as thus, it is considered noncompeting. I'm happy because I finally implemented unary functions (like (H,S,n)=>val in ES6, but are supported in ES5!)
? hi"[2-9]"~eiB~epT mpvid|m'H2H
? hi"[2-9]"                     if the input contains any of 2..9
           ~ei                   evaluate i (implicitly print)
                                else
                   _mpvid        map the input split into number groups
                          m'H2    to H as a binary float
                         |    H   (or keep H, if that doesn't work)
                 pT              join by spaces
               ~e                evaluate
              B                  convert to binary (implicitly print)

Test suite, Try your own input, or manually set the input.

Your code says "hi" to its readers!

Wow. I didn't notice that! :D

Bash, 60 bytes
[ -z `tr -dc 2-9<<<$1` ]&&s='obase=2;ibase=2;';bc -l<<<$s$1

Example Run:
$ ./bin_dec_add.sh 1+1
10
$ ./bin_dec_add.sh 1+2
3

@Pietu1998 dc would require reverse polish ordering of the operations, which is disallowed by the challenge.

 2, 46 chars / 72 bytes
ë(ïđ/[2-9]⎞?ï:`(⦃ïē/[\d.]+⌿,↪(Յ+$*ḊⁿḎ)/Ẁ²)})ⓑ`

Try it here (Firefox only).
Explanation
ë(ïđ/[2-9]⎞?ï:`(⦃ïē/[\d.]+⌿,↪(Յ+$*ḊⁿḎ)/Ẁ²)})ⓑ` // implicit: ï=input, Ḋ=10, Ḏ=14, Ẁ=128
ë(                                              // eval
  ïđ/[2-9]⎞?                                    // does ï have 2-9?
            ï                                   // if so, eval input
             :                                  // else, eval:
              `(⦃ïē/[\d.]+⌿,                    // replace the binary numbers
                                                // with their base 10 equivalents:
                            ↪(Յ+                // translates to `0b`
                                $*ḊⁿḎ           // matched number * 10^14
                                     )/Ẁ²       // divided by 128^2
                                         )})ⓑ` // converted to binary
                                                // implicit output

PowerShell, 107 bytes
param($e)iex(("{0}String($($e-replace'(\d+)','{0}Int32("$1",2)'),2)"-f'[Convert]::To'),$e)[$e-match'[2-9]']

Ungolfed
param($e) # Accept single argument
Invoke-Expression # Eval
  ( # Expression, resulting in an array of 2 elements
    (
      "{0}String( # Binary
        $( # Inline subexpression
          $e -replace'(\d+)', '{0}Int32("$1",2)'
          # "1010+10-1" becomes "{0}Int32("1010",2)+{0}Int32("10",2)-{0}Int32("1",2)"
        )
      ,2)"
      -f '[Convert]::To'
      # "{0}Int32("1010",2)+{0}Int32("10",2)-{0}Int32("1",2)" becomes
        "[Convert]::ToString([Convert]::ToInt32("1010",2)+[Convert]::ToInt32("10",2)-[Convert]::ToInt32("1",2),2)"
    ),
      $e # Plain
    )
    [$e-match'[2-9]'] # Return 1st element of array if regex matches, else 0

Example
PS > .\Calc.ps1 1010+10-1
1011

PS > .\Calc.ps1 20.2*20.2
408,04


text:
Talent rolls in DSA
Some friends and I have played some DSA (a mainly german tabletop RPG much like D&D). I was wondering what the chance on passing rolls are, so you will have to write some code to calculate it.
Your character is defined by stats (from 8 to 14) and (TV) Talent values (0 to 21). For now we will use climbing as an example.
Talent tests
A talent (climbing) looks like this: (Courage-Dexterity-Strength) TV: 7. To test a character on a talent you roll on these stats with a 20-sided dice and try to get below or equal to the stat, if you do that well. If not, you can use your TV points to reduce the roll with a ratio of 1:1.
Example
A hunter with courage 12, dexterity 13 and strength 14 is trying to climb a tree, his TV is 7.
He rolls a 3, the value is below 12 so he passed that roll.
Then he rolls a 17, 17 is 4 more than 13, so 4 TV get used up with 3 left.
For the last roll you get a 14, spot on passed.
All rolls are passed and the hunter managed to climb the tree, 3 TV are left.
Input
4 values in any format you choose, taken from the standard input of your language.
It has to be in this order though.
E.g. 12 13 14 7 or 12,13,14,7 or as an array {12,13,14,7} or mixed [12, 14, 8], 3
Output
The chance of how often the rolls pass.
E.g. (for values above)0.803
12,14,8,3 = 0.322

11,11,12,11 = 0.840

For the bonus:
Again formating is not the issue here, output it however you like but in following order:
failed/with 0/with 1/with 2/with 3/with 4/with 5/with 6/with 7

and so on until no TV is left.
12,13,14,7 = 0.197/0.075/0.089/0.084/0.078/0.073/0.068/0.063/0.273

12,14,8,3 = 0.678/0.056/0.051/0.047/0.168

Challenge and rules and bonus

You shall find out given the input the chance to pass the rolls to a +- 0.5% accuracy.

-20% if your program also outputs the chances to pass with n TV (see output).

This is code-golf, so shortest code in bytes wins!

Does "4 values in any format you choose" include taking them in a different order?

Or something like [12, 14, 8], 3?

I thought i had the order included, its in now. Mixed inputs are allowed as well.

Pyth - 21 20 19 bytes
Saved 1 bytes thanks to @ThomasKwa
.Omgvzsg#0-VdQ^SyT3

Test Suite.

Pyth is so good... This is APL's type of question, and I only have 27 in APL.

the order of the input was suppoesed to be stat,stat,stat,TV i did only specify that now though. However if you can modify that easily that would be nice. Could you put in an explanation?

@Eumel sure, changing the order shouldn't be as problem, I'm on a phone right now, I'll do it when I get home.

Dyalog APL, 28 bytes
{(+/÷⍴)⍵≥∊+/¨0⌈(⊂⍺)-⍨¨⍳3⍴20}

This approach is the same as @Maltysen's. We can't be sure of 0.5% accuracy if we just draw a few thousand random dice rolls, so we instead take the average over all possible rolls. This takes the three stats as the left argument, and the talent value on the right.
Try it here!


text:
Befunge Brain Teasers
Introduction
For the ones wondering what Befunge exactly is, it is a two-dimensional stack based language made in 1993 by Chris Pressy. I made 7 brain teasers that need to be solved in Befunge-93. This is quite an experimental challenge, but I thought it's worth a shot :). A full list of all commands used in Befunge-93 can be found here.
How to play?
The task is a bit like a cops-and-robbers without the cops. It's just basically cracking submissions in order to get points. Every puzzle contains question marks. These must be replaced by any printable ascii character in the range 32 - 127, that includes whitespace. See the following example:
??????@

Given is that the output must be hi. After some puzzling, we can find out that the solution was:
"ih",,@

But! You do not give the solution. That is for the prevention of cheating. You don't post the solution, but the hash. The hash is generated with the following snippet:

String.prototype.hashCode = function() { var namevalue = document.getElementById("inputname").value;  var namenumber = 123;for (var character = 0; character < namevalue.length; character++) {namenumber += namevalue.substring(0, 1).charCodeAt(0);}var hash = 123 + namenumber, i, chr, len;if (this.length === 0) {return 0;}for (i = 0, len = this.length; i < len; i++) {chr = this.charCodeAt(i);hash = ((hash << 5) - hash) + chr; hash |= 0; }hash = Math.abs(hash);if ((hash).toString(16).length < 20) {for (var rand = 123; rand < 199; rand++) {hash = hash * rand;if ((hash).toString(16).length >= 20) {  break; }}}return (hash).toString(16).substring(2, 12);};function placeHash() { var pretext = document.getElementById("inputhash").value; var resultinghash = pretext.hashCode(); document.getElementById("resulthash").innerHTML = 'Your hash: ' + resultinghash + "";}
p {font-family: monospace;color: black;} .hashtext{color: red;font-weight:bold}

Personal hash generator:
<textarea id="inputhash" placeholder="Your submission" cols="40" rows="4"></textarea>
<textarea id="inputname" placeholder="Your name" cols="40" rows="1"></textarea>
<button class="hashbutton" onclick="placeHash()">Generate Hash!</button>

Your hash:

How to use the snippet?

First, paste the solution into the submission section
Second, enter your username (nothing else, this will actually be verified after the time limit)
Third, press Generate Hash! to obtain your personal hash.
Copy and paste the hash into your submission.

The puzzles
Puzzle 1 (Score: 3)
 ??
???      ?
??????????
         @

Output (note the trailing whitespace):
1 2 3 4 5 6 7 8 9 10

Puzzle 2 (Score: 3)
 ????    ?
??????????
??       ?
         @

Output:
abcdefghijklmnopqrstuvwxyz

Puzzle 3 (Score: 5)
  ?????????
    ?????  ???
    ?     ?
    ? ?   ?  ?
          ?
          ?  ?
  ??????  ?  ?
    ?     ?  ?
       ?  ?  @
  ??????? ?
    ?  ?
????  ??
?  ??

Output:
Hello World!

Puzzle 4 (Score: 2)
??????@

Output (note the trailing whitespace):
123

Puzzle 5 (Score: 5)
    ?
  ?????
???@?????
 ??????
?????????

Output:
Befunge

Puzzle 6 (Score: 5)
?    ?   ?
     ?
??????????
     ?
     ?
     ????????                         ??????????????
     ?????"floG edoC dna selzzuP gnimmargorP "??????
     @

Output:
###################################
 Programming Puzzles and Code Golf
###################################

Puzzle 7 (Score: 3)
???? ?????
   ???????
  @???????

Output:
012345678910

This is code-challenge, the person with the most amount of points wins!
In case of a tie, the person who submitted all submissions first, wins.
The last day for submission is January 10 UTC. After that, you have 2 days to post the full solution, with the hashes already included. These will be verified :).

How to post?
Use the following snippet to post your submission:
#N solutions:

Puzzle 1: `[hash 1]`

Puzzle 2: `[hash 2]`

etc.

It is not necessary to solve the puzzles in order. All programs have been tested here and will be used for verification.
Good luck!

I suppose it's fine if we remove trailing whitespace (in case we replace any of the trailing ? with spaces)?

Are you sure there's a unique solution for each puzzle?

@KSFT Does it matter if the solutions are unique?

@MartinBüttner If it isn't unique and someone gives a different solution, the hash won't match.

@KSFT The hashes won't match anyway, because the user name is part of the hash. The purpose of the hash is only to verify who found a working solution first.

@KSFT No, but that is not relevant. The hash will only be used to verify submission and the submission itself will be verified here.

@Adnan Yes, replacing ? with spaces is find, but what I'm asking is whether I can omit trailing spaces after doing so. (As well as trailing empty lines.)

@MartinBüttner Yes, trailing whitespaces (and trailing empty lines) may be deleted as they are considered to be no ops.

Should the hashes be salted with additional random text that the people posting solutions keep secret? As it is, it doesn't seem hard to brute-force to find other people's posted solutions.

@KSFT That doesn't seem necessary. You can try to brute-force it, but I'm pretty confident it would take a long time for just one hash.

Just clarifying, there is no trailing space on puzzle 7?

@MartinBüttner Nope.

May I replace ?s by ?s? I'm coding on a phone and I'm lazy. :P

@Pietu1998 Yes, that is possible :). (note that the ? is a random operator in Befunge)

Do any of your solutions make use of interpreter's non-standard behaviour that it reflects the IP when encountering unknown commands?

@MartinBüttner If I remember correctly, that is not used.

If I understood correctly, now is the time to reveal our solutions, right? You might also want to notify @MartinBüttner about that.

@Pietu1998 Yes, that is correct

7 solutions, 26 points
I'm typing this on my phone, because I don't have access to my computer currently. I actually had to work out Puzzle 6 by pen & paper.
Puzzle 1 (Score 3): 4f52d5b243
 1v
v:<      <
>.1+:56+-|
         @

This one is fairly straight forward. Get a 1 on the stack, then print-increment-compare-loop until 11 is hit.
Puzzle 2 (Score 3): 85226eba20
 "`"     v
v"z":,:+1<
>-       |
         @

Basically the same as the previous one, just with characters instead of numbers. Used a different IP route though.
Puzzle 3 (Score 5): 1ff5bcb1d9
  "!dlroW"v
    >,,,,  ,,v
    ,     "
    , ?      ,
          o
          l
  ??,???  l
    ,     e
       ?  "  @
  ??^,"H" <
    ?  ?
????  ??
?  ??

Here I cheaped out a little bit. Push the string to the stack and print characters manually, navigating through the spaces. I had loads of extra room, so I just left most of the question marks in. Note the trailing spaces on rows 6 to 8, I didn't remove them when calculating the hash.
Puzzle 4 (Score 2): f8b7bdf741
"{".  @

Really simple, just get the character with the correct code and print as a number, with two free spaces.
Puzzle 5 (Score 5): c4db4b6af9
    v
  ??"??
#,_@e">>:
 <"B"<^
ung"<^"ef

This was a fun one to get right. May not work correctly on some interpreters due to wrapping strings & jumps, works on the linked one. Basically, the code pushes the output string and then enters the standard printing loop, wrapping on the sides.
Puzzle 6 (Score 5): 356e912eec
1        v
     #
     v??v_

     5
      75<^                              p15:-1g15,:*
     >5+:,"floG edoC dna selzzuP gnimmargorP ">:#,_@
     @

Now this was the "masterpiece". I actually took a piece of paper and spent some time on this. (Actually, I did some extra work by missing the space in the string when copying.) Note the trailing spaces on row 4, I didn't remove them when calculating the hash.
The code works by first pushing a one to enter the main loop. The loop uses the # on the second line as a counter, and both prints and pushes a # on every iteration. After that a newline is printed and pushed. Next, the given string is pushed. Finally, the code enters a printing loop, which prints everything on the stack in reverse, which means the string, then the newline, and finally the remaining #s.
Puzzle 7 (Score 3): 0881fc2619
"0"> :,1+v
   |-":":<
  @>"10",,

This is almost the same as Puzzle 2, but with a different route, different output characters, an additional 01 in the end and a quick wrap to finish it off.

Haha, I should have thought a bit longer for the puzzle 3 and 4. Everything looks good :)

4 solutions, 15 points
I hope I didn't mess up the trailing whitespace anywhere when generating the hashes.
Puzzle 1 (Score 3): de1de4c4c8
 v
v<       >
>1+:.:9`!|
         @

Puzzle 3 (Score 5): 071cad0879
  "!dlroW"v
    >,,,,  ,,v
    ,     "
    ,        ,
          o
          l
    ,     l
    ,     e
          "  @
    ^,"H" <

Puzzle 4 (Score 2): 531940bc43
"{".  @

Puzzle 5 (Score 5): 5bafaed8e9
    ^
  v >,,
n"<@,, ,"
 "e"^>,
uge"<^"Bf