Sealeopard
(KiX Master)
2007-08-10 01:12 AM
KiXgolf: Top Secret - Public Round

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


Howard Bullock
(KiX Supporter)
2007-08-10 01:23 AM
Re: KiXgolf: Top Secret - Public Round





KiXtart
KiXtart Version = 4.53
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/09 19:22:03.441
Processing End = 2007/08/09 19:22:03.491
Duration = 0000/00/00 00:00:00.049
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 425

Thank you for participating in KiXtart Golf!




 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 


AllenAdministrator
(KiX Supporter)
2007-08-10 02:02 AM
Re: KiXgolf: Top Secret - Public Round

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...

function a($l,$p,$m,$f)
dim $b,$c,$d,$e,$i,$j,$s,$
$=CreateObject("VBScript.RegExp")
$.Global = 1
$.Pattern="\w"
$e=split($p,",")
;? $m ?
for $j=1 to len($m)
if $i=$l
$b=$b+$l
if $.Execute(substr($m,$j+1,1)).count=0
$s=$s+1
endif
$i=0
endif
$c=substr($m,$j,1)
if $.Execute($c).count
$d=substr($m,$b+$e[$i]+$s,1)
if $s
$s=0
endif
if $.Execute($d).count=0
$d=substr($m,$b+$e[$i]-1,1)
endif
$a=$a+$d
if $.Execute(substr($m,$j+1,1)).count=0
$b=$b+1
endif
$i=$i+1
else
$a=$a+$c
endif
next
endfunction




LonkeroAdministrator
(KiX Master Guru)
2007-08-10 02:21 AM
Re: KiXgolf: Top Secret - Public Round

k, I took a traditional approach:




KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 13
Speed = 797 MHz
Memory = 1014 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/09 22:56:23.781
Processing End = 2007/08/09 22:56:24.375
Duration = 0000/00/00 00:00:00.593
KiXGolf Result = Solution passed all 20 tests
KiXGolf Score = 354

Thank you for participating in KiXtart Golf!




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^)],$g,$,$r,$k
for $i=0 to ($c^)
$=substr($c,$i+1,1)
$a=asc(ucase($))
if $a>64 & $a<91
$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


LonkeroAdministrator
(KiX Master Guru)
2007-08-10 02:51 AM
Re: KiXgolf: Top Secret - Public Round

btw, wasn't the private round gonna be extended to friday or something?
at least that's what I thought...


Sealeopard
(KiX Master)
2007-08-10 05:50 AM
Re: KiXgolf: Top Secret - Public Round

Nope:
 Quote:

3) I'll extend the private round until Thursday 6pm EST


Howard Bullock
(KiX Supporter)
2007-08-10 06:24 AM
Re: KiXgolf: Top Secret - Public Round

