Now with BONUS for run-time placement.
Write a program to fill a text box with the identifiers used in your program while keeping your program small. With all the identifiers you have used (excluding those you created) in your program, fill a 12x6 box with as many as you can. You get extra points for identifiers that cross over (crossword style), but they can't join end to end.
Your program should print (to stdout) a 12x6 character box with your packed identifiers and a
# border. The
box should have columns labeled with letter A-L and the rows 1-6 (spaced like the example below). Then print a
line for each identifier used. Each line will have the location of the first
letter, the identifier itself, and the score. The score is equal to the number
of letters in the identifier with a possible '+bonus' added. The identifier gets
a 5 point bonus for each letter shared with a crossing identifier. The final
line reports 'TOTAL: ' and the sum of the identifier scores. An example output
for a possible Python program would look like this:
ABCDEFGHIJKL ############## 1 # pinsert # 2 # o # 3 # print # 4 # not # 5 # # 6 #import # ############## C1 pop 3+5 D1 insert 6 C3 print 5+10 E3 in 2+10 E4 not 3+5 A6 import 6 TOTAL: 55
- Identifiers can be unattached (like
- You cannot join
- The string
insertcannot be used. Joining words must be orthogonal.
- Identifiers can be placed next to each other (like
Your answer should include your program output with your source code and a title consisting of the language name and your score.
Your score for the challenge will the the puzzle score squared divided by the
size of your source code (in bytes). Eg: The puzzle above with a 300 byte
program would score
55*55/300 = 10.08. Highest score wins.
- You can use any identifier in your program that is not defined by you. Keywords, class names, method names, library names, and built-in function names are examples of eligible identifiers.
- EDITED: You may only use standard libraries that are included with the minimum language release. Extended language packages and the use of external libraries (are now) forbidden. The huge range of libraries with extensive lists of identifiers would unbalance this challenge. If you are unsure of how this works with your language, please leave a question in the comments.
- Identifiers must consist of [a-zA-Z_] characters only and have at least 2 characters.
- You may only use each identifier once in the puzzle.
- Identifiers can only be used left to right or downwards.
If your code determines where to place identifiers at run time, the shared letter bonus will be 20 instead of 5. You may list which identifiers will used, but your code must decide where in the box to place them. Your code must also calculate and print the score list. If your placements depend on the ordering of the identifier list, hard-coded pairings, or other non-dynamic placement short-cuts, you are not eligible for the Dynamic Bonus.
In the example output above, the puzzle score for a run-time placement program would become 145. Then if the code was 800 bytes, the score would be
145*145/800 = 26.28.
The Dynamic Bonus is designed to reward clever algorithms instead of static hard-coded solution strings, and compensate for the larger resulting source code size.
- Changed libraries used to only those in the minimum language release.
- Added the dynamic bonus option.