Sealeopard
(KiX Master)
2006-07-04 11:25 PM
Announcement: KiXgolf tournament July 15-30

Yes, it's true. KiXgolf is back. The next tournament will be held July 15-30. The task will deal with some pyramid-builders.

The last tournament can be found at KiXgolf: Fragmentation

For those of you who never heard of KiXgolf, here's the rundown:

================================================================
KiXtart GOLF - How To Play
================================================================


Most importantly, anybody can play, no age restrictions, no penalties, no handicap!

The object in "real" golf is to hit the ball in the hole in the fewest strokes. The object in KiXtart Golf is to get from input (tee) to target (hole) in the fewest keystrokes.

Example: How many positive elements are in array $a?

Array $a could be of structure $a=[1, 2 ,-3, 4, -5, -7, 8, 9]

One approach:
[CODE]
for $b=0 to ubound($a)
if $a[$b]>0
$c=$c+1
endif
next
[/CODE]
for a score of 45.

Another solution is:
[CODE]
DO
$b=$b+1
if $a[$b]>0
$c=$c+1
endif
UNTIL $b>(UBOUND($a)+1)
[/CODE]
for a score of 53.

Better approach: Code sample 1

================================================================
KiXtart GOLF - The Rules
================================================================


1) The goal of KiXtart Golf is to score the lowest strokes.
2) Strokes are all characters in a piece of code except whitespace characters, unless the whitespace character is necessary for the line of code to work. Therefore, carriage returns and line feeds do not count or spaces in between the '=' sign when assigning variables, e.g. '$a = $b' scores 5.
3) Code can be constructed any way you like, as long as it is syntactically correct with KiXtart.
4) The final solution MUST pass all test scripts that accompagny the KiXtart golf challenge.
5) The use of '$' as a variable is allowed.
6) In case of questions about a particular way to count the KiXtart Golf Challenge organizer has the last call.
7) During the private coding phase, no code is allowed to be posted. Violations result in disqualification of said player.
8) During the public coding phase, code should be posted, reused, and borrowed from other players.
9) The test script contains the official KiXgolf scoring engine


AllenAdministrator
(KiX Supporter)
2006-07-05 04:27 AM
Re: Announcement: KiXgolf tournament July 15-30

2 weeks? Is this one that complicated?

NTDOCAdministrator
(KiX Master)
2006-07-05 08:11 AM
Re: Announcement: KiXgolf tournament July 15-30

I hope not. Give us Golfing noobs a chance

JochenAdministrator
(KiX Supporter)
2006-07-05 12:11 PM
Re: Announcement: KiXgolf tournament July 15-30

Hmmm ... my best approach so far on the positive elements counting sample above scores 27.

Maybe I should attend this time? Does it even qualify as an acceptable handicap?


LonkeroAdministrator
(KiX Master Guru)
2006-07-05 09:02 PM
Re: Announcement: KiXgolf tournament July 15-30

jochen, I got 24.

LonkeroAdministrator
(KiX Master Guru)
2006-07-05 09:04 PM
Re: Announcement: KiXgolf tournament July 15-30

hmm... 23 if I loose the if.

Benny69
(MM club member)
2006-07-05 09:16 PM
Re: Announcement: KiXgolf tournament July 15-30

i got 24 too, trying to find the 23 lonk speeks of, but i don't think i am that good

JochenAdministrator
(KiX Supporter)
2006-07-05 11:45 PM
Re: Announcement: KiXgolf tournament July 15-30

hmmm ... not bad then for a 15 minute session against the score of a pro golfer ... think I join the fun this time.
Wee, my first golf round


Sealeopard
(KiX Master)
2006-07-06 02:51 AM
Re: Announcement: KiXgolf tournament July 15-30

Trust me, it's an easy one

NTDOCAdministrator
(KiX Master)
2006-07-06 03:06 AM
Re: Announcement: KiXgolf tournament July 15-30

You saying a bunch of us old timers are dumb

Sealeopard
(KiX Master)
2006-07-06 05:06 AM
Re: Announcement: KiXgolf tournament July 15-30