changed: iif($d="E",$j[$g-1]
to: iif($d=E,$j[$g-1]

My code is now 423


LonkeroAdministrator
(KiX Master Guru)
2007-08-10 07:54 AM
Re: KiXgolf: Top Secret - Public Round

oh.
thursday translated somehow in my head.

np. had the leading score, so doesn't hurt \:\)


DrillSergeant
(MM club member)
2007-08-10 08:17 AM
Re: KiXgolf: Top Secret - Public Round




; begin Top Secret
;
;!
Function a($b, $p, $, $h)
dim $c, $r, $x

Do
$x = Left($, 1)
$c = LCase($)
If ($c>` & $c<{)
$r = $r + $x
$x = Chr(1)
EndIf
$a = $a + $x
$ = Right($,~)
Until $=0

$p = Split($p,',')

For $c = 0 to ($r^) - 1
While $b + $c - $ > ($r^)
$p = Split(Right(Join(Split(' ' + Join($p), ' ' + $b), ''), ~))
$b = $b - 1
Loop

$x = InStr($a,Chr(1))
$a = Left($a,$x - 1) + Substr($r, $c + iif($h = E, $p[$], Ascan($p, $ + 1) + 1) - $,1) + Substr($a, $x + 1)
$ = ($ + 1) mod $b
EndFunction
;!
;!
; end Top Secret








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 08:37:45.921
Processing End = 2007/08/10 08:37:45.937
Duration = 0000/00/00 00:00:00.016
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 359

Thank you for participating in KiXtart Golf!




LonkeroAdministrator
(KiX Master Guru)
2007-08-10 08:33 AM
Re: KiXgolf: Top Secret - Public Round

hey, you forgot to post your score along the code, dude!

DrillSergeant
(MM club member)
2007-08-10 08:40 AM
Re: KiXgolf: Top Secret - Public Round

sorry boss ;\)

JochenAdministrator
(KiX Supporter)
2007-08-10 10:14 AM
Re: KiXgolf: Top Secret - Public Round

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:


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 09:56:54.953
Processing End = 2007/08/10 09:56:55.000
Duration = 0000/00/00 00:00:00.046
KiXGolf Score = 426

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 = asc(ucase($j))
if $e<65 | $e>90
$g = 1 + $g
$h = ',' + $h + $ + ','
else
$f = 1 + $f
$n = split(join($n) + ' ' + $j)
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 + $
if $d = E
$a = $a + $n[$k[$]]
else
$a = $a + $n[ascan($k,$g-$j)]
endfunction


JochenAdministrator
(KiX Supporter)
2007-08-10 10:24 AM
Re: KiXgolf: Top Secret - Public Round

Gawd!

missing the obvious

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 10:19:20.234
Processing End = 2007/08/10 10:19:20.281
Duration = 0000/00/00 00:00:00.047
KiXGolf Score = 423

Thank you for participating in KiXtart Golf!


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<'a' | $e>'z'
$g = 1 + $g
$h = ',' + $h + $ + ','
else
$f = 1 + $f
$n = split(join($n) + ' ' + $j)
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 + $
if $d = E
$a = $a + $n[$k[$]]
else
$a = $a + $n[ascan($k,$g-$j)]
endfunction


JochenAdministrator
(KiX Supporter)
2007-08-10 10:29 AM
Re: KiXgolf: Top Secret - Public Round

even better...

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 10:25:50.906
Processing End = 2007/08/10 10:25:50.953
Duration = 0000/00/00 00:00:00.046
KiXGolf Score = 419

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 + $
if $d = E
$a = $a + $n[$k[$]]
else
$a = $a + $n[ascan($k,$g-$j)]
endfunction


JochenAdministrator
(KiX Supporter)
2007-08-10 10:37 AM
Re: KiXgolf: Top Secret - Public Round

Right, now for some work to do... will be back tonight

JochenAdministrator
(KiX Supporter)
2007-08-10 10:41 AM
Re: KiXgolf: Top Secret - Public Round

Ok, one more for the road, I love KiXtart


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 10:37:57.015
Processing End = 2007/08/10 10:37:57.062
Duration = 0000/00/00 00:00:00.046
KiXGolf Score = 407

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 + $
if $d = E
$a = $a + $n[$k[$]]
else
$a = $a + $n[ascan($k,$g-$j)]
endfunction


JochenAdministrator
(KiX Supporter)
2007-08-10 10:44 AM
Re: KiXgolf: Top Secret - Public Round

 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!


JochenAdministrator
(KiX Supporter)
2007-08-10 11:01 AM
Re: KiXgolf: Top Secret - Public Round

btw here is a 357 score based on Rogier's code


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 10:57:05.796
Processing End = 2007/08/10 10:57:05.828
Duration = 0000/00/00 00:00:00.031
KiXGolf Score = 357

Thank you for participating in KiXtart Golf!


Code:


Function a($b, $p, $, $h)
dim $c, $r, $x

Do
$x = Left($, 1)
$c = LCase($)
If $c>` & $c<{
$r = $r + $x
$x = Chr(1)
EndIf
$a = $a + $x
$ = Right($,~)
Until $=0

$p = Split($p,',')

For $c = 0 to ($r^) - 1
While $b + $c - $ > ($r^)
$p = Split(Right(Join(Split(' ' + Join($p), ' ' + $b), ''), ~))
$b = $b - 1
Loop

$x = InStr($a,Chr(1))
$a = Left($a,$x - 1) + Substr($r, $c + iif($h = E, $p[$], Ascan($p, $ + 1) + 1) - $,1) + Substr($a, $x + 1)
$ = ($ + 1) mod $b
EndFunction



No need for that parens there,no?


DrillSergeant
(MM club member)
2007-08-10 11:05 AM
Re: KiXgolf: Top Secret - Public Round

Jooel's code trimmed down to 347 by changing:
$a=asc(ucase($))
if $a>64 & $a<91

to

$a=lCase($)
if $a>` & $a<}




; 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^)],$g,$,$r,$k
for $i=0 to ($c^)
$=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





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 11:00:43.296
Processing End = 2007/08/10 11:00:43.328
Duration = 0000/00/00 00:00:00.031
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 347

Thank you for participating in KiXtart Golf!


DrillSergeant
(MM club member)
2007-08-10 11:07 AM
Re: KiXgolf: Top Secret - Public Round

thanx Jochen, I just realised that one too ;\) , I guess the ( and ) did have a function once

JochenAdministrator
(KiX Supporter)
2007-08-10 11:08 AM
Re: KiXgolf: Top Secret - Public Round

Nice,

didn't see that ... maybe because Jooel's code is too traditional for me


JochenAdministrator
(KiX Supporter)
2007-08-10 11:11 AM
Re: KiXgolf: Top Secret - Public Round

You forgot to post the score again ;\)

JochenAdministrator
(KiX Supporter)
2007-08-10 11:27 AM
Re: KiXgolf: Top Secret - Public Round

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


Howard Bullock
(KiX Supporter)
2007-08-10 01:21 PM
Re: KiXgolf: Top Secret - Public Round

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.


Howard Bullock
(KiX Supporter)
2007-08-10 01:43 PM
Re: KiXgolf: Top Secret - Public Round

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 


Howard Bullock
(KiX Supporter)
2007-08-10 01:45 PM
Re: KiXgolf: Top Secret - Public Round

Bad post that I can not delete.

DrillSergeant
(MM club member)
2007-08-10 02:09 PM
Re: KiXgolf: Top Secret - Public Round

Howard, the lase code you've posted (344) fails all 18 tests

JochenAdministrator
(KiX Supporter)
2007-08-10 02:10 PM
Re: KiXgolf: Top Secret - Public Round

L.O.L.


Is this allowed now? I could do that with mine too


AllenAdministrator
(KiX Supporter)
2007-08-10 02:18 PM
Re: KiXgolf: Top Secret - Public Round

 Quote:

if $a>` & $a<}


What THE HELL is this Frankenstein crap? And who is the Basta that figured it out?


DrillSergeant
(MM club member)
2007-08-10 02:19 PM
Re: KiXgolf: Top Secret - Public Round

Working 344 code:





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 14:17:44.609
Processing End = 2007/08/10 14:17:44.640
Duration = 0000/00/00 00:00:00.031
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 344

Thank you for participating in KiXtart Golf!




 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


DrillSergeant
(MM club member)
2007-08-10 02:21 PM
Re: KiXgolf: Top Secret - Public Round

 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


AllenAdministrator
(KiX Supporter)
2007-08-10 02:22 PM
Re: KiXgolf: Top Secret - Public Round

Funny, I was just at asciitable looking... nice, very nice.

Howard Bullock
(KiX Supporter)
2007-08-10 02:37 PM
Re: KiXgolf: Top Secret - Public Round





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 08:36:32.715
Processing End = 2007/08/10 08:36:32.755
Duration = 0000/00/00 00:00:00.040
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 342

Thank you for participating in KiXtart Golf!



 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 


Benny69
(MM club member)
2007-08-10 02:38 PM
Re: KiXgolf: Top Secret - Public Round

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.

JochenAdministrator
(KiX Supporter)
2007-08-10 02:40 PM
Re: KiXgolf: Top Secret - Public Round

Clever counting of variable occurances ...

I can't seem to squeeze more out of it


Benny69
(MM club member)
2007-08-10 03:10 PM
Re: KiXgolf: Top Secret - Public Round

My bad I was running ver 4.51, now running 4.53 all is good


DrillSergeant
(MM club member)
2007-08-10 03:12 PM
Re: KiXgolf: Top Secret - Public Round


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!


Benny69
(MM club member)
2007-08-10 03:14 PM
Re: KiXgolf: Top Secret - Public Round

Drill your code is good see previous post

DrillSergeant
(MM club member)
2007-08-10 03:18 PM
Re: KiXgolf: Top Secret - Public Round

Nice one, howard! \:\)

DrillSergeant
(MM club member)
2007-08-10 04:10 PM
Re: KiXgolf: Top Secret - Public Round





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 16:07:24.328
Processing End = 2007/08/10 16:07:24.359
Duration = 0000/00/00 00:00:00.030
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 339

Thank you for participating in KiXtart Golf!




 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


Howard Bullock
(KiX Supporter)
2007-08-10 05:23 PM
Re: KiXgolf: Top Secret - Public Round

Excellent. I should have seen that. I was looking into those variables before I had to take the kids to the orthodonists.

Howard Bullock
(KiX Supporter)
2007-08-10 05:38 PM
Re: KiXgolf: Top Secret - Public Round





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 11:36:03.501
Processing End = 2007/08/10 11:36:03.541
Duration = 0000/00/00 00:00:00.040
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 338

Thank you for participating in KiXtart Golf!




 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
 


DrillSergeant
(MM club member)
2007-08-10 06:07 PM
Re: KiXgolf: Top Secret - Public Round

Lot of work for 1 point. But every point counts, eh?

sixdoubleo
(Starting to like KiXtart)
2007-08-10 06:14 PM
Re: KiXgolf: Top Secret - Public Round

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?


JochenAdministrator
(KiX Supporter)
2007-08-10 06:18 PM
Re: KiXgolf: Top Secret - Public Round

yep,

check the private round thread: last page for new rules and first post for downloading the new ini


DrillSergeant
(MM club member)
2007-08-10 06:20 PM
Re: KiXgolf: Top Secret - Public Round

LOL

did you give me a present, howard? \:D

For $=1 to ($k^)

to

For $=1 to $k^0






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 18:17:57.281
Processing End = 2007/08/10 18:17:57.312
Duration = 0000/00/00 00:00:00.031
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 337

Thank you for participating in KiXtart Golf!




 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



Howard Bullock
(KiX Supporter)
2007-08-10 06:27 PM
Re: KiXgolf: Top Secret - Public Round

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.

sixdoubleo
(Starting to like KiXtart)
2007-08-10 06:29 PM
Re: KiXgolf: Top Secret - Public Round



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.


DrillSergeant
(MM club member)
2007-08-10 06:30 PM
Re: KiXgolf: Top Secret - Public Round

 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 \:\)


sixdoubleo
(Starting to like KiXtart)
2007-08-10 06:32 PM
Re: KiXgolf: Top Secret - Public Round

 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.


Gargoyle
(MM club member)
2007-08-10 06:52 PM
Re: KiXgolf: Top Secret - Public Round

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.


DrillSergeant
(MM club member)
2007-08-10 06:54 PM
Re: KiXgolf: Top Secret - Public Round






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 18:52:26.453
Processing End = 2007/08/10 18:52:26.484
Duration = 0000/00/00 00:00:00.031
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 330

Thank you for participating in KiXtart Golf!




 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


DrillSergeant
(MM club member)
2007-08-10 07:00 PM
Re: KiXgolf: Top Secret - Public Round

 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.


Howard Bullock
(KiX Supporter)
2007-08-10 07:00 PM
Re: KiXgolf: Top Secret - Public Round

Cranking up the heat...





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 12:59:02.937
Processing End = 2007/08/10 12:59:02.977
Duration = 0000/00/00 00:00:00.040
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 327

Thank you for participating in KiXtart Golf!




 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 


DrillSergeant
(MM club member)
2007-08-10 07:03 PM
Re: KiXgolf: Top Secret - Public Round


THIS SCORE BELONGS TO HOWARD





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 19:02:52.890
Processing End = 2007/08/10 19:02:52.921
Duration = 0000/00/00 00:00:00.031
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 320

Thank you for participating in KiXtart Golf!




 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 


DrillSergeant
(MM club member)
2007-08-10 07:05 PM
Re: KiXgolf: Top Secret - Public Round

Hehehe, aren't I a sneaky bastard? \:D

Gargoyle
(MM club member)
2007-08-10 07:06 PM
Re: KiXgolf: Top Secret - Public Round

Thanks Sarge, now I have to rethink my strategy...

[edit]
Select - All (ctrl+a)
Delete (del)
[/edit]


DrillSergeant
(MM club member)
2007-08-10 07:18 PM
Re: KiXgolf: Top Secret - Public Round

$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?


DrillSergeant
(MM club member)
2007-08-10 07:20 PM
Re: KiXgolf: Top Secret - Public Round

oh, wait... I see it... damn! My hat is off, howard \:\)

