55
\$\begingroup\$

Code-Bowling

You've been hired by Brunswick Bowling to create a simple program to output the text Code Bowling on their monitors. This company is worth a pretty penny and you feel you can swindle them for quite the bit of cash.

The job description clearly states that they pay on a scoring basis and you're pretty confident you can manipulate their scoring system to your advantage and get the largest pay check possible from these guys. To do so will require you packing as much code as you can into your program/function, even though their scoring system is designed to prevent you from doing so.

Get out your piggy banks, let's code!


Challenge

The challenge is to simply output the text Code Bowling, exactly as it is written here, with the highest score possible. (See section: Scoring System below)

Leading and trailing new-lines (line-breaks) are acceptable.

Your code may be an entire program or just an executable function.


Rules

Obligatory: This challenge is using Code-Bowling: Common Rules, Revision 1.0.0; See Meta for details.

  1. Character : Byte Ratio
    In Code-Bowling a character-count is preferred over a byte-count. The obvious reasoning for this is that multi-byte unicode characters (e.g. 🁴) can be used in place of single-byte unicode characters to fluff up byte count and will make bowling more about who renames the most variables with high-byte unicode characters rather than who most strategically creates meaningful complex code.

  2. Variable/Function/Object Names
    All variable names (or object pointers, function names, etc) should be 1 character long. The only acceptable time to use 2-character variables names is after all possible 1-character variables have been used. The only acceptable time to use 3-character variables names is after all possible 2-character variables have been used. Etc.

  3. Un-used Code
    All code must be used. Meaning the program must fail to always properly complete the task if any individual character (or varying set(s) of characters) is/are removed. Naturally, a subset of the program should not be able complete the task on its own without the rest of the program.

  4. Comments
    Comments are not permitted towards character-count, unless somehow utilized by your program/function.


Scoring System:

  Pangram Challenge:

A pangram is a sentence that uses every letter at least once. (The quick brown fox jumps over the lazy dog).

This challenge-type has a scoring systems designed where a perfect pangram would achieve the theoretical maximum score (though you are not required to use every character at least once.) Additionally, using any character more than once will start incurring a penalty. This challenge also expands to more than just the alphabetical characters.

  Scoring Metric:

  1. Each character used increases your score by 1.
  2. Repeated use of any alphanumeric character (a-z, A-Z, 0-9) will result in a deduction of 3 points per repeat (first use does not result in a deduction).
  3. Repeated use of basic punctuation ([!?.-,":';]) - including the brackets - will result in a deduction of 2 points per repeat.
  4. Repeated use of other ASCII characters {`~@#$%^&*_+=|\/><} - including the curly brackets - will result in a deduction of 4 points per repeat.
  5. Use of spaces, tabs, and newlines will result in a deduction of 1 point per use. That is, they do not count towards character total.
  6. Characters not mentioned above (Exotic Characters) will result in a deduction of 1 point per use. That is, they do not count towards character total.

  Scoring Tool:

An automated scoring widget has been created and can be found here.


This is a variant. The program with the highest score wins! (Since there is a maximum score of 94, whoever reaches it first (if it can be reached) will be marked as the accepted answer, though others are free to keep answering for fun)

\$\endgroup\$
  • 38
    \$\begingroup\$ I managed to get a score of -75k. If this was lowest score I'd be doing amazingly. \$\endgroup\$ – ATaco Mar 14 '17 at 6:04
  • 1
    \$\begingroup\$ @carusocomputing Try headsecks. The score will probably still be awful. Also, you couldn't really use BF, since any non-commands are comments and could be removed. \$\endgroup\$ – mbomb007 Mar 14 '17 at 22:32
  • 1
    \$\begingroup\$ Delimit would be good for this, because it doesn't really care what characters you use, just the combined ASCII of a set of characters \$\endgroup\$ – MildlyMilquetoast Mar 15 '17 at 5:38
  • 2
    \$\begingroup\$ Shortest code would be a nice tiebreaker on this challenge! \$\endgroup\$ – Stewie Griffin Mar 15 '17 at 20:26
  • 2
    \$\begingroup\$ Maybe someone can solve that by awarding bounties to the other 94-ers \$\endgroup\$ – masterX244 Mar 16 '17 at 12:33

31 Answers 31

1 2
0
\$\begingroup\$

Acc!!, 171 chars

119
Write _-52
Write _-8
Count i while i-2 {
	Write _-19+i
}
32
Write _
_+34
Write _
_+45
Write _
_+8
Write _
_-11
Write _
Count i while i-2 {
	Write 105+i*5
}
_-5
Write _

Try it online!

Acc!! works well for this challenge as whitespace is necessary and loops are costly. I made use of the Accumulator here, but poorly, to increase chars. Here is a brief overview from the page:

Accumulator Any expression standing by itself is evaluated and assigned to the accumulator (which is accessible as _). Thus, e.g., 3 is a statement that sets the accumulator to 3; _ + 1 increments the accumulator; and _ * N reads a character and multiplies the accumulator by its charcode. (N gets input)

Write <charcode> Outputs a single character with the given ASCII/Unicode value to stdout. The charcode can be any expression.

Loops in Acc, at least for golfing, are a pain. They require braces, and all whitespace is necessary. Otherwise it's pretty self-explanatory.

\$\endgroup\$
  • \$\begingroup\$ This is a bowling challenge, not a golfing one, so you're supposed to maximize score. In addition, its scoring is otherwise unusual. Using the scoring tool above, your code gets a negative score. \$\endgroup\$ – Ørjan Johansen Dec 27 '17 at 23:36
  • 1
    \$\begingroup\$ @ØrjanJohansen It does look as though they are attempting to maximize score (due to "I made use of the Accumulator here, but poorly, to increase chars"), but they're just not scoring it correctly. \$\endgroup\$ – LyricLy Dec 28 '17 at 8:16
  • \$\begingroup\$ @ØrjanJohansen Ah yes, it seems I completely missed the scoring section. I will update \$\endgroup\$ – FantaC Dec 28 '17 at 17:29
1 2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.