Page 5 of 8 « First<34567>Last »
Topic Options
#183910 - 2007-12-19 09:20 AM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
The 32 can be replaced by a 30 as there won't be 32 double spaces ... a little flaw in my logic \:\)

for the >'@' ... it inspects every single character in a 'word' or series of characters. if it finds at least one greater than @ it is counted as a word for the number of taunts logic


Edited by Jochen (2007-12-19 09:21 AM)
_________________________



Top
#183911 - 2007-12-19 09:28 AM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Jochen]
RemcovC Offline
Starting to like KiXtart
*****

Registered: 2006-09-13
Posts: 174
Loc: Holland
Hmmm....
 Quote:
I thought the 32 was needed there?


Using
 Code:
For $t=0 to 1

In stead of
 Code:
For $t=-9 to 1

Still gives a working code (with a stroke less), but I can make a testcase which makes it fail.

The minimum steps taken there is 7 (-5 to 1) to make a bullit proof code (cause the maximum concequtive spaces exceeds 64 but doesn't exceed 128)

Off topic:
Like yesterday, I wont be able to play today, I hope I have time tommorow.

Goodluck


Edited by RemcovC (2007-12-19 09:29 AM)
_________________________
It's better to have scripted and died, then to never have scripted at all

Top
#183912 - 2007-12-19 09:29 AM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Well, I can easily produce a test case that will break the current code with 'for $t=-9 to 1'

errm ... I was wrong \:o


Edited by Jochen (2007-12-19 09:36 AM)
Edit Reason: oops
_________________________



Top
#183920 - 2007-12-19 10:06 AM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Jochen]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
 Originally Posted By: Jochen
for the >'@' ... it inspects every single character in a 'word' or series of characters. if it finds at least one greater than @ it is counted as a word for the number of taunts logic


btw, I noticed something strange yesterday:
 Code:
break on cls

$iRC=SETOPTION('NoVarsInStrings','on')

$s = '@'
$d = '@@'

? " asc value single = " asc($s)
? " asc value double = " asc($d)
?
? " chr from asc single = " chr(asc($s))
? " chr from asc double = " chr(asc($d))



Edited by DrillSergeant (2007-12-19 10:07 AM)
_________________________
The Code is out there

Top
#183922 - 2007-12-19 10:28 AM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: DrillSergeant]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
it is not so strange when you run this after that:

 Code:
break on

$iRC=SETOPTION('NoVarsInStrings','on')
$iRC=SETOPTION('NoMacrosInStrings','on')

$s = '@'
$d = '@@'

? " asc value single = " asc($s)
? " asc value double = " asc($d)
?
? " chr from asc single = " chr(asc($s))
? " chr from asc double = " chr(asc($d))

get $iRC
_________________________



Top
#183925 - 2007-12-19 11:04 AM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
The syndicate of local anarcho code peasants is proud to present 'A Long Line Broken'.


Your solution passed all tests

KiXtart
KiXtart Version  = 4.53
KiXGolf Script   = kixgolf_tg.kix

Computer
OS               = Windows 2000 Professional
CPU              =               Intel(R) Pentium(R) 4 CPU 2.80GHz
Speed            = 2793 MHz
Memory           = 504 MB

KiXGolf Scoring Engine
Scoring Engine   = 3.3

KiXtart Golf Score
Tournament       = Taunt Generator
Processing Start = 2007/12/19 11:02:02.500
Processing End   = 2007/12/19 11:02:02.734
Duration         = 0000/00/00 00:00:00.233
KiXGolf Score    = 844

Thank you for participating in KiXtart Golf!



function a($)
	dim $z,$t,$!,$d,$v,$w,$x
	for each $ in $
		for $t=-9 to 1
			$=join(split($,'  '))
		next
		$x=$x+#Knight:\+$+#
		for each $v in split($)
			$a=0
			$z=1
			for $w=1 to 72
				$z=$z+(substr($,$w,1)=substr(theholygrail,$z,1))
				$a=$a | substr($v,$w)>'@'
			next
			$t=$t+$a
		next
		for $v=1 to $t/3
			$ = conspicuous,categorical,positive,cruel,incontrovertib,steed,king,'first-born',mo,fa,grandmo,
			    grandfa,godfa,Hamster,Coconut,Duck,Herring,Newt,Peril,Chicken,Vole,Parrot,Mouse,Twit,silly,
			    wicked,sordid,naughty,repulsive,malodorous,'ill-tempered'
			if $v=1&$z>12
				$='(A childish hand gesture)'
			else
				$d=$d+1
				If $d mod 3=2
					$z=$[$! mod 11+13]+!\Your\+$[$!/4 mod 3+5]+
					   iif($!/4 mod 2,\masquerades\as\a\+$[$!/8 mod 5]+ly\,\is\a\)+$[$!/4 mod 7+24]
					$!=$!+1
					$v=$v+1
				else
					$z=Your\+$[$!/2 mod 5+8]+ther\+iif($d mod 3,was,personified)+\a
 				endif
				$=$z+\+lcase($[$! mod 11+13])
				$!=$!+1
			endif
			$x=$x+Taunter:\+$+'.#'
			$a=split(right(join(split($x,\)),~),#)
endfunction


_________________________



Top
#183930 - 2007-12-19 11:58 AM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Jochen]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
It's easy if you think about it \:\)
Your solution passed all tests

KiXtart
KiXtart Version = 4.60
KiXGolf Script = kixgolf_tg.KIX

Computer
OS = Windows XP Professional
CPU = Intel(R) Pentium(R) 4 CPU 2.40GHz
Speed = 2392 MHz
Memory = 1016 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Taunt Generator
Processing Start = 2007/12/19 11:56:20.062
Processing End = 2007/12/19 11:56:21.234
Duration = 0000/00/00 00:00:01.171
KiXGolf Score = 833

Thank you for participating in KiXtart Golf!


function a($)
dim $z,$t,$!,$d,$v,$w,$x
for each $ in $
$t=2
for each $v in split($)
$a=0
$z=1
for $w=1 to 72
$=join(split($,' '))
$z=$z+(substr($,$w,1)=substr(theholygrail,$z,1))
$a=$a | substr($v,$w)>'@'
next
$t=$t+$a
next
$x=$x+#Knight:\+$+#
for $v=1 to $t/3
$ = conspicuous,categorical,positive,cruel,incontrovertib,steed,king,'first-born',mo,fa,grandmo,
grandfa,godfa,Hamster,Coconut,Duck,Herring,Newt,Peril,Chicken,Vole,Parrot,Mouse,Twit,silly,
wicked,sordid,naughty,repulsive,malodorous,'ill-tempered'
if $v=1&$z>12
$='(A childish hand gesture)'
else
$d=$d+1
If $d mod 3=2
$z=$[$! mod 11+13]+!\Your\+$[$!/4 mod 3+5]+
iif($!/4 mod 2,\masquerades\as\a\+$[$!/8 mod 5]+ly\,\is\a\)+$[$!/4 mod 7+24]
$!=$!+1
$v=$v+1
else
$z=Your\+$[$!/2 mod 5+8]+ther\+iif($d mod 3,was,personified)+\a
endif
$=$z+\+lcase($[$! mod 11+13])
$!=$!+1
endif
$x=$x+Taunter:\+$+'.#'
$a=split(right(join(split($x,\)),~),#)
endfunction


Edited by DrillSergeant (2007-12-19 12:05 PM)
_________________________
The Code is out there

Top
#183932 - 2007-12-19 12:05 PM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: DrillSergeant]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Yo Rogier,

please close the score part with a </pre> and open the code part with a <pre>

Otherwise it is difficult to copy things from the post.

nb. Nice move! Can't tell yet what you did, but still nice!
_________________________



Top
#183933 - 2007-12-19 12:07 PM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Jochen]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
I took out the loop around the double spaces removal routine and (mis-)used another loop for that
_________________________
The Code is out there

Top
#183934 - 2007-12-19 12:09 PM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: DrillSergeant]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Clever! Well done Concorde
_________________________



Top
#183937 - 2007-12-19 01:16 PM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
one more ...


Your solution passed all tests

KiXtart
KiXtart Version  = 4.53
KiXGolf Script   = kixgolf_tg.kix

Computer
OS               = Windows 2000 Professional
CPU              =               Intel(R) Pentium(R) 4 CPU 2.80GHz
Speed            = 2793 MHz
Memory           = 504 MB

KiXGolf Scoring Engine
Scoring Engine   = 3.3

KiXtart Golf Score
Tournament       = Taunt Generator
Processing Start = 2007/12/19 13:11:49.203
Processing End   = 2007/12/19 13:11:49.656
Duration         = 0000/00/00 00:00:00.453
KiXGolf Score    = 832

Thank you for participating in KiXtart Golf!



function a($)
	dim $z,$t,$!,$d,$v,$w,$x
	for each $ in $
		$t=2
		for each $v in split($)
			$a=0
			$z=1
			for $w=1 to 72
				$=join(split($,'  '))
				$z=$z+(substr($,$w,1)=substr(theholygrail,$z,1))
				$a=$a | substr($v,$w)>'@'
			next
			$t=$a+$t
		next
		$x=$x+#Knight:\+$+#
		for $v=1 to $t/3
			$ = conspicuous,categorical,positive,cruel,incontrovertib,steed,king,'first-born',mo,fa,grandmo,
			    grandfa,godfa,Hamster,Coconut,Duck,Herring,Newt,Peril,Chicken,Vole,Parrot,Mouse,Twit,silly,
			    wicked,sordid,naughty,repulsive,malodorous,'ill-tempered'
			if $z>12
				$='(A childish hand gesture)'
			else
				$d=$d+1
				if $d mod 3=2
					$z=$[$! mod 11+13]+!\Your\+$[$!/4 mod 3+5]+
					   iif($!/4 mod 2,\masquerades\as\a\+$[$!/8 mod 5]+ly\,\is\a\)+$[$!/4 mod 7+24]
					$!=$!+1
					$v=$v+1
				else
					$z=Your\+$[$!/2 mod 5+8]+ther\+iif($d mod 3,was,personified)+\a
			 	endif
				$=$z+\+lcase($[$! mod 11+13])
				$!=$!+1
			endif
			$z=1
			$x=$x+Taunter:\+$+'.#'
			$a=split(right(join(split($x,\)),~),#)
endfunction
_________________________



Top
#183946 - 2007-12-19 05:30 PM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
heh...

831

function a($)
dim $z,$t,$!,$d,$v,$w,$x
for each $ in $
$t=2
for each $v in split($)
$a=0
$z=1
for $w=1 to 72
$=join(split($,' '))
$z=$z+(substr($,$w,1)=substr(theholygrail,$z,1))
$a=$a | substr($v,$w)>'@'
next
$t=$a+$t
next
$x=$x+#Knight:\+$+#
for $v=1 to $t/3
$ = conspicuous,categorical,positive,cruel,incontrovertib,steed,king,'first-born',mo,fa,grandmo,
grandfa,godfa,Hamster,Coconut,Duck,Herring,Newt,Peril,Chicken,Vole,Parrot,Mouse,Twit,silly,
wicked,sordid,naughty,repulsive,malodorous,'ill-tempered'
if 12<$z
$z='(A childish hand gesture)'
else
$d=$d+1
if $d mod 3=2
$z=$[$! mod 11+13]+!\Your\+$[$!/4 mod 3+5]+
iif($!/4 mod 2,\masquerades\as\a\+$[$!/8 mod 5]+ly\,\is\a\)+$[$!/4 mod 7+24]
$!=$!+1
$v=$v+1
else
$z=Your\+$[$!/2 mod 5+8]+ther\+iif($d mod 3,was,personified)+\a
endif
$z=$z+\+lcase($[$! mod 11+13])
$!=$!+1
endif
; $z=1
$x=$x+Taunter:\+$z+'.#'
$a=split(right(join(split($x,\)),~),#)
endfunction
_________________________
!

download KiXnet

Top
#183949 - 2007-12-19 06:16 PM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Lonkero]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
heh, heh,... 829

 Code:
Function a($)
  Dim $b,$c,$d,$e,$f,$g,$h
  For Each $ in $
    $c=2
    $b = theholygrail
    For Each $f in Split($)
      $a=0
      While $f
        $a = $a | $f > '@'
        $b = SubStr($b,(Left($f,1) = Left($b,1))+1)
        $f = Right($f,~)
      Loop
      $c = $c + $a
      $=Join(Split($,'  '))
    Next
    $h=$h+#Knight:\+$+#
    For $f=1 to $c/3
      $ = conspicuous,categorical,positive,cruel,incontrovertib,steed,king,'first-born',mo,fa,grandmo,
      grandfa,godfa,Hamster,Coconut,Duck,Herring,Newt,Peril,Chicken,Vole,Parrot,Mouse,Twit,silly,
      wicked,sordid,naughty,repulsive,malodorous,'ill-tempered'
      If $b
        $d=$d+1
        If $d mod 3=2
          $b=$[$e mod 11+13]+!\Your\+$[$e/4 mod 3+5]+IIf($e/4 mod 2,\masquerades\as\a\+$[$e/8 mod 5]+ly\,\is\a\)+$[$e/4 mod 7+24]
          $e=$e+1
          $f=$f+1
        Else
          $b=Your\+$[$e/2 mod 5+8]+ther\+IIf($d mod 3,was,personified)+\a
        EndIf
        $b=$b+\+LCase($[$e mod 11+13])
        $e=$e+1
      Else
        $b='(A childish hand gesture)'
      EndIf
      $h=$h+Taunter:\+$b+'.#'
;    Next
;  Next
  $a=Split(Right(Join(Split($h,\)),~),#)
EndFunction


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

Top
#183952 - 2007-12-19 07:17 PM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Benny69]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
nice, the alternate.
_________________________
!

download KiXnet

Top
#183953 - 2007-12-19 07:27 PM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
heh.
828
Function a($)
Dim $b,$c,$d,$e,$f,$g,$h
For Each $f in $
$c=2
$b = theholygrail
For Each $ in Split($f)
$a=0
While $
$a = $a | $ > '@'
$b = SubStr($b,(Left($,1) = Left($b,1))+1)
$ = Right($,~)
Loop
$c = $c + $a
$f=Join(Split($f,' '))
Next
$h=$h+#Knight:\+$f+#
For $f=1 to $c/3
If $b
$ = conspicuous,categorical,positive,cruel,incontrovertib,steed,king,'first-born',mo,fa,grandmo,
grandfa,godfa,Hamster,Coconut,Duck,Herring,Newt,Peril,Chicken,Vole,Parrot,Mouse,Twit,silly,
wicked,sordid,naughty,repulsive,malodorous,'ill-tempered'
$d=$d+1
If $d mod 3=2
$b=$[$e mod 11+13]+!\Your\+$[$e/4 mod 3+5]+IIf($e/4 mod 2,\masquerades\as\a\+$[$e/8 mod 5]+ly\,\is\a\)+$[$e/4 mod 7+24]
$e=$e+1
$f=$f+1
Else
$b=Your\+$[$e/2 mod 5+8]+ther\+IIf($d mod 3,was,personified)+\a
EndIf
$b=$b+\+LCase($[$e mod 11+13])
$e=$e+1
Else
$b='(A childish hand gesture)'
EndIf
$h=$h+Taunter:\+$b+'.#'
; Next
; Next
$a=Split(Right(Join(Split($h,\)),~),#)
EndFunction
_________________________
!

download KiXnet

Top
#183954 - 2007-12-19 07:30 PM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
826

Function a($)
Dim $b,$c,$d,$e,$f,$g,$h
For Each $f in $
$c=2
$ = theholygrail
For Each $b in Split($f)
$a=0
While $b
$a = $a | $b > '@'
$ = SubStr($,(Left($b,1) = Left($,1))+1)
$b = Right($b,~)
Loop
$c = $c + $a
$f=Join(Split($f,' '))
Next
$h=$h+#Knight:\+$f+#
For $f=1 to $c/3
If $
$ = conspicuous,categorical,positive,cruel,incontrovertib,steed,king,'first-born',mo,fa,grandmo,
grandfa,godfa,Hamster,Coconut,Duck,Herring,Newt,Peril,Chicken,Vole,Parrot,Mouse,Twit,silly,
wicked,sordid,naughty,repulsive,malodorous,'ill-tempered'
$d=$d+1
If $d mod 3=2
$b=$[$e mod 11+13]+!\Your\+$[$e/4 mod 3+5]+IIf($e/4 mod 2,\masquerades\as\a\+$[$e/8 mod 5]+ly\,\is\a\)+$[$e/4 mod 7+24]
$e=$e+1
$f=$f+1
Else
$b=Your\+$[$e/2 mod 5+8]+ther\+IIf($d mod 3,was,personified)+\a
EndIf
$=$b+\+LCase($[$e mod 11+13])
$e=$e+1
Else
$='(A childish hand gesture)'
EndIf
$h=$h+Taunter:\+$+'.#'
; Next
; Next
$a=Split(Right(Join(Split($h,\)),~),#)
EndFunction
_________________________
!

download KiXnet

Top
#183955 - 2007-12-19 07:34 PM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Lonkero]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
heh, heh,... 823

 Code:
Function a($)
  Dim $b,$c,$d,$e,$f,$g
  For Each $f in $
    $c=2
    $ = theholygrail
    For Each $b in Split($f)
      $a=0
      While $b
        $a = $a | $b > '@'
        $ = SubStr($,(Left($b,1) = Left($,1))+1)
        $b = Right($b,~)
      Loop
      $c = $c + $a
      $f=Join(Split($f,'  '))
    Next
    $g=$g+#Knight:\+$f+#
    For $f=1 to $c/3
      If $
        $ = conspicuous,categorical,positive,cruel,incontrovertib,steed,king,'first-born',mo,fa,grandmo,
          grandfa,godfa,Hamster,Coconut,Duck,Herring,Newt,Peril,Chicken,Vole,Parrot,Mouse,Twit,silly,
          wicked,sordid,naughty,repulsive,malodorous,'ill-tempered'
        $d=$d+1
        If $d mod 3=2
          $b=$[$e mod 11+13]+!\Your\+$[$e/4 mod 3+5]+IIf($e/4 mod 2,\masquerades\as\a\+$[$e/8 mod 5]+ly\,\is\a\)+$[$e/4 mod 7+24]
          $e=$e+1
          $f=$f+1
        Else
          $b=Your\+$[$e/2 mod 5+8]+ther\+IIf($d mod 3,was,personified)+\a
        EndIf
        $=$b+\+LCase($[$e mod 11+13])
        $e=$e+1
      Else
        $='(A childish hand gesture)'
      EndIf
      $g=$g+Taunter:\+$+'.#'
;    Next
;  Next
  $a=Split(Right(Join(Split($g,\)),~),#)
EndFunction


Edited by Benny69 (2007-12-19 08:06 PM)
Edit Reason: because jooel said
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#183958 - 2007-12-19 08:01 PM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Benny69]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Bah! Fix the formatting Dale (and if you are at it ... lowercase the keywords. I don't want to do it any time I copy to improve ;\) )
_________________________



Top
#183959 - 2007-12-19 08:04 PM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Jochen]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
every time you post like you do i get 1 long line, so if you explect me to fix my own you need to post inside code tags
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#183963 - 2007-12-19 08:17 PM Re: KiXgolf 2007: Taunt Generator - Public Round [Re: Benny69]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Eh ?

If I copy my own code (with <pre> and </pre> tags) posted as html I get a perfectly formatted paste into my editor (not notepad ;\) )

See how to copy code in the faq forum :p
_________________________



Top
Page 5 of 8 « First<34567>Last »


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

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.078 seconds in which 0.027 seconds were spent on a total of 13 queries. Zlib compression enabled.

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