Howard Bullock
(KiX Supporter)
2007-08-10 07:20 PM
Re: KiXgolf: Top Secret - Public Round

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.

DrillSergeant
(MM club member)
2007-08-10 07:30 PM
Re: KiXgolf: Top Secret - Public Round

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...


JochenAdministrator
(KiX Supporter)
2007-08-10 09:39 PM
Re: KiXgolf: Top Secret - Public Round

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!

\:\)


Howard Bullock
(KiX Supporter)
2007-08-10 10:10 PM
Re: KiXgolf: Top Secret - Public Round

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.

Howard Bullock
(KiX Supporter)
2007-08-10 10:16 PM
Re: KiXgolf: Top Secret - Public Round

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.

DrillSergeant
(MM club member)
2007-08-10 10:23 PM
Re: KiXgolf: Top Secret - Public Round

 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 \:D

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 ;\)


Howard Bullock
(KiX Supporter)
2007-08-10 10:31 PM
Re: KiXgolf: Top Secret - Public Round

Rogier, I knew it would be OK.

See next post...


Howard Bullock
(KiX Supporter)
2007-08-10 10:33 PM
Re: KiXgolf: Top Secret - Public Round





KiXtart
KiXtart Version = 4.53
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 16:28:32.112
Processing End = 2007/08/10 16:28:32.152
Duration = 0000/00/00 00:00:00.040
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 318