???

I'm just saying the next tournament is an easy one, kind-of like a warm-up round.


JochenAdministrator
(KiX Supporter)
2006-07-06 09:10 AM
Re: Announcement: KiXgolf tournament July 15-30

btw. Huh?
You got 24 with an if in there?
Insanity!
Do you loose the endif then ?


JochenAdministrator
(KiX Supporter)
2006-07-06 10:26 AM
Re: Announcement: KiXgolf tournament July 15-30

Yup, got 23 too.

Didn't know that you can leave this keyword-thing out without getting an error until I tested it


Benny69
(MM club member)
2006-07-06 03:48 PM
Re: Announcement: KiXgolf tournament July 15-30

ok, got 23, but after that i need an aspirin, man my head hurts,... but, by now lonk prolly has it down to 1

Benny69
(MM club member)
2006-07-06 03:52 PM
Re: Announcement: KiXgolf tournament July 15-30

this is what i came up with:
Code:
For Each $ in $a
$c=$c+($>0)


did you guys come up with something dif?


AllenAdministrator
(KiX Supporter)
2006-07-06 04:14 PM
Re: Announcement: KiXgolf tournament July 15-30

Scores, Code? Where is this Golf warm up coming from?

JochenAdministrator
(KiX Supporter)
2006-07-06 04:22 PM
Re: Announcement: KiXgolf tournament July 15-30

exactly the same as mine ... well except for the varnames :

Code:

break on

$a = 1, 2 ,-3, 4, -5, -7, 8, 9

;! Tee
for each $ in $a
$_ = $_ + ($>0)
;! Hole



I am pretty sure there is no further improvement possible.

@Allen: just having some fun with the sample course from Jens' announcement


AllenAdministrator
(KiX Supporter)
2006-07-06 04:32 PM
Re: Announcement: KiXgolf tournament July 15-30

I hope you guys play the real one. Its a lot fun... except for being humbled by the Lonkanator, and Eric (maciep)... hmmm wonder if Eric knows we are getting ready to play?

maciep
(Korg Regular)
2006-07-06 05:04 PM
Re: Announcement: KiXgolf tournament July 15-30

Sweet! I'm too busy at work these days to post much out here, but I still hang around.

See you guys on the course...


Benny69
(MM club member)
2006-07-06 05:50 PM
Re: Announcement: KiXgolf tournament July 15-30

is there a handicap for age?
it took me longer to come up with that than Jochen and Lonk.
you know everything slows down as you get older
ya, i will join in the fun.


JochenAdministrator
(KiX Supporter)
2006-07-06 09:11 PM
Re: Announcement: KiXgolf tournament July 15-30

I guess the 69 in your name is the year of your birth?
If so, it is not quite a handicap compared to mine


LonkeroAdministrator
(KiX Master Guru)
2006-07-06 09:18 PM
Re: Announcement: KiXgolf tournament July 15-30

k, as you boys decided to struckle, 22.

NTDOCAdministrator
(KiX Master)
2006-07-06 09:35 PM
Re: Announcement: KiXgolf tournament July 15-30

Yeah like you need a handi-cap there Jochen

http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Board=UBB13&Number=91834


Benny69
(MM club member)
2006-07-06 10:29 PM
Re: Announcement: KiXgolf tournament July 15-30

hehee, i wish 69 was my birth year i would have three more years to live.

AllenAdministrator
(KiX Supporter)
2006-07-10 09:05 PM
Re: Announcement: KiXgolf tournament July 15-30

Dang is it Saturday yet? I wished it would have started this past weekend... not much on my plate... would have been nice to get a jump on it.

Jooel.... so let's see your 22.


Mart
(KiX Supporter)
2006-07-10 09:10 PM
Re: Announcement: KiXgolf tournament July 15-30

Quote:


...
Jooel.... so let's see your 22.




You want to go blind
Never ever look at Lonkenized code at your own free will is what my parents always told me


AllenAdministrator
(KiX Supporter)
2006-07-10 09:17 PM
Re: Announcement: KiXgolf tournament July 15-30

