Page 1 of 4 1234>
Topic Options
#191094 - 2008-12-13 06:01 AM KiXgolf - Easier Done Than Said - Public Round
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Please post your codes and start improving.

The private round can be found at http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=191050 and http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=191043 (thanks, Sarge \:\) )


Edited by Sealeopard (2008-12-13 06:03 AM)
_________________________
There are two types of vessels, submarines and targets.

Top
#191095 - 2008-12-13 06:04 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Sealeopard]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Here is my extremely bloated code:
 Code:
Function EDTS($)

Dim $v,$c,$t,$Y,$z,$b,$e
$V = split("a e i o u")
$C = split("b c d f g h j k l m n p q r s t v w x y Z")
$b = "<"+$+"> is "
$e ="acceptable."

For each $z in $V
	If instr ($,$z) 
		$T = 1
	EndIf
Next

For $y = 1 to Len($)

 
	If ascan($v,Substr($,$y,1)) => 0 AND ascan($v,Substr($,$y+1,1)) => 0 AND ascan($v,Substr($,$y+2,1)) => 0
		$T = $t + 1
	EndIf
 
	If ascan($c,Substr($,$y,1)) => 0 AND ascan($c,Substr($,$y+1,1)) => 0 AND ascan($c,Substr($,$y+2,1)) => 0 
		$T = $t + 1
	EndIf
	If substr($,$y,1) = substr($,$y+1,1)
	   If substr($,$y,1) <> "e" AND substr($,$y,1) <> "O"
		$T = $T + 1
	   EndIf
	EndIf
Next

If $T = 1
 $EDTS= $b + $e
Else
 $EDTS= $b +  "not " + $e
EndIf

EndFunction
_________________________
Today is the tomorrow you worried about yesterday.

Top
#191097 - 2008-12-13 06:15 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Gargoyle]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
I'm just trying to get below 300 before I post. I'm 302 now.
Top
#191098 - 2008-12-13 06:37 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Allen]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
And for Post#2000... I present thee... 296

function edts($z)
dim $,$v,$f,$b,$i,$o
$edts="<" + $z + "> is "
$v=split("a e i o u")
while $z
$=left($z,1)
$o=b
for $i=0 to 4
if $=$v[$i]
$o=a
endif
if $=e | $=o
else
$f=instr($z,$+$)|$f
endif
next
$b=$b+$o
$z=right($z,~)
loop
$edts=$edts+iif(instr($b,a)>0 & not ($f | instr($b,aaa) | instr($b,bbb)),"","not ") + "acceptable."
endfunction

Top
#191099 - 2008-12-13 07:02 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Allen]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
287

function edts($z)
dim $,$v,$f,$b,$o
$edts="<" + $z + "> is "
while $z
$=left($z,1)
$o=b
for each $v in split("a e i o u")
if $=$v
$o=a
endif
if $=e | $=o
else
$f=instr($z,$+$)|$f
endif
next
$b=$b+$o
$z=right($z,~)
loop
$edts=$edts+iif(instr($b,a)>0 & not ($f | instr($b,aaa) | instr($b,bbb)),"","not ") + "acceptable."
endfunction

Top
#191100 - 2008-12-13 07:08 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Allen]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
265

function edts($z)
dim $,$v,$f,$b,$o
$edts="<" + $z + "> is "
while $z
$=left($z,1)
$o=b
if $=a | $=i |$=u
$o=a
endif
if $=e | $=o
$o=a
else
$f=instr($z,$+$)|$f
endif
$b=$b+$o
$z=right($z,~)
loop
$edts=$edts+iif(instr($b,a)>0 & not ($f | instr($b,aaa) | instr($b,bbb)),"","not ") + "acceptable."
endfunction

Top
#191101 - 2008-12-13 07:10 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Allen]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
262

function edts($z)
dim $,$f,$b,$o
$edts="<" + $z + "> is "
while $z
$=left($z,1)
$o=b
if $=a | $=i |$=u
$o=a
endif
if $=e | $=o
$o=a
else
$f=instr($z,$+$)|$f
endif
$b=$b+$o
$z=right($z,~)
loop
$edts=$edts+iif(instr($b,a)>0 & not ($f | instr($b,aaa) | instr($b,bbb)),"","not ") + "acceptable."
endfunction

Top
#191102 - 2008-12-13 07:33 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Allen]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
255
function edts($z)
dim $,$f,$b,$o
$edts="<" + $z + "> is "
while $z
$=left($z,1)
$o=$=a | $=i |$=u
if $=e | $=o
$o=1
else
$f=instr($z,$+$)|$f
endif
$b=""+$b+$o
$z=right($z,~)
loop
$edts=$edts+iif(instr($b,1)>0 & not ($f | instr($b,111) | instr($b,"000")),"","not ") + "acceptable."
endfunction

