Page 9 of 11 « First<7891011>
Topic Options
#164941 - 2006-07-27 05:50 AM Re: KiXgolf: Mayan Number Converter - Public Phase
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
I think the one hour time restriction would be feasible. I do not recall any KiXgolf tournament where the code ran for more than just a couple of minutes, Howard's CD Sorter and Jooels Mayan Numbers excluded. So, going forward, max runtime would be one hour.
_________________________
There are two types of vessels, submarines and targets.

Top
#164942 - 2006-07-27 06:08 AM Re: KiXgolf: Mayan Number Converter - Public Phase
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
List of public round code submissions:
Code:

Benny69 ------- 149
Shawn --------- 167
Shawn --------- 170
Jooel --------- 172
Shawn --------- 173
Shawn --------- 173
Shawn --------- 174
Jooel --------- 175
Jooel --------- 176
Shawn --------- 177
Shawn --------- 178 (Shawn-182 was reduced by 4 strokes)
Jooel --------- 182
Shawn --------- 182 (Shawn-185 was reduced by 3 strokes)
Shawn --------- 185 (confirmed)
Jooel --------- 185
Jooel --------- 186
Shawn --------- 188
DrillSargeant - 190
Jooel --------- 191
DrillSargeant - 203
Shawn --------- 207
DrillSargeant - 208
DrillSargeant - 210
Shawn --------- 213 (confirmed)
DrillSargeant 215 (Benny69-216 reduced by 1 stroke)
Benny69 ------- 216 (DrillSergeant-217 was reduced by 1 stroke)
DrillSergeant - 217
Jooel --------- 219
Maciep -------- 225 (confirmed)
Allen --------- 225 (Allen-256 was reduced by 21 strokes)
Richard H ----- 252 (confirmed)
Allen --------- 256 (confirmed)
Howard bullock 285 (confirmed)
Glenn Barnas -- 337 (confirmed)
It_took_my_meds 343 (does not pass validation due to not DIMming variables inside the UDF)
Jochen -------- 352 (confirmed)
Benny69-------- 448 (confirmed)
Krabourn ------ 651 (confirmed)

_________________________
There are two types of vessels, submarines and targets.

Top
#164943 - 2006-07-27 07:56 AM Re: KiXgolf: Mayan Number Converter - Public Phase
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Thanks Jens, I really have no intention to use the 149 code and would like to officially remove it from the competition, it was meant more as a joke, and as in the recent discussion it removes from the spirit of the game.
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#164944 - 2006-07-27 08:12 AM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
jens, I do remember that in some round I had to reduce the tests by removing the hardest ones in order to be able to run the validator inside couple hours.

anyway, the one hour limit is ok for me.
but think there will be cases in the future that a code runs in 55 minutes on one computer and 1:05 on another and we will have this discussion again.

Top
#164945 - 2006-07-27 09:27 AM Re: KiXgolf: Mayan Number Converter - Public Phase
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

but think there will be cases in the future that a code runs in 55 minutes on one computer and 1:05 on another and we will have this discussion again.




You could do what you suggested in an earlier post - rather than using real time as a metric, use user cpu cycles. This should be pretty close on main processor lines for the types of challenges that we are undertaking.

You can't include system CPU cycles as these are too easily influenced by whatever else the PC is up to.

Now all you need to do is calculate a reasonable user CPU load for 15 minutes

Top
#164946 - 2006-07-27 09:41 AM Re: KiXgolf: Mayan Number Converter - Public Phase
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
SPIRIT guys, SPIRIT

5 or 15 minutes isn't going to hurt anyone.
Main idea is that no one has time or inclination to validate anything that runs for hours and hours or even days.

Top
#164947 - 2006-07-27 12:39 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
richie, thanks for the pointer.
will test as soon as I get some free time.

Top
#164948 - 2006-07-27 09:40 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
After revisiting my original code I was able to golf it down to 380.

Code:

Function m($i)
Dim $a,$b,$c,$d,$,$p