You are right, his code is like Medusa... it's so wicked you need a mirror to look at it safely.

JochenAdministrator
(KiX Supporter)
2006-07-11 11:16 AM
Re: Announcement: KiXgolf tournament July 15-30

d'accord,

got that 22 score too.
everything is more than nothing

[edit: at first glance I thought 22 was your age Jooel ]


Benny69
(MM club member)
2006-07-12 02:26 AM
Re: Announcement: KiXgolf tournament July 15-30

Man, Lonk (22), you never stop blowing my mind, I can not believe that your brain can see that stuff. Thanks to Jochen’s hint I got 22 also, without it I don’t think I would have ever seen it. I fear that I don’t have much of a chance to win, but if I am lucky I won’t be in last place.

Gargoyle
(MM club member)
2006-07-12 02:52 AM
Re: Announcement: KiXgolf tournament July 15-30

So do we get to see this "22" code or not... What am I up against. And Benny don't worry, last place is all mine (assuming I can even figure out what the goal really is).

AllenAdministrator
(KiX Supporter)
2006-07-12 03:36 AM
Re: Announcement: KiXgolf tournament July 15-30

Even with the hint...I just don't see it.

You guys are too good already. You don't have to play if you got something else to do


LonkeroAdministrator
(KiX Master Guru)
2006-07-12 09:15 AM
Re: Announcement: KiXgolf tournament July 15-30

hmm...
ja, the hint does not work for me either.
wonder if they really have a working code or not


LonkeroAdministrator
(KiX Master Guru)
2006-07-12 09:28 AM
Re: Announcement: KiXgolf tournament July 15-30

the hint let you think you can somehow compare the current output number (the sum value of the positive value count) against the element and still be able to shorten the code.
but I can't see how that would be possible.


JochenAdministrator
(KiX Supporter)
2006-07-12 09:55 AM
Re: Announcement: KiXgolf tournament July 15-30

Quote:

So do we get to see this "22" code or not




well yeah, at least here's what I came up with:

Code:

;! Tee

for each $ in $a
$_ = $_ + ($>)

;! Hole



Note that missing 0


LonkeroAdministrator
(KiX Master Guru)
2006-07-12 11:01 AM
Re: Announcement: KiXgolf tournament July 15-30

k... I tried something similar but never found a compination where it worked!
k, I have 21 now. thanks.


JochenAdministrator
(KiX Supporter)
2006-07-12 11:37 AM
Re: Announcement: KiXgolf tournament July 15-30

Gaaaaaaaaaahhhhh !!!!



I have to get back to the drawing board, thanx


Benny69
(MM club member)
2006-07-12 01:47 PM
Re: Announcement: KiXgolf tournament July 15-30

Lonk, you are a Dirty Dawg! Jochen, I'll hold him down and you punish him, aaaaaarrrrrrrrgggggggg!

LonkeroAdministrator
(KiX Master Guru)
2006-07-12 07:07 PM
Re: Announcement: KiXgolf tournament July 15-30

tbh, dunno why you give up all the methods you can find.
the real competition is just starting.
I know I will not show my tricks before the public phase starts.


ShawnAdministrator
(KiX Supporter)
2006-07-12 07:21 PM
Re: Announcement: KiXgolf tournament July 15-30

I know what you did you dirty FOR EACH'n basta.

LonkeroAdministrator
(KiX Master Guru)
2006-07-12 07:50 PM
Re: Announcement: KiXgolf tournament July 15-30

ja, I have a good memory in that sense. all important stuff, like kixgolf seems to remain really well in my head while other stuff just disappears.

just wonder, why...
I think that trick didn't work for several versions of kix and now it suddenly worked again.


ShawnAdministrator
(KiX Supporter)
2006-07-12 07:52 PM
Re: Announcement: KiXgolf tournament July 15-30

ja, I was totally shocked that it worked. Good one though.

JochenAdministrator
(KiX Supporter)
2006-07-12 08:29 PM
Re: Announcement: KiXgolf tournament July 15-30

