Page 6 of 11 « First<45678>Last »
Topic Options
#164881 - 2006-07-25 06:40 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
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
#164882 - 2006-07-25 06:43 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
If i just copy this new script into my MNC folder, and run it, i get this:

ERROR : array reference out of bounds!
Script: E:\mnc\edited_kixgolf_mnc.kix
Line : 57

Top
#164883 - 2006-07-25 06:46 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
oh, sorry.
forgot the minor thing.
the script needs to be same name as the "kixgolf_mnc.ini"

or alike...
anyways, backup up your current kixgolf_mnc.kix and replace it with this new edited one.
when the name is right, it will work.

Top
#164884 - 2006-07-25 06:59 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
oh, and if you do try it, you will most likely notice the "progress" numbering I added there.
I asked jens to do that a long time ago but as he hasn't, I tend to add it on my own in every scorer.
if the script runs longer than a second, one needs to know how the progress goes.
oh, and also added the error reporting lines.
don't show up on correct code but with failing code it prints out what went wrong.

Top
#164885 - 2006-07-25 07:00 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
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
#164886 - 2006-07-25 07:03 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
yeah - i was adding a sleep 1 and getting weird results.
Top
#164887 - 2006-07-25 07:05 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I got a 3.5 point penalty for a $b=0 to 1000000 - that seems a little harse i dont know.
Top
#164888 - 2006-07-25 07:06 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
which type of machine you got there?

Top
#164889 - 2006-07-25 07:06 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
OS = Windows XP Professional
CPU = Intel Pentium Model 9
Speed = 1398 MHz
Memory = 512 MB

Top
#164890 - 2006-07-25 07:08 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
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 Offline
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 Administrator Offline
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
#164893 - 2006-07-25 07:27 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Jooel - I am curious - how long were these CD Sorter scripts running in the previous golf challenge ?
Top
#164894 - 2006-07-25 07:45 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Lonkero Administrator Offline
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 Administrator Offline
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 Administrator Offline
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 Offline
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
#164898 - 2006-07-25 09:51 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Nice - you shaved a few off that mayan table. I've been staring at that for days.
Top
#164899 - 2006-07-25 10:15 PM Re: KiXgolf: Mayan Number Converter - Public Phase
Shawn Administrator Offline
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 Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
me too

damn it feels good to be back in the game

Top
Page 6 of 11 « First<45678>Last »


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.112 seconds in which 0.054 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