Thank you for participating in KiXtart Golf!




 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 
 


DrillSergeant
(MM club member)
2007-08-10 10:38 PM
Re: KiXgolf: Top Secret - Public Round

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^)>=$


Gargoyle
(MM club member)
2007-08-10 10:56 PM
Re: KiXgolf: Top Secret - Public Round

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.


LonkeroAdministrator
(KiX Master Guru)
2007-08-10 11:09 PM
Re: KiXgolf: Top Secret - Public Round

damn, I never thought about using lcase!!!!
damn how stupid of me.


DrillSergeant
(MM club member)
2007-08-10 11:16 PM
Re: KiXgolf: Top Secret - Public Round

Damn... can we break 300???





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 23:13:35.953
Processing End = 2007/08/10 23:13:35.984
Duration = 0000/00/00 00:00:00.031
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 308

Thank you for participating in KiXtart Golf!





 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? \:D \:D \:D


DrillSergeant
(MM club member)
2007-08-10 11:23 PM
Re: KiXgolf: Top Secret - Public Round

 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 \:\)


LonkeroAdministrator
(KiX Master Guru)
2007-08-10 11:27 PM
Re: KiXgolf: Top Secret - Public Round





KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 13
Speed = 797 MHz
Memory = 1014 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/11 00:26:34.499
Processing End = 2007/08/11 00:26:34.561
Duration = 0000/00/00 00:00:00.061
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 317