Top
#191104 - 2008-12-13 07:39 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Allen]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
252

function edts($z)
dim $,$f,$b,$o,$y
$y=$z
while $z
$=left($z,1)
$o=$=a | $=i |$=u
if $=e | $=o
$o=1
else
$f=instr($z,$+$)|$f
endif
$b=""+$b+$o
$z=right($z,~)
loop
$edts="<" + $y + "> is "+iif(instr($b,1)>0 & not ($f | instr($b,111) | instr($b,"000")),"","not ") + "acceptable."
endfunction

Top
#191105 - 2008-12-13 07:50 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Allen]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
248

function edts($z)
dim $,$f,$b,$o,$y
$y=$z
while $z
$=left($z,1)
$o=$=a | $=i |$=u
if $=e | $=o
$o=1
else
$f=instr($z,$+$)|$f
endif
$b=""+$b+$o
$z=right($z,~)
$edts="<" + $y + "> is "+iif(instr($b,1)>0 & not ($f | instr($b,111) | instr($b,"000")),"","not ") + "acceptable."
; loop
endfunction

Top
#191106 - 2008-12-13 08:06 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Allen]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
Here's my 207, I'm sure it can get below 200 I just can't see it myself.

 Code:
; begin KiXgolfUDF
;
;!
Function EDTS($p)
Dim $, $v, $i, $n, $o, $c

For $i = 1 to $p^0

	$ = substr($p,$i,1)

	if instr(aeiou,$)
		$v = $i
	else
		$c = $i
	endif

	if abs($c - $v) = 3 | ($o = $ & o<>$ & e<>$) | $c - $v = ($p^)
		$n = 'not '
	endif

	$EDTS = '<' + $p + '> is ' + $n + acceptable.
	
	$o = $

EndFunction
;!
;!
; end KiXgolfUDF
_________________________
The Code is out there

Top
#191107 - 2008-12-13 08:06 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Allen]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Obviously I still need to learn more about thinking out of the box \:\) That hurts my brain already. Hate to see what Sarge came up with.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#191108 - 2008-12-13 08:42 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Gargoyle]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
Gargs, I'm going to do something for you that I wish was always done after these things. Here is my code commented. Maybe it will help.


function edts($z)
dim $,$f,$b,$o,$y
$y=$z
while $z ;while there are letters left in $z
$=left($z,1) ;set $=first character
$o=$=a | $=i |$=u ;if $=a,i,o set $o=1 else set $o=0
if $=e | $=o ;if $=e or o
$o=1 ;set $o=1
else ;otherwise
$f=instr($z,$+$)|$f ;if two of the same letter is in $z set $f=1
;or if not, set $f=0, unless $f is already 1
endif
$b=""+$b+$o ;make a new string based on the original, using $o which is either a 1(vowel) or 0(consonant)
$z=right($z,~) ;remove the first character of $z and reset $z to the new value
$edts="<" + $y + "> is "+iif(instr($b,1)>0 & not ($f | instr($b,111) | instr($b,"000")),"","not ") + "acceptable."
;line above checks for other rules:
; if there is a 1 in $b, there is a vowel
; if $f=1 then there was a double character
; if if there is not 111(3 vowels) or 000(3 consonants) in $b, that is true

; loop
endfunction

Top
#191110 - 2008-12-13 09:03 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Allen]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
245

function edts($z)
dim $,$f,$b,$o,$y
$y=$z
while $z
$=left($z,1)
$o=$=a | $=i |$=u
if $=e | $=o
$o=1
else
$f=instr($z,$+$)|$f
endif
$b=""+$b+$o
$z=right($z,~)
$edts="<" + $y + "> is "+iif(($f | instr($b,111) | instr($b,"000") | instr($b,1)=0),"not ","") + "acceptable."
; loop
endfunction

Top
#191111 - 2008-12-13 09:03 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Allen]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Allen I do appreciate the comments. It does help to find new ways to think about things.

What I would like to have some one do, maybe on the new one, is with each step of the process to document why they did what they did. As you can tell in my code, I still am stuck with not knowing many of the shortcuts that are available.

It may just be the way that I think as well ... you know sort of like 10000000 = 128 \:\)
_________________________
Today is the tomorrow you worried about yesterday.

Top
#191113 - 2008-12-13 11:14 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Gargoyle]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Good morning guys, here my 234
Will not have any time for golfing this weekend, so, have a nice one!
(Gratz on the 2000th post Allen!)

 Code:
; begin KiXgolfUDF
;
;!
function EDTS($4)
	dim $, $2, $3, $5, $6
	$2 = ccc,vvv,x
	for $3 = 1 to 0^$4
		dim $1
		$ = substr($4, $3, 1)
		$5 = $5 + iif(instr(aeiou, $), v, c) + left(x,$=$6 & $<>e & $<>o)
		$6 = $
		for each $ in $2
			if instr($5, $) | instr($5, v) = 0
				$1 = 'not '
			endif
			$EDTS = '<' + $4 + '> is ' + $1 + acceptable.
endfunction
;!
;!
; end KiXgolfUDF
_________________________



Top
#191114 - 2008-12-13 01:28 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Jochen]
RemcovC Offline
Starting to like KiXtart
*****

Registered: 2006-09-13
Posts: 174
Loc: Holland
Ok here is my 212:

 Code:
Function EDTS($c)
dim $,$a,$b,$d,$e,$p,$t
for $t=0 to $c^0
	$=substr($c,$t+1,1)
	$b=$b|$d+$e=3|$<>e&$<>o&$=$p
	$p=$
	$EDTS="<"+$c+"> is "+iif($a&~$b,a,"not a")+cceptable.
	if instr(aeoiu,$)
		$d=$d+1
		$e=0
		$a=1
	else
		$e=$e+1
		$d=0
EndFunction
_________________________
It's better to have scripted and died, then to never have scripted at all

Top
#191115 - 2008-12-13 01:29 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: RemcovC]
RemcovC Offline
Starting to like KiXtart
*****

Registered: 2006-09-13
Posts: 174
Loc: Holland
and a 204 with Rogierīs code:
 Code:
Function EDTS($p)
Dim $, $v, $i, $n, $o, $c

For $i = 1 to $p^0

	$ = substr($p,$i,1)

	if instr(aeiou,$)
		$v = $i
	else
		$c = $i
	endif

	if ($c - $v)/3 | ($o = $ & o<>$ & e<>$) | $c - $v = ($p^)
		$n = 'not '
	endif

	$EDTS = '<' + $p + '> is ' + $n + acceptable.
	
	$o = $

EndFunction
_________________________
It's better to have scripted and died, then to never have scripted at all

Top
#191116 - 2008-12-13 01:35 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: RemcovC]
RemcovC Offline
Starting to like KiXtart
*****

Registered: 2006-09-13
Posts: 174
Loc: Holland
202

 Code:
Function EDTS($p)
Dim $, $v, $i, $n, $o, $c

For $i = 1 to $p^0

	$ = substr($p,$i,1)

	if instr(aeiou,$)
		$v = $i
	else
		$c = $i
	endif

	if ($c - $v)/3 | $c - $v = ($p^) | $o = $ & o<>$ & e<>$
		$n = 'not '
	endif

	$EDTS = '<' + $p + '> is ' + $n + acceptable.
	
	$o = $
	
EndFunction
_________________________
It's better to have scripted and died, then to never have scripted at all

Top
#191118 - 2008-12-13 01:49 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: RemcovC]
RemcovC Offline
Starting to like KiXtart
*****

Registered: 2006-09-13
Posts: 174
Loc: Holland
And a nice round 200:

 Code:
Your solution passed all tests

KiXtart
KiXtart Version  = 4.60
KiXGolf Script   = kixgolf_edts.kix

Computer
OS               = Windows XP Home Edition
CPU              = AMD Athlon(tm) 64 Processor 3800+
Speed            = 2412 MHz
Memory           = 2048 MB

KiXGolf Scoring Engine
Scoring Engine   = 3.3

KiXtart Golf Score
Tournament       = Easier Done Than Said?
Processing Start = 2008/12/13 13:49:13.359
Processing End   = 2008/12/13 13:49:13.390
Duration         = 0000/00/00 00:00:00.031
KiXGolf Score    = 200

Thank you for participating in KiXtart Golf!


 Code:
Function EDTS($p)
Dim $, $v, $i, $n, $o, $c

For $i = 1 to 1+($p^)

	$EDTS = '<' + $p + '> is ' + $n + acceptable.
	
	$o = $
	$ = substr($p,$i,1)

	if instr(aeiou,$)
		$v = $i
	else
		$c = $i
	endif

	if ($c - $v)/3 | $c - $v = ($p^) | $o = $ & o<>$ & e<>$
		$n = 'not '
EndFunction
_________________________
It's better to have scripted and died, then to never have scripted at all

Top
Page 1 of 4 1234>


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

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

Generated in 0.053 seconds in which 0.02 seconds were spent on a total of 14 queries. Zlib compression enabled.

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