I tested this and various other "obvious" traits of Raul's code last night, 
including where the results were easy to verify (0 or 'Fatima won'), and it all 
checked out. When I tried to submit a result which didn't start with 'Case 
#1:', Google rejected the upload, with a specific message to that effect. When 
I had the formatting right, Google accepted the upload, but marked my 
submission as incorrect (with no further detail), as Raul reported.

Various spot checks on individual (non-trivial) outputs of Raul's code also 
checked out logically (to me, anyway). So I started thinking through the 
puzzle, looking for edge cases or ambiguities which may impact the 
implementation,  but came up dry. 

That said, I noticed a good percentage of submissions were marked as incorrect, 
so there's something tripping people up here. My gut says the trouble is in the 
move-optimizer. What if, for example, the majority of sequences had 2 'a's in 
part 1, but some had 1 'a' and some had 3 or 4? Would the <./ of the -/ table 
guarantee that the optimizer selected the 2 'a' case as canonical, because in 
aggregate it would take the fewest moves to convert the 1-, 3-, and 4-'a' case 
to the dominant (and not-distant) 2-'a' case? I suspect yes, but I haven't been 
able to convince myself of it yet. Hence my gut says to spend time in this area.

-Dan

PS:  BTW, Raul's use of 13 : n within 'result' is the first legitimate 
application I've seen to persist that construct in a script (as opposed to 
using for on-the-fly tacit translation in throwaway contexts, ie the REPL). 

Here, it allows Raul to maintain the clarity of explicit code for expressing a 
noun phrase as a sequence of verb applications (ie a pipeline without the 
intrusive verb compositions), while avoiding the typical performance penalty of 
applying an explicit verb at low rank (which would make J constantly 
reinterpret the verb body, which is stored as a string). Very clever and 
gratifying.

Sent from my iPhone

> On May 4, 2014, at 6:23 PM, Brian Schott <[email protected]> wrote:
> 
> Raul,
> 
> Did you prefix your "result" with "Case #i: ", where i is the corresponding
> case number?, If not, that may be the problem.
> 
> 
> 
> -- 
> (B=)
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to