|
|
|||||||
Private round is located at http://www.kixtart.org/forums/ubbthreads.php?ubb=newreply&Board=9&Number=179059 Please post your scores and corresponding codes and improve upon them. Final results of the private round Code: 354 - Jooel 359 - DrillSergeant 425 - Howard Bullock 426 - Jochen 461 - sixdoubleo |
||||||||
|
|
|||||||
Code: ; begin Top Secret ; ;! Function a($f,$b,$c,$d) dim $, $g, $o, $j, $m $=createobject("VBscript.RegExp") $.Pattern="\W|\d" $.Global=1 $o=$.replace($c,"") $c=$.Execute($c) do $j=split($b,",") for $g=1 to $f if $f>($o^) if $g>($o^) $.Pattern=""+$g+",?" $b=$.replace($b,"") $m=1+$m endif else $a=$a+substr($o,iif($d="E",$j[$g-1],ascan($j,$g)+1),1) endif next if $m=0 $o=right($o,-$f) endif $f=$f-$m $m=0 until $o="" for each $ in $c $m=$.FirstIndex $a=left($a,$m)+ $.value + substr($a,$m+1) EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
Nice Howard... I was trying to figure out how to use the regex replace thing, but never really got anywhere... Here is how I was going at it, although it never quite worked right... |
||||||||
|
|
|||||||
k, I took a traditional approach:
code:
|
||||||||
|
|
|||||||
btw, wasn't the private round gonna be extended to friday or something? at least that's what I thought... |
||||||||
|
|
|||||||
Nope: Quote: 3) I'll extend the private round until Thursday 6pm EST |
||||||||
|
|
|||||||
changed: iif($d="E",$j[$g-1] to: iif($d=E,$j[$g-1] My code is now 423 |
||||||||
|
|
|||||||
oh. thursday translated somehow in my head. np. had the leading score, so doesn't hurt |
||||||||
|
|
|||||||
|
||||||||
|
|
|||||||
hey, you forgot to post your score along the code, dude! |
||||||||
|
|
|||||||
sorry boss |
||||||||
|
|
|||||||
Howard you Basta, Congratulations Wow, if this was the easy round I don't want to see what comes next Anyway, here is my 426 code for the 4th Place:
Code:
|
||||||||
|
|
|||||||
Gawd! missing the obvious Your solution passed all tests function a($b, $c, $i, $d) |
||||||||
|
|
|||||||
even better... Your solution passed all tests code: function a($b, $c, $i, $d) |
||||||||
|
|
|||||||
Right, now for some work to do... will be back tonight |
||||||||
|
|
|||||||
Ok, one more for the road, I love KiXtart Your solution passed all tests Code: function a($b, $c, $i, $d) |
||||||||
|
|
|||||||
Originally Posted By: Jooel k, I took a traditional approach: You call this traditional? $o[split($r)[iif($d=E,$a,$[$a])]]=substr($k,iif($d=E,$[$a],$a),1) Wow! |
||||||||
|
|
|||||||
btw here is a 357 score based on Rogier's code Your solution passed all tests Code: Function a($b, $p, $, $h) No need for that parens there,no? |
||||||||
|
|
|||||||
Jooel's code trimmed down to 347 by changing: $a=asc(ucase($)) if $a>64 & $a<91 to $a=lCase($) if $a>` & $a<}
|
||||||||
|
|
|||||||
thanx Jochen, I just realised that one too , I guess the ( and ) did have a function once |
||||||||
|
|
|||||||
Nice, didn't see that ... maybe because Jooel's code is too traditional for me |
||||||||
|
|
|||||||
You forgot to post the score again |
||||||||
|
|
|||||||
not too much but 2 strokes less with mine: Your solution passed all tests KiXtart KiXtart Version = 4.53 KiXGolf Script = kixgolf_ts.kix Computer OS = Windows 2000 Professional CPU = Intel(R) Pentium(R) 4 CPU 2.80GHz Speed = 2793 MHz Memory = 504 MB KiXGolf Scoring Engine Scoring Engine = 3.3 KiXtart Golf Score Tournament = Top Secret Processing Start = 2007/08/10 11:22:11.265 Processing End = 2007/08/10 11:22:11.328 Duration = 0000/00/00 00:00:00.063 KiXGolf Score = 405 Thank you for participating in KiXtart Golf!Code: function a($b, $c, $i, $d) while $i dim $, $e, $f, $g, $h, $j, $k, $n for $ = 1 to $i^0 if $f < $b $j = substr($i,$,1) $e = lcase($j) if $e>` & $e<{ $f = 1 + $f $n = split(join($n) + ' ' + $j) else $g = 1 + $g $h = ´ + $h + $ + ´ endif endif next $e = left($i,$f+$g) $i = right($i,-$f-$g) for each $ in split($c,",") if 0+$ <= $f $k = split(join($k) + ' ' + $) endif next for $g = 1 to $e^0 if instr($h,´+$g+´) $a = $a + substr($e,$g,1) $j = 1 + $j else $ = 1 + $ $a = iif($d=E, $a+$n[$k[$]], $a+$n[ascan($k,$g-$j)]) endfunction |
||||||||
|
|
|||||||
Lowered my code one more stroke to 422 by changing: until $o="" to until $o=0 Now to get a headache analyzing Jooel's traditional code. |
||||||||
|
|
|||||||
Jooel's code tidied up a little. Changed some ($c^) to $c^0. <br><br><pre style="background:white;border-style:solid;border-color:silver;"> KiXtart KiXtart Version = 4.52 KiXGolf Script = kixgolf_ts.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 13 Speed = 599 MHz Memory = 1024 MB KiXGolf Scoring Engine Scoring Engine = 3.3 KiXtart Golf Score Tournament = Top Secret Processing Start = 2007/08/10 07:40:23.621 Processing End = 2007/08/10 07:40:23.661 Duration = 0000/00/00 00:00:00.040 KiXGolf Result = Solution passed all 18 tests KiXGolf Score = <font color="red">345</font> Thank you for participating in KiXtart Golf! </pre><br><br> Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) /* 1) the block length 2) the permutation 3) the message to be encoded or decoded 4) a parameter denoting encoding (E) or decoding (D) */ dim $i,$o[$c^0],$g,$,$r,$k for $i=0 to $c^0 $=substr($c,$i+1,1) $a=lCase($) if $a>` & $a<} $g=$g+1 $k=$k+$ $r=$r+" "+$i endif $o[$i]=$ if $g=$l | $i=($c^) for each $a in split($b,",") if $i+$a-$g-1<($c^) $=$+" "+$a endif next $=split($) for $a=1 to $g $o[split($r)[iif($d=E,$a,$[$a])]]=substr($k,iif($d=E,$[$a],$a),1) next redim $r,$g,$k $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
Bad post that I can not delete. |
||||||||
|
|
|||||||
Howard, the lase code you've posted (344) fails all 18 tests |
||||||||
|
|
|||||||
L.O.L. Is this allowed now? I could do that with mine too |
||||||||
|
|
|||||||
Quote: if $a>` & $a<} What THE HELL is this Frankenstein crap? And who is the Basta that figured it out? |
||||||||
|
|
|||||||
Working 344 code:
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) /* 1) the block length 2) the permutation 3) the message to be encoded or decoded 4) a parameter denoting encoding (E) or decoding (D) */ dim $i,$o[$c^0],$g,$,$r,$k for $i=0 to $c^0 $=substr($c,$i+1,1) $a=LCase($) if $a>` & $a<} $g=$g+1 $k=$k+$ $r=$r+" "+$i endif $o[$i]=$ if $g=$l | $i=($c^) for each $a in Split($b,",") if $i+$a-$g<=($c^) $=$+" "+$a EndIf Next $=split($) for $a=1 to $g $o[split($r)[iif($d=E,$a,$[$a])]]=substr($k,iif($d=E,$[$a],$a),1) Next redim $r,$g,$k $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
Originally Posted By: Allen Quote: if $a>` & $a<} What THE HELL is this Frankenstein crap? And who is the Basta that figured it out? LOL Look at http://www.asciitable.com the ` is the chararcter before a and } is the character after z |
||||||||
|
|
|||||||
Funny, I was just at asciitable looking... nice, very nice. |
||||||||
|
|
|||||||
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) /* 1) the block length 2) the permutation 3) the message to be encoded or decoded 4) a parameter denoting encoding (E) or decoding (D) */ dim $i,$o[$c^0],$g,$,$r,$k for $i=0 to $c^0 $=substr($c,$i+1,1) $a=LCase($) if $a>` & $a<} $g=$g+1 $k=$k+$ $r=$r+" "+$i endif $o[$i]=$ if $g=$l | $i=($c^) for each $a in Split($b,",") if $i+$a-$g<=($c^) $=$+" "+$a EndIf Next $a=split($) for $=1 to $g $o[split($r)[iif($d=E,$,$a[$])]]=substr($k,iif($d=E,$a[$],$),1) Next redim $r,$g,$k $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
Myabe I am doing something wrong, but I just re-downloaded Jen's zip file and tried Drill's code and it fails 8 out of 18, but I am confused because Drill's output shows all 18 passed. |
||||||||
|
|
|||||||
Clever counting of variable occurances ... I can't seem to squeeze more out of it |
||||||||
|
|
|||||||
My bad I was running ver 4.51, now running 4.53 all is good |
||||||||
|
|
|||||||
Hey benny, you had my heart stopping for a second there Which score-code did you test? I've downloaded jens's latest package and retested my 357 score. Here's the result: Running Test 1 Encoding...Decoding...Done Running Test 2 Encoding...Decoding...Done Running Test 3 Encoding...Decoding...Done Running Test 4 Encoding...Decoding...Done Running Test 5 Encoding...Decoding...Done Running Test 6 Encoding...Decoding...Done Running Test 8 Encoding...Decoding...Done Running Test 9 Encoding...Decoding...Done Running Test 11 Encoding...Decoding...Done Your solution passed all tests KiXtart KiXtart Version = 4.52 KiXGolf Script = kixgolf_ts.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 13 Speed = 2261 MHz Memory = 1024 MB KiXGolf Scoring Engine Scoring Engine = 3.3 KiXtart Golf Score Tournament = Top Secret Processing Start = 2007/08/10 15:09:51.437 Processing End = 2007/08/10 15:09:51.453 Duration = 0000/00/00 00:00:00.016 KiXGolf Score = 357 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Drill your code is good see previous post |
||||||||
|
|
|||||||
Nice one, howard! |
||||||||
|
|
|||||||
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) dim $i, $o[$c^0], $, $r, $g, $k For $i=0 to $c^0 $=Substr($c,$i+1,1) $a=LCase($) If $a>` & $a<} $k=$k+$ $r=$r+" "+$i EndIf $o[$i] = $ $g = $k^0 If $g=$l | $i=($c^) for each $ in Split($b,",") if $i+$-$g<=($c^) $a=$a+" "+$ EndIf Next $a=split($a) For $=1 to $g $o[split($r)[iif($d=E,$,$a[$])]] = substr($k,iif($d=E,$a[$],$),1) Next redim $r,$k $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
Excellent. I should have seen that. I was looking into those variables before I had to take the kids to the orthodonists. |
||||||||
|
|
|||||||
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) /* 1) the block length 2) the permutation 3) the message to be encoded or decoded 4) a parameter denoting encoding (E) or decoding (D) */ dim $i, $o[$c^0], $, $r, $k For $i=0 to $c^0 $=Substr($c,$i+1,1) $a=LCase($) If $a>` & $a<} $k=$k+$ $r=$r+" "+$i EndIf $o[$i] = $ If ($k^)=$l | $i=($c^) for each $ in Split($b,",") if $i+$-($k^)<=($c^) $a=$a+" "+$ EndIf Next $a=split($a) For $=1 to ($k^) $o[split($r)[iif($d=E,$,$a[$])]] = substr($k,iif($d=E,$a[$],$),1) Next redim $r,$k $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
Lot of work for 1 point. But every point counts, eh? |
||||||||
|
|
|||||||
I'm still at 461 Haven't had any time whatsoever in the last couple days to work on it. Anyway, I was going to post my code, but I see everybody running different tests.. Is there a new INI file I should run before posting my code? |
||||||||
|
|
|||||||
yep, check the private round thread: last page for new rules and first post for downloading the new ini |
||||||||
|
|
|||||||
LOL did you give me a present, howard? For $=1 to ($k^) to For $=1 to $k^0
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) /* 1) the block length 2) the permutation 3) the message to be encoded or decoded 4) a parameter denoting encoding (E) or decoding (D) */ dim $i, $, $r, $k, $o[$c^0] For $i=0 to $c^0 $=Substr($c,$i+1,1) $a=LCase($) If $a>` & $a<} $k=$k+$ $r=$r+" "+$i EndIf $o[$i] = $ If ($k^)=$l | $i=($c^) for each $ in Split($b,",") If $i+$-($k^)<=($c^) $a=$a+" "+$ EndIf Next $a=split($a) For $=1 to $k^0 $o[split($r)[iif($d=E,$,$a[$])]] = substr($k,iif($d=E,$a[$],$),1) Next $r='' $k='' $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
Argh!! Crap. I was too eager to post and lock in the new score. I was fearing you might beat me to the post. Christmas apparently came early. |
||||||||
|
|
|||||||
Damn you guys and your new tests! Now my code's broke. Code: Running Test 1 Encoding...0000000000000000000000000000Decoding...Done Running Test 2 Encoding...00Decoding...Done Running Test 3 Encoding...000Decoding...Done Running Test 4 Encoding...0000000000000Decoding...Done Running Test 5 Encoding...0000000000000Decoding...Done Running Test 6 Encoding...00000000000000000000000000000000000000000Decoding...Do ne Running Test 8 Encoding... ERROR : array reference out of bounds! Script: D:\Dev\kix\Golf\Week1a\KIXGOLF_TS.udf Line : 47 D:\Dev\kix\Golf\Week1a> Also, now it looks like I'm spitting out return codes somewhere. This wasn't happening before. Well, hopefully I'll get a little time today to at least get my code fixed. |
||||||||
|
|
|||||||
Originally Posted By: sixdoubleo I'm still at 461 Haven't had any time whatsoever in the last couple days to work on it. Anyway, I was going to post my code, but I see everybody running different tests.. Is there a new INI file I should run before posting my code? sixdoubleo, you can post your code anyway, even if it doesn't work. It's always nice to see what approach someone took. And, who knows? Maybe your code is perfect for the group to trim down to below 300 |
||||||||
|
|
|||||||
Originally Posted By: DrillSergeant Originally Posted By: sixdoubleo I'm still at 461 Haven't had any time whatsoever in the last couple days to work on it. Anyway, I was going to post my code, but I see everybody running different tests.. Is there a new INI file I should run before posting my code? sixdoubleo, you can post your code anyway, even if it doesn't work. It's always nice to see what approach someone took. And, who knows? Maybe your code is perfect for the group to trim down to below 300 OK...see above. Let me see if I can fix it first. Edit: OK...the return code issue was due to an older version of Kix32.exe on this box. Fixed that, but still getting an array out of bounds on Test 8. |
||||||||
|
|
|||||||
I am still working on my original code (no where near complete yet) but have a question. When you have a Non Alpha character it keeps it same position... but how do you then figure out the permutation. I.E. Input = This is n0t 4 real. With a block size of 5 and permutation of 53214 Now my problem is that my first block = "This ", position 5 is a space, so therefor it should stay in position 5 but I have already put "T" into position 5. I am not grasping how to reconcile what the permutation becomes. |
||||||||
|
|
|||||||
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) /* 1) the block length 2) the permutation 3) the message to be encoded or decoded 4) a parameter denoting encoding (E) or decoding (D) */ dim $i, $, $r, $k, $o[$c^0] For $i=0 to $c^0 $=Substr($c,$i+1,1) $a=LCase($) If $a>` & $a<} $k=$k+$ $r=$r+" "+$i EndIf $o[$i] = $ If ($k^)=$l | $i=($c^) for each $ in Split($b,",") If 0 + $ <= ($k^) $a=$a+" "+$ EndIf Next $a=split($a) For $=1 to $k^0 $o[split($r)[iif($d=E,$,$a[$])]] = substr($k,iif($d=E,$a[$],$),1) Next $r='' $k='' $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
Originally Posted By: Gargoyle I.E. Input = This is n0t 4 real. With a block size of 5 and permutation of 53214 Now my problem is that my first block = "This ", position 5 is a space, so therefor it should stay in position 5 but I have already put "T" into position 5. I am not grasping how to reconcile what the permutation becomes. Code: This i|s n0t 4 re|al 5321 4|5 3 2 14|21 sihi T|r t0n 4 es|la 1234 5|1 2 3 45|12 so you first have to create a string with only letters and work the permutation from there. |
||||||||
|
|
|||||||
Cranking up the heat...
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) /* 1) the block length 2) the permutation 3) the message to be encoded or decoded 4) a parameter denoting encoding (E) or decoding (D) */ dim $i, $o[$c^0], $, $r, $k, $y For $i=0 to $c^0 $=Substr($c,$i+1,1) $a=LCase($) If $a>` & $a<} $k=$k+$ $r=$r+" "+$i EndIf $o[$i] = $ If ($k^)=$l | $i=($c^) for each $ in Split($b,",") if $i+$-($k^)<=($c^) $a=$a+" "+$ EndIf Next For $=1 to $k^0 $y=$,split($a)[$] $o[split($r)[$y[$d=D]]]=substr($k,$y[$d=E],1) Next redim $r,$k $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
THIS SCORE BELONGS TO HOWARD
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) /* 1) the block length 2) the permutation 3) the message to be encoded or decoded 4) a parameter denoting encoding (E) or decoding (D) */ dim $i, $o[$c^0], $, $r, $k, $y For $i=0 to $c^0 $=Substr($c,$i+1,1) $a=LCase($) If $a>` & $a<} $k=$k+$ $r=$r+" "+$i EndIf $o[$i] = $ If ($k^)=$l | $i=($c^) for each $ in Split($b,",") If 0 + $ <= ($k^) $a=$a+" "+$ EndIf Next For $=1 to $k^0 $y=$,split($a)[$] $o[split($r)[$y[$d=D]]]=substr($k,$y[$d=E],1) Next redim $r,$k $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
Hehehe, aren't I a sneaky bastard? |
||||||||
|
|
|||||||
Thanks Sarge, now I have to rethink my strategy... [edit] Select - All (ctrl+a) Delete (del) [/edit] |
||||||||
|
|
|||||||
$y=$,split($a)[$] ???? what the hell??? I can't even figure out what it's supposed to do, how did you come up with it? |
||||||||
|
|
|||||||
oh, wait... I see it... damn! My hat is off, howard |
||||||||
|
|
|||||||
I have to leave for a couple hours. I wish you would have posted your update a few minutes earlier. In that case I could leave knowing I had the lead. I think a see a new posting strategy. |
||||||||
|
|
|||||||
I did post my update before your update (post #179132), but you didn't see it. I copied&pasted my -7 into your -10 real quick and posted that after your -10 post again. (Hence the sneaky bastard post after that) I just send you a PM about this. I think you're in the lead. I'll delete my 320 post, so you can post it if you want. As I told Jooel in the the private round, I don't hold back scores. If I did we would be playing kixpoker instead of kixgolf... |
||||||||
|
|
|||||||
Wow, you guys still pressing strokes out of Jooel's code. I will have to leave the fun now as the vacation primings are in the hot phase. So, see you on Monday in two weeks, Have Fun! |
||||||||
|
|
|||||||
I had been staring at those ugly IIF statements most of the morning thinking there had to be away to get rid of them. I think I found it. |
||||||||
|
|
|||||||
No problem. I had six minutes to see your post. I was just too excited with my prospects of my new code and big drop in the stroke count. Timing is every thing I guess. |
||||||||
|
|
|||||||
Originally Posted By: Howard Bullock ... I was just too excited with my prospects of my new code and big drop in the stroke count... Hehehe, I know what you mean, my heart rate went through the roof when I got that -7 But seriously, if this has an effect on the overal scoring, you are currently #1. Also because your -10 is so much nicer than my -7 |
||||||||
|
|
|||||||
Rogier, I knew it would be OK. See next post... |
||||||||
|
|
|||||||
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) /* 1) the block length 2) the permutation 3) the message to be encoded or decoded 4) a parameter denoting encoding (E) or decoding (D) */ dim $i, $o[$c^0], $, $r, $k, $y For $i=0 to $c^0 $=Substr($c,$i+1,1) $a=LCase($) If $a>` & $a<} $k=$k+$ $r=$r+" "+$i EndIf $o[$i] = $ If ($k^)=$l | $i=($c^) for each $ in Split($b,",") If ($k^) >= $ $a=$a+" "+$ EndIf Next For $=1 to $k^0 $y=$,split($a)[$] $o[split($r)[$y[$d=D]]]=substr($k,$y[$d=E],1) Next redim $r,$k $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
hehehe, I've looked at that line a couple of times too, but I couldn't figure out what was wrong with it. Amazing eh? to go from: if $i+$a-$g-1<($c^) to if ($k^)>=$ |
||||||||
|
|
|||||||
I have officially thrown in the towel... I just keep going in circles. Maybe someone can break down one these and provide a step by step analysis for us golf rookies. |
||||||||
|
|
|||||||
damn, I never thought about using lcase!!!! damn how stupid of me. |
||||||||
|
|
|||||||
Damn... can we break 300???
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) dim $i, $o[$c^0], $, $r, $k, $y For $i=0 to $c^0 $=Substr($c,$i+1,1) $o[$i] = $ $a=LCase($) If $a>` & $a<} $k=$k+$ $r=$r + " " + $i EndIf If ($k^)=$l | $i=($c^) For Each $ in Split($b,",") If ($k^) => $ $a=$a+" "+$ $y = ascan(Split($a),$), $ $o[split($r)[$y [$d = D]]] = substr($k, $y[$d = E], 1) EndIf Next ReDim $r,$k $a=join($o,'') EndFunction ;! ;! ; end Top Secret How it made me feel? |
||||||||
|
|
|||||||
Originally Posted By: Gargoyle I have officially thrown in the towel... I just keep going in circles. Maybe someone can break down one these and provide a step by step analysis for us golf rookies. I promise to explain the final code completely after the public round |
||||||||
|
|
|||||||
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) /* 1) the block length 2) the permutation 3) the message to be encoded or decoded 4) a parameter denoting encoding (E) or decoding (D) */ dim $i, $o[$c^0], $, $r, $k, $y For $i=0 to $c^0 $=Substr($c,$i+1,1) $a=LCase($) If $a>` & $a<} $k=$k+$ $r=$r+" "+$i EndIf $o[$i] = $ If ($k^)=$l | $i=($c^) for each $ in Split($b,",") If ($k^) >= $ $a=$a+" "+$ EndIf Next For $=1 to $k^0 $y=$,split($a)[$] $o[split($r)[$y[$d=D]]]=substr($k,$y[$d=E],1) Next $r=! $k='' $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
damn it guys. you post new scores quicker than I can copy&paste them from the board. |
||||||||
|
|
|||||||
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) dim $i, $o[$c^0], $, $r, $k, $y For $i=0 to $c^0 $=Substr($c,$i+1,1) $o[$i] = $ $a=LCase($) If $a>` & $a<} $k=$k+$ $r=$r + " " + $i EndIf If ($k^)=$l | $i=($c^) For Each $ in Split($b,",") If ($k^) => $ $a=$a+" "+$ $y = ascan(Split($a),$), $ $o[split($r)[$y [$d = D]]] = substr($k, $y[$d = E], 1) EndIf Next $r=! $k='' $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
Ok, I'm not going to post a 307 now... |
||||||||
|
|
|||||||
thanks. |
||||||||
|
|
|||||||
k, did it slow down already? you guys did amazing job with my code. one thing I have issue with, is the way kixtart handles => thingies. if it's done like >= it works, but not the way I tried it. stupid. should have invested some more in the private round... if I would have had the need that is. if there was enough competition and stuff like that |
||||||||
|
|
|||||||
hmm... or was it the other way around. it works like => but not >= |
||||||||
|
|
|||||||
well, I'm off to bed, I'll check in tomorrow and see that <300 post of one of you |
||||||||
|
|
|||||||
Jooel, this just sucks. We have been slaving away at this all day and just pop in and take the lead. Anyway, nice changes. I hope left something for us. |
||||||||
|
|
|||||||
It actually works both ways for me. If ($k^) >= $ If ($k^) => $ |
||||||||
|
|
|||||||
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) dim $i, $o[$c^0], $, $r, $k For $i=0 to $c^0 $=Substr($c,$i+1,1) $o[$i] = $ $a=LCase($) If $a>` & $a<} $k=$k+$ $r=$r + " " + $i EndIf If ($k^)=$l | $i=($c^) For Each $ in Split($b,",") If ($k^) => $ $a=$a+" "+$ $ = ascan(Split($a),$), $ $o[split($r)[$[$d = D]]] = substr($k, $[$d = E], 1) EndIf Next $r=! $k='' $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
still not under 300. hoby, your turn! |
||||||||
|
|
|||||||
Wow. Let me start all over again. I have to see what you did. |
||||||||
|
|
|||||||
actually nothing. you guys just didn't see the forest for the seas. |
||||||||
|
|
|||||||
I needed the $y earlier when it was first introduced, but failed to look at it again when the structure changed later on. Still looking. /edit/ Wow you made more changes than I thought. /End Edit/ |
||||||||
|
|
|||||||
BROKE IT!!!
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) dim $i, $o[$c^0], $, $r, $k For $i=1 to $c^0 $=Substr($c,$i,1) $o[$i] = $ $a=LCase($) If $a>` & $a<} $k=$k+$ $r=$r + " " + $i EndIf If ($k^)=$l | $i=($c^) For Each $ in Split($b,",") If ($k^) => $ $a=$a+" "+$ $ = ascan(Split($a),$), $ $o[split($r)[$[$d = D]]] = substr($k, $[$d = E], 1) EndIf Next $r=! $k='' $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
couldn't sleep |
||||||||
|
|
|||||||
I'm quite impressed Looks like there's a nice little give-and-take going on. |
||||||||
|
|
|||||||
lol, talk about simple change... couldn't even see it with naked eye but had to revert to FC |
||||||||
|
|
|||||||
so...
Code: ; begin Top Secret ; ;! Function a($l,$b,$c,$d) dim $i, $o[$c^0], $, $r, $k For $i=1 to $c^0 $=Substr($c,$i,1) $o[$i] = $ $a=LCase($) If $a>` & $a<} $k=$k+$ $r=$r + " " + $i EndIf If ($k^)=$l | $i=($c^) For Each $ in Split($b,",") If ($k^) => $ $a=$a+$+! $ = instr($a,$)/2, $ $o[split($r)[$[$d = D]]] = substr($k, $[$d = E], 1) EndIf Next $r=! $k='' $a=join($o,'') EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
Code: $a=$a+$+! $ = instr($a,$)/2, $ I can't understand why this even works for a blocksize of 10... but hey, if it works, it works Somewhere along the line we lost the functionality for the blocksize=100 test though... oh well, not part of the assignment anyway |
||||||||
|
|
|||||||
Had an idea. May have to test whether I can utilize UltraCompare to create a color-codes set of UDFs that highlights the changes from score to score. I can't even figure out which characters have been removed or whether there was more substantial changes to what seems to be Jooels original code base. |
||||||||
|
|
|||||||
well, my original code is a bit rewambed now. the problem with coloring is that when there is structure change, like one for moves inside another, the whole udf gets colored, right? |
||||||||
|
|
|||||||
drill, it works, because 10 is only doubledigit number. say we have: "a" as the character "a7!10!3!..." is the result. then, the location of "7" is 2, "10" is 4 and "3" is 7. and here is the beauty, dividing it with int, results in int! so, dividing the values with 2 gives 1, 2 and 3. if the blocksize was 11 or the wished 100, it wouldn't work. guess that's where we lost the support for huge blocksizes |
||||||||
|
|
|||||||
Great job guys. Your skills surpass mine. Hats off to both of you. |
||||||||
|
|
|||||||
slow down with the hails. I'm blushing already. |
||||||||
|
|
|||||||
ok... as this is already golfed, started with hoby's code. left the regexp as it was.
Code: ; begin Top Secret ; ;! Function a($f,$b,$c,$d) dim $, $g, $o, $j, $m $=createobject("VBscript.RegExp") $.Pattern="\W|\d" $.Global=1 $o=$.replace($c,"") $c=$.Execute($c) do $j=split($b,",") for $g=1 to $f if $f>($o^) if $g>($o^) $.Pattern=""+$g+",?" $b=$.replace($b,"") $m=1+$m endif else $a=$a+substr($o,iif($d=E,$j[$g-1],ascan($j,$g)+1),1) endif next $o=substr($o,1+($m=)*$f) $f=$f-$m $m=0 until $o=0 for each $ in $c $m=$.FirstIndex $a=left($a,$m)+ $.value + substr($a,$m+1) EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
Code: ; begin Top Secret ; ;! Function a($f,$b,$c,$d) dim $, $g, $o, $j, $m $=createobject(VBscript.RegExp) $.Pattern="\W|\d" $.Global=1 $o=$.replace($c,"") $c=$.Execute($c) do $j=split($b,",") for $g=1 to $f if $f>($o^) if $g>($o^) $.Pattern=""+$g+",?" $b=$.replace($b,"") $m=1+$m endif else $a=$a+substr($o,iif($d=E,$j[$g-1],ascan($j,$g)+1),1) endif next $o=substr($o,1+($m=)*$f) $f=$f-$m $m=0 until $o=0 for each $ in $c $m=$.FirstIndex $a=left($a,$m)+ $.value + substr($a,$m+1) EndFunction ;! ;! ; end Top Secret |
||||||||
|
|
|||||||
is it over already? |
||||||||
|
|
|||||||
It seems like this KixGolf session may be all wrapped up. Thanks for looking at the RegEx code. It seems like I did fairly well with that approach. |
||||||||
|
|
|||||||
Quote: ================================================================ KiXtart GOLF - The Duration of the Competition ================================================================ 1) Private coding phase: From date/time of posting the tournament challenge to EST (BBS+6 time) 2) Public coding phase: From EST (BBS+6 time) to EST (BBS+6 time) 3) Final results: EST (BBS+6 time) wtf? we don't have dates for our golf tournament no more?!?! |
||||||||
|
|
|||||||
Yes there are. http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=178151 Quote: .... Each round will be played from Friday to the following week Sunday. Wednesday evening will be the switch from private to public coding. .... Cryptography: 2007-08-03 to 2007-08-12 .... Looks like today is the final day but because the private round has been stretched with one day maybe the public round will also have an extra day. |
||||||||
|
|
|||||||
As Jooel stated, it looks like the code has been golfed down completely. Thus, I'll be wrapping up tonight. Jens |
||||||||
|
|
|||||||
The public round is now closed. thanks to all participants. Final results will be posted shortly. |
||||||||
|
|
|||||||
Private Round Code: Player Score Points Jooel 354 5+1 DrillSergeant 359 4+1 Howard Bullock 425 3+1 Jochen 426 2+1 sixdoubleo 461 1+1 Allen N/A 1 Public Round Code: Player Score Points Jooel 292 5 DrillSergeant 299 4 Howard Bullock 318 3 Jochen 357 2 sixdoubleo 461 1 Memorable Moments Allen: What THE HELL is this Frankenstein crap? And who is the Basta that figured it out? Bjoern: this is more fun then to watch tv. I think I need to take vacation and try this myself :). |
||||||||
|
|
|||||||
Thanx for the golf, Jens. It was fun while it lasted, can't wait for the next one |
||||||||
|
|
|||||||
as can't I! to note all others who did not post, you can get points too if you improve any of the solutions and make to top 5, so in public round you guys really should try to post. specially benny! |
||||||||
|
|
|||||||
sorry, fit hit the shan this week and i spent more time working than i wanted. |
||||||||
|
|
|||||||
Total characters golfed down in public round:
|
||||||||
|
|
|||||||
heh, talk about doing nothing but just enough to beat you guys |
||||||||
|
|
|||||||
I have to re-emphasize what Jooel said. Participation counts, post a working UDF even if it's not passing all the test or improve on another person's code and you'll get a point. Scoring for the KiXgolf Tournament is as follows:
The next round Wordsmithing is scheduled to run 2007-09-07 to 2007-09-16. and if I say it's an easy one somebody's going to kill me :-) However, I can tell you that much, the last round will be complex in a certain way, though not necessarily from an algorithm point of view. Still, I think it'll be the most fun one and the earlier rounds will definitely warm you up for it. So, participate often and colect the points |