Thank you for participating in KiXtart Golf!



 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 


LonkeroAdministrator
(KiX Master Guru)
2007-08-10 11:27 PM
Re: KiXgolf: Top Secret - Public Round

damn it guys.
you post new scores quicker than I can copy&paste them from the board.


LonkeroAdministrator
(KiX Master Guru)
2007-08-10 11:28 PM
Re: KiXgolf: Top Secret - Public Round





KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 13
Speed = 797 MHz
Memory = 1014 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/11 00:30:06.327
Processing End = 2007/08/11 00:30:06.421
Duration = 0000/00/00 00:00:00.094
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 307

Thank you for participating in KiXtart Golf!


 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 


DrillSergeant
(MM club member)
2007-08-10 11:29 PM
Re: KiXgolf: Top Secret - Public Round

Ok, I'm not going to post a 307 now... \:D

LonkeroAdministrator
(KiX Master Guru)
2007-08-10 11:30 PM
Re: KiXgolf: Top Secret - Public Round

thanks.

LonkeroAdministrator
(KiX Master Guru)
2007-08-10 11:35 PM
Re: KiXgolf: Top Secret - Public Round

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 ;\)


LonkeroAdministrator
(KiX Master Guru)
2007-08-10 11:37 PM
Re: KiXgolf: Top Secret - Public Round

