Page 2 of 4 <1234>
Topic Options
#191119 - 2008-12-13 04:52 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: RemcovC]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
Nice ones, Remco!

And they're all "Doh! I should have seen that!" changes
_________________________
The Code is out there

Top
#191120 - 2008-12-13 04:55 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: DrillSergeant]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
Remco - very nice: +iif($a&~$b,a,"not a")+cceptable.

That makes 244 on mine.

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

Registered: 2003-04-19
Posts: 4549
Loc: USA
Sarge - This is so wicked: $o = $ & o<>$ & e<>$

I think I know what its doing, but HOW its doing it is amazing.

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

Registered: 2003-04-19
Posts: 4549
Loc: USA
Rem... missed your other jewel on the end.

Mine 242

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 a",a) + cceptable.
; loop
endfunction

Top
#191124 - 2008-12-13 07:25 PM 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...
So now that we have the code to reduce and I am sure that is the focus of everyone, any comments on my code so that I can learn more would be appreciated as well.

I participate in these to learn from everyone else, I am (at this time) really more about completing the challenge than the true Golfing (even though I do try).
_________________________
Today is the tomorrow you worried about yesterday.

Top
#191126 - 2008-12-13 10:11 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Gargoyle]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, I'm getting on board as well.
 Quote:

Your solution passed all tests

KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_edts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 15
Speed = 2131 MHz
Memory = 1526 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Easier Done Than Said?
Processing Start = 2008/12/13 23:09:22.031
Processing End = 2008/12/13 23:09:22.031
Duration = 0000/00/00 00:00:00.000
KiXGolf Score = 199

Thank you for participating in KiXtart Golf!


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

For $i = 1 to $p+1^0

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

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

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

download KiXnet

Top
#191127 - 2008-12-14 02:05 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Lonkero]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
looks like we were all thinking similarly, here is my 220

 Code:
Function EDTS($a)
  Dim $, $b, $c, $d, $e, $f
  $ = $a
  While $
    $e = Left($, 1)
    If InStr(aeiou, $e)
      $d = $d + 1
      $c = 0
      $f = 1
    Else
      $c = $c + 1
      $d = 0
    EndIf
    $ = Right($, ~)
    If $f = $ | $d > 2 | $c > 2 | $e = Left($, 1) & $e > e & $e < o
      $b = 'not '
    EndIf
;  Loop
  $EDTS = '<' + $a + '> is ' + $b + acceptable.
EndFunction
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#191128 - 2008-12-14 02:07 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Benny69]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Thanks Lonk 197:
 Code:
Your solution passed all tests

KiXtart
KiXtart Version  = 4.60
KiXGolf Script   = kixgolf_edts.kix

Computer
OS               = Windows Vista Ultimate Edition
CPU              =               Intel(R) Pentium(R) D CPU 2.80GHz
Speed            = 2793 MHz
Memory           = 2048 MB

KiXGolf Scoring Engine
Scoring Engine   = 3.3

KiXtart Golf Score
Tournament       = Easier Done Than Said?
Processing Start = 2008/12/13 19:11:15.107
Processing End   = 2008/12/13 19:11:15.149
Duration         = 0000/00/00 00:00:00.042
KiXGolf Score    = 197

Thank you for participating in KiXtart Golf!
Press any key to continue...


 Code:
Function EDTS($p)
  Dim $, $v, $i, $n, $o, $c
  
  For $i = 1 to $p + 1 ^ 0
    
    $EDTS = '<' + $p + '> is ' + $n + acceptable.
    	
    $o = $
    $ = SubStr($p, $i, 1)
    
    If InStr(aeiou, $)
      $v = $i
    Else
      $c = $i
    EndIf
    
    If ($c - $v) /3 | $i - $v = ($p ^) | $o = $ & $ < o & $ > e
      $n = 'not '
    EndFunction



Edited by Benny69 (2008-12-14 02:08 AM)
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#191129 - 2008-12-14 02:39 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Benny69]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
You Guys Totaly Rock!

196

 Code:
Your solution passed all tests

KiXtart
KiXtart Version  = 4.60
KiXGolf Script   = kixgolf_edts.kix

Computer
OS               = Windows Vista Ultimate Edition
CPU              =               Intel(R) Pentium(R) D CPU 2.80GHz
Speed            = 2793 MHz
Memory           = 2048 MB

KiXGolf Scoring Engine
Scoring Engine   = 3.3

