Page 4 of 5 <12345>
Topic Options
#187110 - 2008-04-20 03:02 AM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: RemcovC]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
This is a non-tournament round, thus no points for anybody anyway. Was just a means to celebrate my 11000th post \:\)
_________________________
There are two types of vessels, submarines and targets.

Top
#187111 - 2008-04-20 04:47 AM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Sealeopard]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Private round is over, public round is open. You're free to post your code.
_________________________
There are two types of vessels, submarines and targets.

Top
#187112 - 2008-04-20 09:05 AM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Sealeopard]
RemcovC Offline
Starting to like KiXtart
*****

Registered: 2006-09-13
Posts: 174
Loc: Holland
I don't see a new topic for public round so I wil post my code here to celebrate your 24th, 25th, 26th, and 27th post \:\)

Warning, Spoiler:

Function a($)

Dim $b, $d, $f, $g, $h, $i, $k[9], $t, $x, $y, $z

$b = "._.|.||_|",".....|..|","._.._||_.","._.._|._|","...|_|..|","._.|_.._|","._.|_.|_|","._...|..|","._.|_||_|","._.|_|._|"
For $a = 0 To 8
$f = ""
For $z = 0 To 2
$f = $f + SubStr($[$z], $a * 3 + 1, 3)
Next
$k[$a]=AScan($b, $f)
Next
$g = Ascan($k,~)
$a = failure
For $t = 0 to 8
If $g = $t ^ $g = -1
$i = ""
For $x = 0 to 9
$f = 1
For $z = 0 to 8
If SubStr($b[$x], $z+1, 1) = "." & SubStr($[$z/3], $z mod 3 + $t * 3 + 1, 1) > "."
$f = 0
EndIf
Next
If $f
$i = $i + $x
EndIf
Next
For $z = 1 to $i^0
$f = ""
$x = 0
For $d = 0 to 8
$y = IIf($t = $d, SubStr($i,$z,1), $k[$d])
$x = $x + (9 - $d) * $y
$f = $f + $y
Next
If $x mod 11 = 0
$a = Iif($a>Z, $f, ambiguous)
EndFunction


Edit added spoiler \:D


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

Top
#187113 - 2008-04-20 09:15 AM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Sealeopard]
RemcovC Offline
Starting to like KiXtart
*****

Registered: 2006-09-13
Posts: 174
Loc: Holland
 Originally Posted By: Sealeopard
This is a non-tournament round, thus no points for anybody anyway. Was just a means to celebrate my 11000th post \:\)


When is the real tournament gonna start then, so that everyone can mark the dates in their calendar ^^
_________________________
It's better to have scripted and died, then to never have scripted at all

Top
#187114 - 2008-04-20 12:43 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: RemcovC]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
My private code isn't totally ready yet.
haven't got time to fix the bug I introduced in my latest and greatest.
and until I do, I won't read the code above.
_________________________
!

download KiXnet

Top
#187115 - 2008-04-20 12:59 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Lonkero]
RemcovC Offline
Starting to like KiXtart
*****

Registered: 2006-09-13
Posts: 174
Loc: Holland
 Originally Posted By: Lonkero
hmm...
My private code isn't totally ready yet.
haven't got time to fix the bug I introduced in my latest and greatest.
and until I do, I won't read the code above.


used the spoiler tags for you :P
_________________________
It's better to have scripted and died, then to never have scripted at all

Top
#187116 - 2008-04-20 02:49 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: RemcovC]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
You can post the code in this thread, there won't be a separate thread this time.

Once I have sufficient material for the tournament I will post a detailed schedule so that everybody can plan ahead accordingly.
_________________________
There are two types of vessels, submarines and targets.

Top
#187118 - 2008-04-20 09:22 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Sealeopard]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
No official round? whut, where?
K, when is it over, and where is the clock when you need it? \:o

Please post all your eventual code in spoiler tags, as I might come up with something


Uh... and bye-bye for now..


Edited by Jochen (2008-04-21 07:32 AM)
Edit Reason: ciao
_________________________



Top
#187119 - 2008-04-20 10:14 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Jochen]
RemcovC Offline
Starting to like KiXtart
*****

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


Here \:\)

And this is how you do it:
 Code:
<iframe src="http://www.timeanddate.com/counters/fullscreen.html?mode=a&year=2008&month=4&day=19&hour=10pm&p0=179" width="99%"></iframe>


Edited by RemcovC (2008-04-20 10:15 PM)
_________________________
It's better to have scripted and died, then to never have scripted at all

Top
#187120 - 2008-04-20 10:24 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: RemcovC]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
How do you do spoiler tags?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#187123 - 2008-04-21 05:21 AM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Les]
cj Offline
MM club member
*****

Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
Use the tags (spoiler) text here... (/spoiler), replacing the round brackets with square and/or use the spoiler button on the toolbar, or both. The button is an S with a / through it, 9th from the left.

come here, where did I put that fish.. \:D

cj