eh?

for each'n without next'n?
We did that already here ... or is there another hidden, obviously illegal, albeit working method?

All I cut from the code last posted lead to kix errors


LonkeroAdministrator
(KiX Master Guru)
2006-07-12 09:18 PM
Re: Announcement: KiXgolf tournament July 15-30

hmm...
not really...
you should be able to convert:
$_ = $_ + ($>)

to:
$_ =+ ($>)

or:
$_ =+ $>0

without any errors.
sadly that doesn't work as one would hope though...
anyways, there is a stroke in the 22 code that is really obvious.
guess that's the reason why you don't see it.


JochenAdministrator
(KiX Supporter)
2006-07-12 10:35 PM
Re: Announcement: KiXgolf tournament July 15-30

oh yeah, maybe that's the cause
I'll just sit a bit longer over it and if that doesn't help I'll just cut stroke by stroke ... tomorrow



AllenAdministrator
(KiX Supporter)
2006-07-13 01:06 AM
Re: Announcement: KiXgolf tournament July 15-30

ahhh... you are a sly basta Jooel... I found it.

AllenAdministrator
(KiX Supporter)
2006-07-13 07:14 AM
Re: Announcement: KiXgolf tournament July 15-30

For fun, here is another approach... no looping.

Code:
 $=1+ubound($a)-ubound(split(join($a),"-")) 



JochenAdministrator
(KiX Supporter)
2006-07-13 09:54 AM
Re: Announcement: KiXgolf tournament July 15-30

21

It is soooo weird that this works, but it does


JochenAdministrator
(KiX Supporter)
2006-07-13 10:04 AM
Re: Announcement: KiXgolf tournament July 15-30

Yeah Allen,

I got this too in the make, sadly it is soo keyboard-intensive


ShawnAdministrator
(KiX Supporter)
2006-07-13 02:02 PM
Re: Announcement: KiXgolf tournament July 15-30

21 !!! ... nice one cappy !

oops - just realized we all have 21 now. still nice one ;0)


JochenAdministrator
(KiX Supporter)
2006-07-13 02:17 PM
Re: Announcement: KiXgolf tournament July 15-30

thanks anyway

LonkeroAdministrator
(KiX Master Guru)
2006-07-13 05:54 PM
Re: Announcement: KiXgolf tournament July 15-30

I got 19.

(just kidding)


Sealeopard
(KiX Master)
2006-07-14 05:20 AM
Re: Announcement: KiXgolf tournament July 15-30

You guys warmed up by now?

ShawnAdministrator
(KiX Supporter)
2006-07-14 05:41 AM
Re: Announcement: KiXgolf tournament July 15-30

Yip

JochenAdministrator
(KiX Supporter)
2006-07-14 08:26 AM
Re: Announcement: KiXgolf tournament July 15-30

Definetly warmed up, yeah!

Let's get it on


Benny69
(MM club member)
2006-07-14 01:37 PM
Re: Announcement: KiXgolf tournament July 15-30

yup

LonkeroAdministrator
(KiX Master Guru)
2006-07-15 01:26 AM
Re: Announcement: KiXgolf tournament July 15-30

k, it's fifteenth in here.
when it's gonna start???


Gargoyle
(MM club member)
2006-07-15 01:48 AM
Re: Announcement: KiXgolf tournament July 15-30

But the official board time was only 14/07/2006 18:26 going to have wait a few more hours there Jooel

LonkeroAdministrator
(KiX Master Guru)
2006-07-15 02:23 AM
Re: Announcement: KiXgolf tournament July 15-30

sorry, but the official board time is 2:23 AM now.

AllenAdministrator
(KiX Supporter)
2006-07-15 02:57 AM
Re: Announcement: KiXgolf tournament July 15-30

Don't these things normally start at 6:00pm? By my estimates we still have another 21hrs to wait.

LonkeroAdministrator
(KiX Master Guru)
2006-07-15 03:24 AM
Re: Announcement: KiXgolf tournament July 15-30

k, will get some sleep then...