KiXtart Golf Score
Tournament       = Easier Done Than Said?
Processing Start = 2008/12/13 19:42:33.351
Processing End   = 2008/12/13 19:42:33.394
Duration         = 0000/00/00 00:00:00.043
KiXGolf Score    = 196

Thank you for participating in KiXtart Golf!
Press any key to continue...


 Code:
Function EDTS($p)
  Dim $, $v, $i, $n, $o, $c
    
  For $i = 1 to $p + 1 ^ 0
        
    $EDTS = '<' + $p + '> is ' + $n + acceptable.
        	
    $o = $
    $ = SubStr($p, $i, 1)
        
    If InStr(aeiou, $)
      $v = $i
    Else
      $c = $i
    EndIf
        
    If ($c - $v) /3 | $i * 2 = ($p^) | $o = $ & $ > e & $ < o
        $n = 'not '
EndFunction

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

Top
#191131 - 2008-12-14 09:43 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Benny69]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
doh, your first reduction I was already thinking before, but stupidly didn'
t think it through.

the second one, $i*2, this one I don't understand.
it says "if we are half done with our calculations, let's do 'not '"
_________________________
!

download KiXnet

Top
#191132 - 2008-12-14 09:54 AM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Benny69]
RemcovC Offline
Starting to like KiXtart
*****

Registered: 2006-09-13
Posts: 174
Loc: Holland
hmmmmm....

When is a code correct:
- if the code passes all given tests
- if the code is conform all given rules

What I mean is that Benny's 196 fails the following test:
 Code:
[Test 17]
Input=ba
Output=<ba> is acceptable.


I could remove another 4 strokes without failing the current test case, but the code will fail a test with input as "oop"

 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/14 09:53:56.828
Processing End   = 2008/12/14 09:53:56.859
Duration         = 0000/00/00 00:00:00.030
KiXGolf Score    = 192

Thank you for participating in KiXtart Golf!


 Code:
Function EDTS($p)
  Dim $, $v, $i, $n, $o, $c
    
  For $i = 1 to $p + 1 ^ 0
        
    $EDTS = '<' + $p + '> is ' + $n + acceptable.
        	
    $o = $
    $ = SubStr($p, $i, 1)
        
    If InStr(aeiou, $)
      $v = $i
    Else
      $c = $i
    EndIf
        
    If ($c - $v) /3 | $i * 2 = ($p^) | $o = $ & $ > e
        $n = 'not '
EndFunction
_________________________
It's better to have scripted and died, then to never have scripted at all

Top
#191133 - 2008-12-14 12:11 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: RemcovC]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yes, and all is on this $i-halfway calculation.

or not.
you even stripped the double "o" \:\)


Edited by Lonkero (2008-12-14 12:14 PM)
_________________________
!

download KiXnet

Top
#191134 - 2008-12-14 01:17 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Lonkero]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
Hey guys, the code is getting a bit sloppy. This test is failing after lonk's 199:

[Test 15]
Input=baacc
Output= is not acceptable.
_________________________
The Code is out there

Top
#191135 - 2008-12-14 01:22 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: DrillSergeant]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
If we're only coding on the testcases:

 Code:

KiXtart
KiXtart Version  = 4.60
KiXGolf Script   = kixgolf_edts.KIX

Computer
OS               = Windows Vista Business Edition
CPU              = Intel Pentium Model 15
Speed            = 2194 MHz
Memory           = 2038 MB

KiXGolf Scoring Engine
Scoring Engine   = 3.3

KiXtart Golf Score
Tournament       = Easier Done Than Said?
Processing Start = 2008/12/14 13:20:40.865
Processing End   = 2008/12/14 13:20:40.927
Duration         = 0000/00/00 00:00:00.062
KiXGolf Score    = 189
 
Thank you for participating in KiXtart Golf!


 Code:
Function EDTS($p)
  Dim $, $v, $i, $n, $o, $c
    
  For $i = 1 to $p + 1 ^ 0
        
    $EDTS = '<' + $p + '> is ' + $n + acceptable.
        	
    $o = $
    $ = SubStr($p, $i, 1)
        
    If InStr(aeiou, $)
      $v = $i
    Else
      $c = $i
    EndIf
        
    If ($c - $v) /3 | ($p^)=2| $o = $ & $ > e
        $n = 'not '
EndFunction
_________________________
The Code is out there

Top
#191136 - 2008-12-14 01:22 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: DrillSergeant]
RemcovC Offline
Starting to like KiXtart
*****

Registered: 2006-09-13
Posts: 174
Loc: Holland
that's what i'm trying to point out... \:\)