If $i=$i+0
$p=20
$a="|",":","."
$d=5,2,1
Do
$b=$i-$i/$p*$p
$=$b/($p/20)
If $=0
$m="-"+$m
Else
For $c = 0 to 2
While $/$d[$c]
$m=$a[$c]+$m
$=$-$d[$c]
Loop
Next
EndIf
$p=$p*20
$i=$i-$b
If $i>0
$m=" "+$m
EndIf
Until $i=0
Else
$p=1
$i=Split($i)
For $c = UBound($i) to 0 Step-1
$=0
For $b = 1 to Len($i[$c])
$a=SubStr($i[$c],$b,1)
$=$+($a=".")
$=$+($a=":")*2
$=$+($a="|")*5
Next
$m=$m+$*$p
$p=$p*20
;Next
EndFunction

_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#164949 - 2006-07-27 09:50 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
4 more for 376:

Code:

Function m($i)
Dim $a,$b,$c,$d,$,$p

If $i=$i+0
$p=20
$a="|",":","."
$d=5,2,1
Do
$b=$i mod $p
$=$b/($p/20)
If $=0
$m="-"+$m
Else
For $c = 0 to 2
While $/$d[$c]
$m=$a[$c]+$m
$=$-$d[$c]
Loop
Next
EndIf
$p=$p*20
$i=$i-$b
If $i>0
$m=" "+$m
EndIf
Until $i=0
Else
$p=1
$i=Split($i)
For $c = UBound($i) to 0 Step-1
$=0
For $b = 1 to Len($i[$c])
$a=SubStr($i[$c],$b,1)
$=$+($a=".")
$=$+($a=":")*2
$=$+($a="|")*5
Next
$m=$m+$*$p
$p=$p*20
;Next
EndFunction

_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#164950 - 2006-07-27 10:46 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Benny-353

Code:

Function m($i)

Dim $a,$b,$c,$d,$,$p

If $i=$i+0
$a="|",":","."
$d=5,2,1
Do
$b = $i mod 20
If $b=0
$m="-"+$m
Else
For $c = 0 to 2
While $b/$d[$c]
$m=$a[$c]+$m
$b=$b-$d[$c]
Loop
Next
EndIf
$i = $i/20
If $i
$m = " " + $m
EndIf
Until $i=0
Else
$p=1
$i=Split($i)
For $c = UBound($i) to 0 Step-1
$=0
For $b = 1 to Len($i[$c])
$a=SubStr($i[$c],$b,1)
$=$+($a=".")
$=$+($a=":")*2
$=$+($a="|")*5
Next
$m=$m+$*$p
$p=$p*20
;Next
EndFunction


Top
#164951 - 2006-07-27 11:16 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
sorry shawn but your code results in 353
Top
#164952 - 2006-07-27 11:27 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
but, just for the fun of it...
338
Code:

Function m($i)

Dim $a,$b,$c,$d,$

If $i=$i+0
$a="|",":","."
$d=5,2,1
Do
$ = $i mod 20
If $=0
$m="-"+$m
EndIf
For $c = 0 to 2
While $/$d[$c]
$m=$a[$c]+$m
$=$-$d[$c]
Loop
Next
$i = $i/20
If $i
$m = " " + $m
EndIf
Until $i=0
Else
$d=1
$i=Split($i)
For $c = -UBound($i) to 0
$=0
For $b = 1 to Len($i[-$c])
$a=SubStr($i[-$c],$b,1)
$=$+($a=".")
$=$+($a=":")*2
$=$+($a="|")*5
Next
$m=$m+$d*$
$d=$d*20
EndFunction


Top
#164953 - 2006-07-27 11:31 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Benny-313

Code:

Function m($i)

Dim $a,$b,$c,$d,$