hmm... or was it the other way around.
it works like => but not >=


DrillSergeant
(MM club member)
2007-08-10 11:56 PM
Re: KiXgolf: Top Secret - Public Round

well, I'm off to bed, I'll check in tomorrow and see that <300 post of one of you ;\)

Howard Bullock
(KiX Supporter)
2007-08-11 12:00 AM
Re: KiXgolf: Top Secret - Public Round

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.


Howard Bullock
(KiX Supporter)
2007-08-11 12:05 AM
Re: KiXgolf: Top Secret - Public Round

It actually works both ways for me.

If ($k^) >= $

If ($k^) => $


LonkeroAdministrator
(KiX Master Guru)
2007-08-11 12:11 AM
Re: KiXgolf: Top Secret - Public Round





KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 13
Speed = 797 MHz
Memory = 1014 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/11 01:11:21.511
Processing End = 2007/08/11 01:11:21.604
Duration = 0000/00/00 00:00:00.092
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 301

Thank you for participating in KiXtart Golf!



 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 


LonkeroAdministrator
(KiX Master Guru)
2007-08-11 12:12 AM
Re: KiXgolf: Top Secret - Public Round

still not under 300.
hoby, your turn!


Howard Bullock
(KiX Supporter)
2007-08-11 12:21 AM
Re: KiXgolf: Top Secret - Public Round

Wow. Let me start all over again. I have to see what you did.

LonkeroAdministrator
(KiX Master Guru)
2007-08-11 12:24 AM
Re: KiXgolf: Top Secret - Public Round

actually nothing.
you guys just didn't see the forest for the seas.


Howard Bullock
(KiX Supporter)
2007-08-11 12:32 AM
Re: KiXgolf: Top Secret - Public Round

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/


DrillSergeant
(MM club member)
2007-08-11 01:04 AM
Re: KiXgolf: Top Secret - Public Round

BROKE IT!!! \:D \:D \:D




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/11 01:01:32.015
Processing End = 2007/08/11 01:01:32.046
Duration = 0000/00/00 00:00:00.030
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 299

Thank you for participating in KiXtart Golf!




 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 


DrillSergeant
(MM club member)
2007-08-11 01:05 AM
Re: KiXgolf: Top Secret - Public Round

couldn't sleep ;\)

Sealeopard
(KiX Master)
2007-08-11 04:02 AM
Re: KiXgolf: Top Secret - Public Round

I'm quite impressed \:\) Looks like there's a nice little give-and-take going on.

LonkeroAdministrator
(KiX Master Guru)
2007-08-11 11:32 AM
Re: KiXgolf: Top Secret - Public Round

lol, talk about simple change...
couldn't even see it with naked eye but had to revert to FC \:\)


LonkeroAdministrator
(KiX Master Guru)
2007-08-11 01:13 PM
Re: KiXgolf: Top Secret - Public Round

so...




KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 13
Speed = 797 MHz
Memory = 1014 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/11 14:13:09.362
Processing End = 2007/08/11 14:13:09.455
Duration = 0000/00/00 00:00:00.093
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 292

Thank you for participating in KiXtart Golf!



 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 


DrillSergeant
(MM club member)
2007-08-11 01:53 PM
Re: KiXgolf: Top Secret - Public Round

 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 \:\/


Sealeopard
(KiX Master)
2007-08-11 02:33 PM
Re: KiXgolf: Top Secret - Public Round

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.

LonkeroAdministrator
(KiX Master Guru)
2007-08-11 02:42 PM
Re: KiXgolf: Top Secret - Public Round

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?


LonkeroAdministrator
(KiX Master Guru)
2007-08-11 02:47 PM
Re: KiXgolf: Top Secret - Public Round

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 \:\)


Howard Bullock
(KiX Supporter)
2007-08-11 03:07 PM
Re: KiXgolf: Top Secret - Public Round

Great job guys. Your skills surpass mine. Hats off to both of you.

LonkeroAdministrator
(KiX Master Guru)
2007-08-11 03:16 PM
Re: KiXgolf: Top Secret - Public Round

slow down with the hails.
I'm blushing already.