But it still passes the official testcases


Edited by RemcovC (2008-12-14 01:22 PM)
_________________________
It's better to have scripted and died, then to never have scripted at all

Top
#191137 - 2008-12-14 02:30 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: RemcovC]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
i added the 2 test cases you guys suggested and my 220 code failed, so with the new test cases i have to resubmit my code at 222:
 Code:
[Test 1]
Input=a
Output=<a> is acceptable.
[Test 2]
Input=tv
Output=<tv> is not acceptable.
[Test 3]
Input=ptoui
Output=<ptoui> is not acceptable.
[Test 4]
Input=bontres
Output=<bontres> is not acceptable.
[Test 5]
Input=zoggax
Output=<zoggax> is not acceptable.
[Test 6]
Input=wiinq
Output=<wiinq> is not acceptable.
[Test 7]
Input=eep
Output=<eep> is acceptable.
[Test 8]
Input=houctuh
Output=<houctuh> is acceptable.
[Test 9]
Input=pooop
Output=<pooop> is not acceptable.
[Test 10]
Input=peeep
Output=<peeep> is not acceptable.
[Test 11]
Input=bahhah
Output=<bahhah> is not acceptable.
[Test 12]
Input=abcde
Output=<abcde> is not acceptable.
[Test 13]
Input=ba
Output=<ba> is acceptable.
[Test 14]
Input=baacc
Output=<baacc> is not acceptable.

 Code:
Running Test 1...Done
Running Test 2...Done
Running Test 3...Done
Running Test 4...Done
Running Test 5...Done
Running Test 6...Done
Running Test 7...Done
Running Test 8...Done
Running Test 9...Done
Running Test 10...Done
Running Test 11...Done
Running Test 12...Done
Running Test 13...Done
Running Test 14...Done
Your solution passed all tests

KiXtart
KiXtart Version  = 4.60
KiXGolf Script   = kixgolf_edts.kix

Computer
OS               = Windows Vista Business Edition
CPU              =               Intel(R) Pentium(R) D CPU 3.20GHz
Speed            = 3200 MHz
Memory           = 2046 MB

KiXGolf Scoring Engine
Scoring Engine   = 3.3

KiXtart Golf Score
Tournament       = Easier Done Than Said?
Processing Start = 2008/12/14 07:28:50.867
Processing End   = 2008/12/14 07:28:50.883
Duration         = 0000/00/00 00:00:00.016
KiXGolf Score    = 222

Thank you for participating in KiXtart Golf!
Press any key to continue...

 Code:
Function EDTS($a)
  Dim $, $b, $c, $d, $e, $f
  $ = $a
  While $
    $e = Left($, 1)
    If InStr(aeiou, $e)
      $d = $d + 1
      $c = 0
      $f = 1
    Else
      $c = $c + 1
      $d = 0
    EndIf
    $ = Right($, ~)
    If $f = $ | $d > 2 | $c > 2 | $e = Left($, 1) & $e <> e & $e <> o
      $b = 'not '
    EndIf
    ;  Loop
    $EDTS = '<' + $a + '> is ' + $b + acceptable.
EndFunction
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#191138 - 2008-12-14 02:31 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Benny69]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
i now submit a 194 code
 Code:
Running Test 1...Done
Running Test 2...Done
Running Test 3...Done
Running Test 4...Done
Running Test 5...Done
Running Test 6...Done
Running Test 7...Done
Running Test 8...Done
Running Test 9...Done
Running Test 10...Done
Running Test 11...Done
Running Test 12...Done
Running Test 13...Done
Running Test 14...Done
Your solution passed all tests

KiXtart
KiXtart Version  = 4.60
KiXGolf Script   = kixgolf_edts.kix

Computer
OS               = Windows Vista Business Edition
CPU              =               Intel(R) Pentium(R) D CPU 3.20GHz
Speed            = 3200 MHz
Memory           = 2046 MB

KiXGolf Scoring Engine
Scoring Engine   = 3.3

KiXtart Golf Score
Tournament       = Easier Done Than Said?
Processing Start = 2008/12/14 07:30:31.793
Processing End   = 2008/12/14 07:30:31.808
Duration         = 0000/00/00 00:00:00.014
KiXGolf Score    = 194

Thank you for participating in KiXtart Golf!
Press any key to continue...

 Code:
Function EDTS($p)
  Dim $, $v, $i, $n, $o, $c
        
  For $i = 1 to $p + 1 ^ 0
                
    $EDTS = '<' + $p + '> is ' + $n + acceptable.
                	
    $o = $
    $ = SubStr($p, $i, 1)
                
    If InStr(aeiou, $)
      $v = $i
    Else
      $c = $i
    EndIf
                
    If ($c - $v) /3 | $i - $v = ($p ^) | $o = $ & $ <> e
      $n = 'not '
EndFunction
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#191139 - 2008-12-14 02:42 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Benny69]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
hey Benny,

Your 194 code would fail poop (I wonder if that gets through the bad language filter ;-))


Edited by DrillSergeant (2008-12-14 02:43 PM)
_________________________
The Code is out there

Top
#191140 - 2008-12-14 02:47 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: DrillSergeant]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
LOL!

We can't have that!
added:
 Code:
[Test 15]
Input=poop
Output=<poop> is acceptable.

 Code:
[Test 1]
Input=a
Output=<a> is acceptable.
[Test 2]
Input=tv
Output=<tv> is not acceptable.
[Test 3]
Input=ptoui
Output=<ptoui> is not acceptable.
[Test 4]
Input=bontres
Output=<bontres> is not acceptable.
[Test 5]
Input=zoggax
Output=<zoggax> is not acceptable.
[Test 6]
Input=wiinq
Output=<wiinq> is not acceptable.
[Test 7]
Input=eep
Output=<eep> is acceptable.
[Test 8]
Input=houctuh
Output=<houctuh> is acceptable.
[Test 9]
Input=pooop
Output=<pooop> is not acceptable.
[Test 10]
Input=peeep
Output=<peeep> is not acceptable.
[Test 11]
Input=bahhah
Output=<bahhah> is not acceptable.
[Test 12]
Input=abcde
Output=<abcde> is not acceptable.
[Test 13]
Input=ba
Output=<ba> is acceptable.
[Test 14]
Input=baacc
Output=<baacc> is not acceptable.
[Test 15]
Input=poop
Output=<poop> is acceptable.

199
 Code:
Running Test 1...Done
Running Test 2...Done
Running Test 3...Done
Running Test 4...Done
Running Test 5...Done
Running Test 6...Done
Running Test 7...Done
Running Test 8...Done
Running Test 9...Done
Running Test 10...Done
Running Test 11...Done
Running Test 12...Done
Running Test 13...Done
Running Test 14...Done
Running Test 15...Done
Your solution passed all tests

KiXtart
KiXtart Version  = 4.60
KiXGolf Script   = kixgolf_edts.kix

Computer
OS               = Windows Vista Business Edition
CPU              =               Intel(R) Pentium(R) D CPU 3.20GHz
Speed            = 3200 MHz
Memory           = 2046 MB

KiXGolf Scoring Engine
Scoring Engine   = 3.3

KiXtart Golf Score
Tournament       = Easier Done Than Said?
Processing Start = 2008/12/14 07:46:57.190
Processing End   = 2008/12/14 07:46:57.221
Duration         = 0000/00/00 00:00:00.031
KiXGolf Score    = 199

Thank you for participating in KiXtart Golf!
Press any key to continue...

 Code:
Function EDTS($p)
  Dim $, $v, $i, $n, $o, $c
        
  For $i = 1 to $p + 1 ^ 0
                
    $EDTS = '<' + $p + '> is ' + $n + acceptable.
                	
    $o = $
    $ = SubStr($p, $i, 1)
                
    If InStr(aeiou, $)
      $v = $i
    Else
      $c = $i
    EndIf
                
    If ($c - $v) /3 | $i - $v = ($p^) | $o = $ & $ <> e & $ <> o
      $n = 'not '
EndFunction

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

Top
#191142 - 2008-12-14 03:01 PM Re: KiXgolf - Easier Done Than Said - Public Round [Re: Benny69]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Unfortunately, rule 32 takes hold:
 Quote:
32) Additional test cases can be added during the private round by submitting a proposal for a new test case to the BBS. The proposed test case becomes official once it has been added to the existing test cases and the KiXgolf package has been reposted for download. If new test cases are added within 12 hours of private round end the private round will extend by an additional 24 hours. The public round will then start one day later and also end one day later. Not additional test cases will be added during the public round.


So, better to submit new test cases as early as possible. Therefore, the test cases stand as is. If the code passes the official test cases it's good code. However, we all understand that the test cases do not cover all potential coding approaches.

Everbody fine with this?
_________________________
There are two types of vessels, submarines and targets.

Top
Page 2 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 686 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 15 queries. Zlib compression enabled.

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