In article <[EMAIL PROTECTED]>,
        "Sean O'Rourke" <[EMAIL PROTECTED]> writes:
> From the rules:  "A word contains at least one alphanumeric character
> (letter or digit), and optionally some punctuation (. , ; : ' " ( ) & /).
> Note: This means that punctuation characters can never occur alone. But
> except for the period, which must end a sentence, punctuation can occur
> anywhere in a word."
>
> I took this to mean "punctuation, including '.', can occur within a word,
> but since '.' can end a sentence, only non-'.' punctuation can end a word.
> This seems like a more careful reading which, if universally followed,
> would have resulted in a lot more solutions with /\S*\w\S*/ in them.  But
> the refs, in writing the tests, either did not test this corner case, or
> interpreted the rule the other way.
>

....the period, which must end a sentence...

So periods end a sentence. if there is a period in the middle of a word,
it's now two words, one on the end of the last sentence, and one at
the beginning of the next.

How else do you decide where a sentence ends in fact ? whitespace/newlines
were optional between sentences.

Anyways, if you have doubts about the rules, ask the judges. I definitely
did for the more subtle points.This will also allow the judges to
try to remove ambiguities in the text (which also happened in this case)

>> But I always thought the aim was to solve the problem, rather than
>> merely to pass the tests.
>
> After sending the last mail, I have had second thoughts about taking this
> approach.  Certainly on a problem like Kolakoski or Cantor, defined by a
> few simple rules, this would be a "morally degraded" form of golf.  But
> when the spec is over a page long, it will almost certainly be ambiguous.
> Sometimes a careful reading will allow shorter solutions, sometimes it
> will exclude them.  Sometimes the "careful reader" will ask the refs for a
> clarification, sometimes not.
>
> Sometimes the clarification (and suitably adjusted tests) will invalidate
> many top solutions.  I believe that a dot in the middle of the word would
> have put Eugene ahead of Ton.  If each had legitimately interpreted the

Nope, if dots in the middle were allowed, the whole -056 concept would have
broken down. That one in fact enforces only one dot at the end (except
possibly on the very last line which could have no dots at all). And if
parsing would have gotten more complicated than -056 it would have been
a different game. people would probably start doing preparation work already
during the parsing.


> spec in a different way, and the refs had found the ambiguity in the last
> hour, what should have been done?  A test suite is unambiguous -- you
> either pass it or you don't.
>

Nah, that would be unfair. There were several moments I could have
shaved bytes by using special properties of the tests, but that
was clearly not the intention. At several points i had solutions that
had a variable changing while moving over the words and where it would
matter a lot if e.g. the first word on the next line was shorter than
3 chars or not. Also if I had been sure of no sentences with just a 2
letter word, there were things to save.

A purely testcase based approach would also make challenges with random
numbers like in the ircnet golf almost impossible. It invalidates
the "either you pass or you don't". In fact, imagine a program that
randomly outputs a certain number of bytes. It will usually not pass
but if you run it often enough, at some point it will....
(http://www.xs4all.nl/~thospel/challenge.html)

Also have look at the winner of the lapm 1 challenge. It will
succesfully finish the testcase, but will not finish until long after
the sun becomes a white dwarf. Reject or not ?

> I believe my tactics demonstrate at least that either the spec should be
> simple enough for its intent to be clear, or the task should be defined by
> the tests.
>

The specs should try to be unambiguous. But nobody is perfect, sometimes
there will be flaws.

I don't really think there is a "simple enough that the intent is clear"
in general.

Even in something as simple as the magic number challenge it turned out
that it was important if 0 was a valid input number or not, and if the
input number could in general have leading zeros.

Reply via email to