Top
#187152 - 2008-04-22 05:06 AM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: cj]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
What's going on here? Only one person delivered some code to work with? And nobody's even improving RemcovC's code?
_________________________
There are two types of vessels, submarines and targets.

Top
#187155 - 2008-04-22 07:59 AM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Sealeopard]
RemcovC Offline
Starting to like KiXtart
*****

Registered: 2006-09-13
Posts: 174
Loc: Holland
 Originally Posted By: Sealeopard
What's going on here? Only one person delivered some code to work with? And nobody's even improving RemcovC's code?

I was thinking the same \:\(

It's no fun to compete this way.... please post code, or shorten mine ^^
_________________________
It's better to have scripted and died, then to never have scripted at all

Top
#187157 - 2008-04-22 09:31 AM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: RemcovC]
DrillSergeant Offline
MM club member
*****

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

I'm on the bandwagon... I've still got no clue what Remco's script does exactly, but I've put in a split, removed an unused var and made the best use of the $ var:


Your solution passed all tests

KiXtart
KiXtart Version = 4.60
KiXGolf Script = kixgolf_cs.KIX

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Check Scanning
Processing Start = 2008/04/22 09:30:55.900
Processing End = 2008/04/22 09:30:55.990
Duration = 0000/00/00 00:00:00.089
KiXGolf Score = 544

Thank you for participating in KiXtart Golf!



; begin Check Scanning
;
;!

Function a($r)

Dim $b, $d, $, $g, $i, $k[9], $t, $x, $y, $z

$b = split("._.|.||_| .....|..| ._.._||_. ._.._|._| ...|_|..| ._.|_.._| ._.|_.|_| ._...|..| ._.|_||_| ._.|_|._|")
For $a = 0 To 8
$ = ""
For $z = 0 To 2
$ = $ + SubStr($r[$z], $a * 3 + 1, 3)
Next
$k[$a]=AScan($b, $)
Next
$g = Ascan($k,~)
$a = failure
For $t = 0 to 8
If $g = $t ^ $g = -1
$i = ""
For $x = 0 to 9
$ = 1
For $z = 0 to 8
If SubStr($b[$x], $z+1, 1) = "." & SubStr($r[$z/3], $z mod 3 + $t * 3 + 1, 1) > "."
$ = 0
EndIf
Next
If $
$i = $i + $x
EndIf
Next
For $z = 1 to $i^0
$ = ""
$x = 0
For $d = 0 to 8
$y = IIf($t = $d, SubStr($i,$z,1), $k[$d])
$x = $x + (9 - $d) * $y
$ = $ + $y
Next
If $x mod 11 = 0
$a = Iif($a>Z, $, ambiguous)
; Endif
; Next
; EndiF
; Next
EndFunction

;!
;!
; end Check Scanning



Now, let's see if I can figure out what the heck this stuff does...


Edited by DrillSergeant (2008-04-22 09:33 AM)
_________________________
The Code is out there

Top
#187166 - 2008-04-22 06:44 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: DrillSergeant]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Allright then, no spoiler tags and I've seen the code...
So there is no use in thinking for myself anymore. Huzzah!
_________________________



Top
#187168 - 2008-04-22 07:05 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: DrillSergeant]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Sorry to disturb you Rogier,

but when I run your code, it chokes on test case 7 and dies on a severe array ref out of bounds error ?
_________________________



Top
#187169 - 2008-04-22 07:10 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Even Remcos code dies on the same decease \:o

Maybe I got a different kixgolf_cs.ini file?
Anyhwo, here's my case 7:

 Code:
[Test 7]Input=...........................~..|..|..|..|..|..|..|..|.|.~..|..|..|..|..|..|..|..|.|.
Output=failure


Is it the same you have?
_________________________



Top
#187187 - 2008-04-23 09:41 AM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Jochen]
RemcovC Offline
Starting to like KiXtart
*****

Registered: 2006-09-13
Posts: 174
Loc: Holland
hmmmm, as far as i can see i use the exact same test, and my code works with it ?
_________________________
It's better to have scripted and died, then to never have scripted at all

Top
#187195 - 2008-04-23 01:40 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: RemcovC]
Jochen Administrator Offline
KiX Supporter
*****

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

I'll doublecheck today in the evening on my Notebook ... ttyl
_________________________



Top
#187198 - 2008-04-23 02:55 PM Re: KiXgolf 2008 Schmankerl: Check Scanning [Re: Jochen]
RemcovC Offline
Starting to like KiXtart
*****

Registered: 2006-09-13
Posts: 174
Loc: Holland
If I don't forget, I shall post a link tonight (cet) to the ini I use
_________________________
It's better to have scripted and died, then to never have scripted at all

Top
Page 4 of 5 <12345>


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

Who's Online
0 registered and 667 anonymous users online.
Newest Members
Jojo67, MaikSimon, kvn317, kixtarts2025, SERoyalty
17873 Registered Users

Generated in 0.085 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