Page 4 of 11 « First<23456>Last »
Topic Options
#164841 - 2006-07-23 09:39 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
sure it is.
Quote:


All provided test cases representing valid Mayan Numbers must be correctly solved in order to have the KiXgolf score count.




your 173, rogiers 173 and your collective 167 all fail that part as you didn't run the test cases.
thus, my 176 still holds.

Top
#164842 - 2006-07-23 10:53 PM Re: KiXgolf: Mayan Number Converter - Public Phase
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11602
Loc: CA
Well all the code under 177 by Shawn is either invalid or takes a long time to run.

I ran Shawn's 177 and it works fine. The others may, but not going to run them for days to see.

I agree with Shawn that it is not appropriate to change the parameter of the function. Your code is supposed to fit "within" the function.

Top
#164843 - 2006-07-23 11:20 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
not true.
the function is scored in it's whole because you can change it as much as you like as long as it works.
and my 176 works and does run fine and fast.

there is no rule about changing the variable names but as long as there has been kixgolf, as many times the names have been changed by the winning code.

so why would we start changing the rules and well established guidelines just because shawn says so?

Top
#164844 - 2006-07-23 11:46 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Well, I have no intention of running that shit code through all test cases. So I officially withdraw it ... if anyone wants to take it - the lower score is all yours.

So I guess with that said, your back in the lead Jooel.