LonkeroAdministrator
(KiX Master Guru)
2007-08-11 04:23 PM
Re: KiXgolf: Top Secret - Public Round

ok...
as this is already golfed, started with hoby's code.
left the regexp as it was.




KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 13
Speed = 798 MHz
Memory = 1014 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/11 17:21:54.857
Processing End = 2007/08/11 17:21:54.935
Duration = 0000/00/00 00:00:00.077
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 419

Thank you for participating in KiXtart Golf!




 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


LonkeroAdministrator
(KiX Master Guru)
2007-08-11 05:44 PM
Re: KiXgolf: Top Secret - Public Round





KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 13
Speed = 798 MHz
Memory = 1014 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/11 18:43:52.256
Processing End = 2007/08/11 18:43:52.350
Duration = 0000/00/00 00:00:00.094
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 417

Thank you for participating in KiXtart Golf!



 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


LonkeroAdministrator
(KiX Master Guru)
2007-08-11 09:55 PM
Re: KiXgolf: Top Secret - Public Round

is it over already?

Howard Bullock
(KiX Supporter)
2007-08-11 10:07 PM
Re: KiXgolf: Top Secret - Public Round

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.


LonkeroAdministrator
(KiX Master Guru)
2007-08-11 10:08 PM
Re: KiXgolf: Top Secret - Public Round

 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?!?!


Mart
(KiX Supporter)
2007-08-12 03:50 PM
Re: KiXgolf: Top Secret - Public Round

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.


Sealeopard
(KiX Master)
2007-08-12 04:20 PM
Re: KiXgolf: Top Secret - Public Round

As Jooel stated, it looks like the code has been golfed down completely. Thus, I'll be wrapping up tonight.

Jens


Sealeopard
(KiX Master)
2007-08-13 03:16 AM
Re: KiXgolf: Top Secret - Public Round

The public round is now closed. thanks to all participants. Final results will be posted shortly.

Sealeopard
(KiX Master)
2007-08-13 04:24 AM
Re: KiXgolf: Top Secret - Public Round

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 :).


DrillSergeant
(MM club member)
2007-08-13 11:21 AM
Re: KiXgolf: Top Secret - Public Round

Thanx for the golf, Jens. It was fun while it lasted, can't wait for the next one \:\)

LonkeroAdministrator
(KiX Master Guru)
2007-08-13 11:45 AM
Re: KiXgolf: Top Secret - Public Round

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!


Benny69
(MM club member)
2007-08-13 02:17 PM
Re: KiXgolf: Top Secret - Public Round

sorry, fit hit the shan this week and i spent more time working than i wanted.

DrillSergeant
(MM club member)
2007-08-13 03:05 PM
Re: KiXgolf: Top Secret - Public Round

Total characters golfed down in public round:




Poster Chars Code

Sarge 7 Jooel
Sarge 1 Jooel
Sarge 3 Jooel
Sarge 1 Jooel
Sarge 7 Jooel
Sarge 10 Jooel
Sarge 2 Jooel
TOTAL 31

Jochen 3 Jochen
Jochen 4 Jochen
Jochen 12 Jochen
Jochen 2 Sarge
Jochen 2 Jochen
TOTAL 23

Howard 2 Howard
Howard 1 Howard
Howard 2 Jooel
Howard 2 Jooel
Howard 1 Jooel
Howard 10 Jooel
Howard 2 Jooel
TOTAL 20


Jooel 1 Jooel
Jooel 6 Jooel
Jooel 7 Jooel
Jooel 5 Howard
TOTAL 19






LonkeroAdministrator
(KiX Master Guru)
2007-08-13 09:27 PM
Re: KiXgolf: Top Secret - Public Round

heh, talk about doing nothing but just enough to beat you guys \:D

Sealeopard
(KiX Master)
2007-08-14 04:34 AM
Re: KiXgolf: Top Secret - Public Round

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:
  • 1 Point for each participant that posts a KiXgolf script during the public coding round (must be either a new solution or an improvement to an existing solution)
  • x Points for 1st to 5th place in either the private or public round in reverse order, thus 1st Place = 5 points down to 5th Place = 1 Point
  • 1 Point for the 1st to 5th Place in the private coding round (if valid script was posted in public round)
Each participant will be scored according to their lowest posted KiXgolf score in either the public or private round.

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 \:\)