#164881 - 2006-07-25 06:40 PM
Re: KiXgolf: Mayan Number Converter - Public Phase
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
k, to show what I mean, I did a edited version of the kixgolf_mnc.kix for you guys to try: http://www.kixtart.org/alternative/edited_kixgolf_mnc.zip
it should add no penalty to your score. but if you add sleep 1 or something alike into your script, it should start penalizing. currently the "weight" is set to 20 but it can be adjusted as much as one wants... well, we/jens would want.
|
Top
|
|
|
|
#164885 - 2006-07-25 07:00 PM
Re: KiXgolf: Mayan Number Converter - Public Phase
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
k, just realised. sleep 1 doesn't burn cpu time so, added this after the dim line in 174 code: Code:
for $b=0 to 100000 next
and got: Code:
Mayan Number Converter passed all 60 tests (100% correct)
KiXtart KiXtart Version = 4.52 KiXGolf Script = kixgolf_mnc.kix
Computer OS = Windows XP Professional CPU = Intel Pentium Model 13 Speed = 800 MHz Memory = 760 MB
KiXGolf Scoring Engine Scoring Engine = 3.0.3
KiXtart Golf Score Tournament = KiXtart Golf: Mayan Number Converter Processing Start = 2006/07/25 19:59:54.241 Processing End = 2006/07/25 19:59:56.054 Duration = 0000/00/00 00:00:01.813 TimePenalty = 5,2 KiXGolf Score = 198 (193+5,2)
|
Top
|
|
|
|
#164890 - 2006-07-25 07:08 PM
Re: KiXgolf: Mayan Number Converter - Public Phase
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
hmm... speedstep seems to kick the processortime calculus out the door
but on the other hand... adding lot larger value to the weight evens the odds of that affecting the results. changed also the timepenalty udf a little. now the calculation happens after the code is done, so changing cpu speed should not have that much of an effect. Code:
function TimePenalty(optional $in, $weight) dim $,$h if vartype($in) for $h=0 to 100000 next $=ProcessorTime() for each $h in split("1 2 3") $h = "a" + (1 - (0.147 * $h)/27) next $TimePenalty=(ProcessorTime(,,$in)/ProcessorTime(,,$))/(0+$weight) else $TimePenalty = ProcessorTime() endif endfunction
[edit] added some processor pump up code.
|
Top
|
|
|
|
#164891 - 2006-07-25 07:17 PM
Re: KiXgolf: Mayan Number Converter - Public Phase
|
DrillSergeant
MM club member
Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
|
so if one second gives you 5.2 penalty points, your original 182 would have given you 216000 * 5.2 = 1123200 penalty points...
182 + 1123200 = 1123382
That shouldn't be too hard to beat
|
Top
|
|
|
|
#164892 - 2006-07-25 07:22 PM
Re: KiXgolf: Mayan Number Converter - Public Phase
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
just realised. the algorithm I'm using is all wrong. or at least it seems to be...
drill, indeed. that's my point for suggesting something like this.
|
Top
|
|
|
|
#164894 - 2006-07-25 07:45 PM
Re: KiXgolf: Mayan Number Converter - Public Phase
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
don't remember, but I do remember that we had a golf round back when in which my code took about 2 days to complete.
anyways, updated the timepenalty udf (and the download zip): Code:
function TimePenalty(optional $in, $weight) dim $,$h,$x if not vartype($in) $=ProcessorTime() do $x=$x+1 until 10000000<ProcessorTime(,,$) $=ProcessorTime() for each $h in split("1 2 3") for $x=0 to 70203 next $h = "a" + (1 - (0.147 * $h)/27) next $TimePenalty = ProcessorTime(),ProcessorTime(,,$) else $TimePenalty=(ProcessorTime(,,$in[0])/$in[1])/(0+$weight) endif endfunction
still not always the same score.
|
Top
|
|
|
|
#164895 - 2006-07-25 09:27 PM
Re: KiXgolf: Mayan Number Converter - Public Phase
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
hey, rogier. was playing with your code... got 202 from it: Code:
Function m($) Dim $a Do If $+0=$ $m = iif($ mod 20, Split(' . : .: ::')[$ mod 5],'-') + Left('|||',$ mod 20/5)+$a+$m $a = ' ' $ = $ / 20 Else $a = InStr('-.:__|', Left($,1)) $m = iif($a, $m+$a-1, $m*20) $ = Right($,~) Endif Until $ = 0 EndFunction
|
Top
|
|
|
|
#164896 - 2006-07-25 09:44 PM
Re: KiXgolf: Mayan Number Converter - Public Phase
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
OH MY!!!
172
Code:
Function m($!) dim $,$b,$c
for $b = 1 to 16 $c = split("- . : .: :: " + $) $ = $ + "| " + $c[$b] next
for each $ in split($!) $m = $m * 20 + ascan($c,$) if $m<0 $m = $c[$ mod 20] $ = $!/20 if $ $m = m($) + ' ' + $m EndFunction
|
Top
|
|
|
|
#164897 - 2006-07-25 09:48 PM
Re: KiXgolf: Mayan Number Converter - Public Phase
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
lol - NICE !
I was just going to post this variation on Rogier's theme - a 207 - got to see this other one though cripes ...
Code:
Function m($)
dim $a,$t[19]
if $=$+0 $m = iif($ mod 20,split(' . : .: ::')[$ mod 5],'-') + left('|||',$ mod 20/5) $=$/20 if $ $m = m($) + ' ' + $m endif else for $a = 0 to 19 $t[$a] = m($a) next for each $a in split($) $m = $m * 20 + ascan($t,$a) ; next ;endif
EndFunction
|
Top
|
|
|
|
#164899 - 2006-07-25 10:15 PM
Re: KiXgolf: Mayan Number Converter - Public Phase
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
Here's a Rogier 190
Code:
;! Function m($)
dim $a
if $=$+0 $m = iif($ mod 20,split(' . : .: ::')[$ mod 5],'-') + left('|||',$ mod 20/5) $=$/20 if $ $m = m($) + ' ' + $m endif else for each $ in split($) $a = 0 while m($a)<>$ $a = $a + 1 loop $m = $m * 20 + $a ;next ;endif
EndFunction ;!
|
Top
|
|
|
|
#164900 - 2006-07-25 10:16 PM
Re: KiXgolf: Mayan Number Converter - Public Phase
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
me too
damn it feels good to be back in the game
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 530 anonymous users online.
|
|
|