Top
#164845 - 2006-07-24 04:40 AM Re: KiXgolf: Mayan Number Converter - Public Phase
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11162
Loc: Boston, MA, USA
Regarding the brute-force approach, this rule pretty much covers it:
Quote:


  • The UDF is expected to finish in a reasonable time, e.g. if it gets started when the challenge opens, it's expected to be finished by the time the challenge closes even on a somewhat slow computer. The UDF has to be valid during the period that the challenge runs.




  • plus I have the ultimate say:
    Quote:


    6) In case of questions about a particular way to count the KiXtart Golf Challenge organizer has the last call.




    We do have a precedence where we allowed a brute-force approach in the CD Sorter challenge.

    However, I am currently running Jooel's initial solution. On a rather fast computer (AMD Athlon 64 X2 3800+), the brute-force approach requires on average 2 seconds to rotate through 10.000 numbers. This highest number I have in my private test cases is ::||| ::||| ::||| ::||| ::||| ::||| ::|||=1279999999. This number alone will require three days to compute. Thus, I believe that this violates the "reasonable time" rule as throwing in a single additional test, e.g. 1279999998 case will make the brute-force approach run well after the conclusion of the public round.

    Therefore the brute-force approaches, while a creative demonstration, will not qualify for valid KiXgolf scores under the "reasonable time" rule.

    Regarding changing the parameters inside the FUNCTION line, there is no rule covering this. I am tending to continue allowiing this as there might be a tournament where one want to add an addtional OPTIONAL parameter into the function call in order to implement some kind of recrsive solution. There is a precedence where I changed the names of the parameters inside the FUNCTION mid-tournament in order to not penalize a recursive solution, thus it's kind-of a precedent.

    After the conclusion of this tournament, I will post the updated rules for discussion.


    Edited by sealeopard (2006-07-24 04:42 AM)
    _________________________
    There are two types of vessels, submarines and targets.

    Top
    #164846 - 2006-07-24 07:48 AM Re: KiXgolf: Mayan Number Converter - Public Phase
    NTDOC Administrator Offline
    Administrator
    *****

    Registered: 2000-07-28
    Posts: 11602
    Loc: CA
    Quote:

    6) In case of questions about a particular way to count the KiXtart Golf Challenge organizer has the last call.




    Well I guess that sums it up rather easy.

    Okay, given a bit of a history lesson I'll agree with you on this one Jooel. However being that this was the first one where I even really attempted it and the Function($) EndFunction was supplied I did not think that one could or should modify it.
    However since Jens sees fit to do so that's fine as well, but it should be clearly listed as a possible option in the rules for future games.

    Top
    #164847 - 2006-07-24 08:29 AM Re: KiXgolf: Mayan Number Converter - Public Phase
    Lonkero Administrator Offline
    KiX Master Guru
    *****

    Registered: 2001-06-05
    Posts: 22343
    Loc: OK
    jens, so, you really think you wanna over run our rules in this round?

    you first clearly state that it must finish in time and so it did.
    in fact, the private round was lot longer than the 3 days it took to run the code.

    so, if you disqualify proper working code just because you feel like you have the power to do so, be my guest.
    but don't argue it has anything to do with judging or reason, it's purely personal.

    Top
    #164848 - 2006-07-24 08:53 AM Re: KiXgolf: Mayan Number Converter - Public Phase
    It_took_my_meds Offline
    Hey THIS is FUN
    *****

    Registered: 2003-05-07
    Posts: 273
    Loc: Sydney, Australia
    I for one have learnt a lot from this competition and I take my hat off to all the people who kicked my ass. I would also like to thank Jens for putting on the competition; particularly as he doesn't even get to participate!

    As for this discussion regarding brute force solutions, don't get too worked up about it guys as after all it's just a friendly competition to inspire ideas for coding. That being said, whilst a brute force solution may be shorter it is not something I would use in a normal script and it doesn't inspire me to use different constructs or approaches to algorithms. Shawn's code is both clever and elegant and gets my vote for the best solution.

    Cheers,

    Richard von Mallesch

    Top
    #164849 - 2006-07-24 08:56 AM Re: KiXgolf: Mayan Number Converter - Public Phase
    DrillSergeant Offline
    MM club member
    *****

    Registered: 2004-07-09
    Posts: 1164
    Loc: Eijsden, the Netherlands
    Now, now, boys, play nice

    First of all, I took benny's 216 and I got one stroke down with the Jooel-trick to define the space after the first mayan number and adding that for the rest. So I got a 215 now.
    Code:
    ; begin Mayan Number Converter
    ;
    ;!
    Function m($)
    dim $a
    If $+0=$
    Do
    $m = iif($ mod 20, left('.',$ mod 5 mod 2)+ left('::',$ mod 5/2)+left('|||',$ mod 20/5),'-')+$a+$m
    $a = ' '
    $ = $ / 20
    Until $ = 0
    Else
    While $
    $a = instr('-.:__|', left($,1))
    $m = iif($a, $m+$a-1, $m*20)
    $ = right($,~)
    EndFunction
    ;!
    ;!
    ; end Mayan Number Converter




    Code:

    Mayan Number Converter passed all 60 tests (100% correct)

    KiXtart
    KiXtart Version = 4.52 Release Candidate 2
    KiXGolf Script = kixgolf_Mnc.kix

    Computer
    OS = Windows XP Professional
    CPU = Intel Pentium Model 13
    Speed = 1595 MHz
    Memory = 478 MB

    KiXGolf Scoring Engine
    Scoring Engine = 3.0.3

    KiXtart Golf Score
    Tournament = KiXtart Golf: Mayan Number Converter
    Processing Start = 2006/07/24 08:38:06.541
    Processing End = 2006/07/24 08:38:06.551
    Duration = 0000/00/00 00:00:00.009
    KiXGolf Score = 215

    Thank you for participating in KiXtart Golf!



    I think I took the ~ trick from a former golf course I've read, or else I've been playing around with all binary operators to see how they would react to different numbers.

    The double mod is a result of golfing down the original code. slashing out variables where-ever I could. If I have time I'll rebuilt the code back to the basics so that it's easier to understand.

    Brute force? For me, that's a bit icky. Besides, it's a coding contest...

    Change variables? I've looked into that too, but it wouldn't have improved my score, or else I would have done it too.

    Recursive function? Damn... should have thought of that too!

    Jens, looking at the setup and preparation for this, I'm guessing you've spend a lot of work on it.

    If there wasn't a perfect test-environment and everything, I prolly wouldn't have even teed off. So in my book, you own the sandbox, and you can change the rules however you seem fit. Thank you for this nice round, and I'm very much looking forward to the next one.

    Top
    #164850 - 2006-07-24 09:21 AM Re: KiXgolf: Mayan Number Converter - Public Phase
    DrillSergeant Offline
    MM club member
    *****

    Registered: 2004-07-09
    Posts: 1164
    Loc: Eijsden, the Netherlands
    update:
    Benny pm-ed me a beauty of a 211, and with the trick above it's a 210. So this is a Benny/Sarge score
    Code:
    Function m($)
    Dim $a
    If $+0=$
    Do
    $m = Split(" . : .: :: -")[IIf($ mod 20=0,5,$ mod 20 mod 5)] + Left('|||',$ mod 20/5)+$a+$m
    $a = ' '
    $ = $ / 20
    Until $ = 0
    Else
    While $
    $a = InStr('-.:__|', Left($,1))
    $m = IIf($a, $m+$a-1, $m*20)
    $ = Right($,~)
    EndFunction


    Top
    #164851 - 2006-07-24 09:23 AM Re: KiXgolf: Mayan Number Converter - Public Phase
    DrillSergeant Offline
    MM club member
    *****

    Registered: 2004-07-09
    Posts: 1164
    Loc: Eijsden, the Netherlands
    changed:
    IIf($ mod 20=0,5,$ mod 20 mod 5)
    to

    IIf($ mod 20, $ mod 20 mod 5,5)


    [edit]I saw that benny's solution came looks a lot like Jooel's code, so it's[/edit]

    for a 208 Benny/Jooel/Sarge score.


    Code:
    ; begin Mayan Number Converter
    ;
    ;!
    Function m($)
    Dim $a
    If $+0=$
    Do
    $m = Split(" . : .: :: -")[IIf($ mod 20,$ mod 20 mod 5,5)] + Left('|||',$ mod 20/5)+$a+$m
    $a = ' '
    $ = $ / 20
    Until $ = 0
    Else
    While $
    $a = InStr('-.:__|', Left($,1))
    $m = IIf($a, $m+$a-1, $m*20)
    $ = Right($,~)
    EndFunction

    ;!
    ;!
    ; end Mayan Number Converter




    Code:

    Mayan Number Converter passed all 60 tests (100% correct)

    KiXtart
    KiXtart Version = 4.52 Release Candidate 2
    KiXGolf Script = kixgolf_mnc.kix

    Computer
    OS = Windows XP Professional
    CPU = Intel Pentium Model 13
    Speed = 1595 MHz
    Memory = 478 MB

    KiXGolf Scoring Engine
    Scoring Engine = 3.0.3

    KiXtart Golf Score
    Tournament = KiXtart Golf: Mayan Number Converter
    Processing Start = 2006/07/24 09:21:06.781
    Processing End = 2006/07/24 09:21:06.791
    Duration = 0000/00/00 00:00:00.009
    KiXGolf Score = 208

    Thank you for participating in KiXtart Golf!



    Edited by DrillSergeant (2006-07-24 09:44 AM)

    Top
    #164852 - 2006-07-24 09:25 AM Re: KiXgolf: Mayan Number Converter - Public Phase
    Benny69 Offline
    Moderator
    *****

    Registered: 2003-10-29
    Posts: 1036
    Loc: Lincoln, Ne
    Nice!
    _________________________
    Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
    KiXforms Designer .NET 2.0 (Beta)

    Top
    #164853 - 2006-07-24 01:41 PM Re: KiXgolf: Mayan Number Converter - Public Phase
    DrillSergeant Offline
    MM club member
    *****

    Registered: 2004-07-09
    Posts: 1164
    Loc: Eijsden, the Netherlands
    The need for the double mod got lost somewhere along the line. Since we don't need it anymore:

    Code:
    ; begin Mayan Number Converter
    ;
    ;!
    Function m($)
    Dim $a
    If $+0=$
    Do
    $m = iif($ mod 20, Split(' . : .: ::')[$ mod 5],'-') + Left('|||',$ mod 20/5)+$a+$m
    $a = ' '
    $ = $ / 20
    Until $ = 0
    Else
    While $
    $a = InStr('-.:__|', Left($,1))
    $m = iif($a, $m+$a-1, $m*20)
    $ = Right($,~)
    EndFunction
    ;!
    ;!
    ; end Mayan Number Converter



    for a result of:
    Code:

    Mayan Number Converter passed all 60 tests (100% correct)

    KiXtart
    KiXtart Version = 4.52 Release Candidate 2
    KiXGolf Script = kixgolf_mnc.kix

    Computer
    OS = Windows XP Professional
    CPU = Intel Pentium Model 13
    Speed = 1595 MHz
    Memory = 478 MB

    KiXGolf Scoring Engine
    Scoring Engine = 3.0.3

    KiXtart Golf Score
    Tournament = KiXtart Golf: Mayan Number Converter
    Processing Start = 2006/07/24 13:39:21.692
    Processing End = 2006/07/24 13:39:21.702
    Duration = 0000/00/00 00:00:00.009
    KiXGolf Score = 203

    Thank you for participating in KiXtart Golf!


    Top
    #164854 - 2006-07-24 01:53 PM Re: KiXgolf: Mayan Number Converter - Public Phase
    Shawn Administrator Offline
    Administrator
    *****

    Registered: 1999-08-13
    Posts: 8611
    Nice one.
    Top
    #164855 - 2006-07-24 05:53 PM Re: KiXgolf: Mayan Number Converter - Public Phase
    Lonkero Administrator Offline
    KiX Master Guru
    *****

    Registered: 2001-06-05
    Posts: 22343
    Loc: OK
    k, 175.
    Code:

    Function m($_)

    dim $,$b,$c

    for $b = 1 to 15
    $c = split("- . : .: :: | " + $)
    $ = $ + $c[$b] + "| "
    next

    for each $ in split($_)
    $m = $m * 20 + ascan($c,$)
    if $m<0
    $m = $c[$_ mod 20]
    $ = $_/20
    if $
    $m = m($) + " " + $m

    EndFunction


    Code:

    Mayan Number Converter passed all 60 tests (100% correct)

    KiXtart
    KiXtart Version = 4.52 Release Candidate 1
    KiXGolf Script = kixgolf_mnc.kix

    Computer
    OS = Windows XP Professional
    CPU = Intel Pentium Model 13
    Speed = 1866 MHz
    Memory = 760 MB

    KiXGolf Scoring Engine
    Scoring Engine = 3.0.3

    KiXtart Golf Score
    Tournament = KiXtart Golf: Mayan Number Converter
    Processing Start = 2006/07/24 18:52:45.171
    Processing End = 2006/07/24 18:52:45.359
    Duration = 0000/00/00 00:00:00.187
    KiXGolf Score = 175


    Top
    #164856 - 2006-07-24 06:45 PM Re: KiXgolf: Mayan Number Converter - Public Phase
    Shawn Administrator Offline
    Administrator
    *****

    Registered: 1999-08-13
    Posts: 8611
    k 174

    Code:

    Function m($a)

    dim $,$b,$c

    for $b = 1 to 15
    $c = split("- . : .: :: | " + $)
    $ = $ + $c[$b] + "| "
    next

    for each $ in split($a)
    $m = $m * 20 + ascan($c,$)
    if $m<0
    $m = $c[$ mod 20]
    $ = $a/20
    if $
    $m = m($) + " " + $m
    ;endif
    ;endif
    ;next

    EndFunction


    Top
    #164857 - 2006-07-24 07:08 PM Re: KiXgolf: Mayan Number Converter - Public Phase
    Mart Moderator Offline
    KiX Supporter
    *****

    Registered: 2002-03-27
    Posts: 4665
    Loc: The Netherlands
    Not to screw up the party but this rule:

    Quote:


    3) Code can be constructed any way you like, as long as it is syntactically correct with KiXtart.





    Clearly says that it should be correct syntax.
    Commenting out the endifís and the next so that they will not be executed and as far as I know do not get counted by the scoring engine is not correct kix syntax imho.
    Maybe I'm wrong about the scoring engine but it still is not correct kixtart syntax.


    Edited by Mart (2006-07-24 07:43 PM)
    _________________________
    Mart

    - Chuck Norris once sold ebay to ebay on ebay.

    Top
    #164858 - 2006-07-24 07:38 PM Re: KiXgolf: Mayan Number Converter - Public Phase
    Howard Bullock Offline
    KiX Supporter
    *****

    Registered: 2000-09-15
    Posts: 5809
    Loc: Harrisburg, PA USA
    Party pooper!
    _________________________
    Home page: http://www.kixhelp.com/hb/

    Top
    #164859 - 2006-07-24 07:43 PM Re: KiXgolf: Mayan Number Converter - Public Phase
    Mart Moderator Offline
    KiX Supporter
    *****

    Registered: 2002-03-27
    Posts: 4665
    Loc: The Netherlands
    LOL
    I didnít mean to do so but rules are rules. Right?
    _________________________
    Mart

    - Chuck Norris once sold ebay to ebay on ebay.

    Top
    #164860 - 2006-07-24 07:55 PM Re: KiXgolf: Mayan Number Converter - Public Phase
    Lonkero Administrator Offline
    KiX Master Guru
    *****

    Registered: 2001-06-05
    Posts: 22343
    Loc: OK
    well, it has already been proven that the rules don't stand.
    so, it depends on what jens says about it.

    Top
    Page 4 of 11 « First<23456>Last »


    Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
    Hop to:
    Shout Box

    Who's Online
    0 registered and 186 anonymous users online.
    Newest Members
    dimi575, Drecksnacken, Nlill, webtools321, multiman
    17734 Registered Users

    Generated in 0.05 seconds in which 0.016 seconds were spent on a total of 13 queries. Zlib compression enabled.

    Search the board with:
    superb Board Search
    or try with google:
    Google
    Web kixtart.org