Python 2 - 62.6 points
s='s=%r;print(s%%s+s*99)[:input()]#';print(s%s+s*99)[:input()]
This code is both the generator and the core of the quine. It expects you to provide a length on standard input, and prints to standard output a version of itself of that length (larger sizes get a trailing comment full of junk).
So, if you pass it 62, it prints itself (this is the minimum size). If you call it with some longer length (up to the maximum length of 3231), it will produce output of that length. Any version will be a quine if passed its own length.
The length limit was the result of my attempts at minimizing the number of characters used. Supporting more lengths was costing more in points for code length than it was reducing the penalty for a limited range. It's not hard to make a variant that will work for unlimited sizes, but it will need to be longer by about 20 characters (and so score worse).
Note that requesting a shorter length than 62 will produce output of the desired size, but that output will not be working code. Passing a larger length than 3231 will produce the 3231-character version of the quine. Passing something other than an integer will raise an exception.
Scoring:
- Generator length: 62 characters, 62 points
- Minimum quine size: 62 characters, 62 points
- Number of supported sizes: 3169, 1.2 points
- All sizes between minimum and maximum accepted: Half off all points above.
- Total: (62+62+1.212)/2 = 62.6 points
Also, to explain the rather complicated scoring criteria, the point is to ensure trivial "any color as long as it's black" solutions don't work, and to encourage solutions that tend toward supporting all the numbers possible, without penalizing more limited solutions too harshly.
– AJMansfield – 2013-12-19T01:44:39.780so wait... more possible supported sizes is penalized?! – Doorknob – 2013-12-19T01:48:44.960
@DoorknobofSnow Sorry, fixed it. – AJMansfield – 2013-12-19T01:51:11.417
2Perhaps a little late, but I think there should be a significant bonus here for programs that produce the quines in their own language. Otherwise, everyone's going to be writing quine generators for HQ9+ or languages where quining is similarly simple. – Iszi – 2013-12-19T15:33:50.443
@Iszi I think you're right, also I have another possible change that could eliminate trivial quining solutions: output must not contain any matches of the regex
(.+)\1
. – AJMansfield – 2013-12-19T23:24:31.063