If $i=$i+0
$a="|",":","."
$d=5,2,1
Do
$b = $i mod 20
If $b=0
$m="-"+$m
Else
For $c = 0 to 2
While $b/$d[$c]
$m=$a[$c]+$m
$b=$b-$d[$c]
Loop
Next
EndIf
$i = $i/20
If $i
$m = " " + $m
EndIf
Until $i=0
Else
For Each $c in Split($i)
$=0
For $b = 1 to Len($c)
$a=SubStr($c,$b,1)
$=$+($a=".")
$=$+($a=":")*2
$=$+($a="|")*5
Next
$m=$m*20+$
;Next
EndFunction


Top
#164954 - 2006-07-27 11:35 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
309
Code:

Function m($i)

Dim $a,$b,$c,$d,$

If $i=$i+0
$a="|",":","."
$d=5,2,1
Do
$b = $i mod 20
If $b=0
$m="-"+$m
Endif
For $c = 0 to 2
While $b/$d[$c]
$m=$a[$c]+$m
$b=$b-$d[$c]
Loop
Next

$i = $i/20
If $i
$m = " " + $m
EndIf
Until $i=0
Else
For Each $c in Split($i)
$=0
For $b = 1 to Len($c)
$a=SubStr($c,$b,1)
$=$+($a=".")
$=$+($a=":")*2
$=$+($a="|")*5
Next
$m=$m*20+$
;Next
EndFunction


Top
#164955 - 2006-07-27 11:37 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Benny-304

Code:

Function m($i)

Dim $a,$b,$c,$d,$

If $i=$i+0
$a="|",":","."
$d=5,2,1
Do
$ = $i mod 20
If $=0
$m="-"+$m
Endif
For $c = 0 to 2
While $/$d[$c]
$m=$a[$c]+$m
$=$-$d[$c]
Loop
Next

$i = $i/20
If $i
$m = " " + $m
EndIf
Until $i=0
Else
For Each $c in Split($i)
$=0
For $b = 1 to Len($c)
$a=SubStr($c,$b,1)
$=$+($a=".")
$=$+($a=":")*2
$=$+($a="|")*5
Next
$m=$m*20+$
;Next
EndFunction


Top
#164956 - 2006-07-27 11:39 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Benny69 Offline
Moderator
*****

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

Top
#164957 - 2006-07-27 11:42 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
299Code:

Function m($i)

Dim $b,$c,$d,$

If $i=$i+0
$d=5,2,1
Do
$ = $i mod 20
If $=0
$m="-"+$m
Endif
For $c = 0 to 2
While $/$d[$c]
$m=split("| : .")[$c]+$m
$=$-$d[$c]
Loop
Next

$i = $i/20
If $i
$m = " " + $m
EndIf
Until $i=0
Else
For Each $c in Split($i)
$=0
while $c
$b=left($c,1)
$c=right($c,~)
$=$+($b=".")
$=$+($b=":")*2
$=$+($b="|")*5
loop
$m=$m*20+$
;Next
EndFunction


Top
#164958 - 2006-07-27 11:42 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
jooel, you sneeky guy, was just getting ready to post and you snuck right in there


Edited by benny69 (2006-07-27 11:43 PM)
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#164959 - 2006-07-27 11:44 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
293
Code:

Function m($i)

Dim $b,$c,$d,$

If $i=$i+0
$d=5,2,1
Do
$ = $i mod 20
If $=0
$m="-"+$m
Endif
For $c = 0 to 2
While $/$d[$c]
$m=split("| : .")[$c]+$m
$=$-$d[$c]
Loop
Next

$i = $i/20
If $i
$m = " " + $m
EndIf
Until $i=0
Else
For Each $c in Split($i)
$=0
while $c
$b=left($c,1)
$c=right($c,~)
$=$+($b=".")+($b=":")*2+($b="|")*5
loop
$m=$m*20+$
;Next
EndFunction


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

Registered: 1999-08-13
Posts: 8611
woah woah - lets stop for a sec ... looking at jooels last change ...

ok - its still benny code - this script should keep its general strategy here i think eh ?

Top
Page 9 of 11 « First<7891011>


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

Who's Online
0 registered and 539 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.079 seconds in which 0.029 seconds were spent on a total of 12 queries. Zlib compression enabled.

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