Page 4 of 9 « First<23456>Last »
Topic Options
#99271 - 2003-03-11 10:37 PM Re: KiXtart Golf: CD Sorter
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
You got mad? Where? I didn't see anything [Big Grin]

Based on the task description, I would say that a lower gap takes precedence over a lower Golf score. Thus , a lower average gap win if the KiXGolf score is the same.

However, then we would move away from the KiXGolf idea of "less keystrokes is better".

Damn, I hate that I didn't seem to fully thought about this.
_________________________
There are two types of vessels, submarines and targets.

Top
#99272 - 2003-03-11 11:16 PM Re: KiXtart Golf: CD Sorter
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
Jens,

This is the first chance I have had to read this. Are you demanding the optimal solution here or will any solution do?

If the optimal solution is desired then it seems to me that recasting the problem as a linear programming problem might be the best approach in terms of computational time efficiency but in terms of key strokes the brute force method would be the best approach & possibly only solution.

Your suggestion of using limited or monte-carlo searches suggests that non optimal solutions are permitted. Is this true? If so how are you balancing optimal against key stroke concerns?

I am sorry for leaping in several days into the contest but I am trying to understand what is happening & I am a bit confused.

[ 11. March 2003, 23:35: Message edited by: Jack Lothian ]
_________________________
Jack

Top
#99273 - 2003-03-11 11:46 PM Re: KiXtart Golf: CD Sorter
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Jack:

I'm interested in the optimum CD fill with the least CD gap with the lowest KiXtart score. Granted, these conditions can be contradictory as you can lower your KiXGolf score by increasing the average gaps.

This also means that two approaches could result in different CD fills and different KiXGolf scores. In this case, the approach with the lower gap (as measured/displayed by the average gap) would win. If two approaches result in the same average gap, then the lower KiXGolf score wins.

This will actually only affect the outcome of the first part of the KiXGolf challenge. As the UDFs will be public for the second part you can still be able to further optimize somebody elses approach.

This way, we are still true to the goal of the KiXGolf Tournament, namely keep the keystrokes as low as possible.

BTW, the algorithm used to create the 'Gold Standard' for the optimized CDs is a combination of Monte-Carlo-Method and Limited Search. As far as I can tell this is actually the 'perfect' solution for the provided datasets.

The only constraint that I tried to create was the prohibition of the brute-force approach as I don't see that approach as programmatically challenging.
_________________________
There are two types of vessels, submarines and targets.

Top
#99274 - 2003-03-12 12:03 AM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
back at here...
been doing some tests and still must wonder, why 100?
it already tests all the CDs...
why not 10 or 20?

it takes a lot of time to run 100 times...
or why not 1000?
_________________________
!

download KiXnet

Top
#99275 - 2003-03-12 12:13 AM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
w00t!

I ran your code jens [Mad]

it ran all the loops (100) and after that just crashed.
no data written to file.

why crashed, there is at the end a "get $sOutput" to catch the end window and it never gets there.
it never shows me any errors nor there is any kix error.
_________________________
!

download KiXnet

Top
#99276 - 2003-03-12 12:30 AM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
damn
jens, aren't you american?
wonder why no reply...

does anyone have the older versions of kixgolf_cd test-suite?
_________________________
!

download KiXnet

Top
#99277 - 2003-03-12 12:38 AM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
update.
jens, I tested your code with 4.12, 4.20 and 4.21-rc1 and all of them quit "abnormally"

in english, there is no screen output, kix does not error etc etc.

so have you built in some sort of check if my syntax is better than yours, you skip it?
_________________________
!

download KiXnet

Top
#99278 - 2003-03-12 12:46 AM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
more to it.
if I add more songs (like add new dummy ",") at the end of list, your code will die with kixtart error array reference out of bounds.

if I then remove one element from the outcoming list, your script executes.
ofcourse then the cd's are not optimized.

so, PLEASE, could you check your code.

[edit]
even more, updated your files again and even downloaded kix32.exe to test from console.
full output is:
quote:

Running loop #1
Processing CD #1
Processing CD #2
Processing CD #3
Processing CD #4
Processing CD #5
Processing CD #6
Processing CD #7
Processing CD #8
Processing CD #9
Processing CD #10
Processing CD #11
Processing CD #12

C:\Documents and Settings\niemjo\Desktop\golf>

now, I keep on waiting until you fix it.
until that my current by myself validated code is 245 strokes.

[ 12. March 2003, 00:55: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#99279 - 2003-03-12 01:34 AM Re: KiXtart Golf: CD Sorter
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
I had the same problem. I think it quit on this line.
code:
  
$sOutput=$sOutput+@CRLF+'CD Gap = '+formatnumber($adCDGap[$iCDNum-1],2)

It also quit on more lines farther down in the script if i commented that line out. Everytime line the script quit on was using the formatnumber() function.

I just removed all references to formatnumber(). For example, I changed the above line to

code:
  
$sOutput=$sOutput+@CRLF+'CD Gap = '+$adCDGap[$iCDNum-1]

That seems to have fixed it for me.
_________________________
Eric

Top
#99280 - 2003-03-12 02:03 AM Re: KiXtart Golf: CD Sorter
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Okay, guys, I can reproduce the problem. I'll work on a fix. I haven't seen that before when I was using arbitry lists of indices to test the validation routine.
_________________________
There are two types of vessels, submarines and targets.

Top
#99281 - 2003-03-12 02:51 AM Re: KiXtart Golf: CD Sorter
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
I think I've found the problem. It look to me like a bug in the FORMATNUMBER function that only surface if you try to format the number to x decimal places and this resulting number would result in being effectively '0'
See the code for an example
code:
$a=0.1
? 'a='+$a
? 'formatnumber(a)='+formatnumber($a,1)
$a=0.11
? 'a='+$a
? 'formatnumber(a)='+formatnumber($a,1)
$a=0.01
? 'a='+$a
? 'formatnumber(a)='+formatnumber($a,1)

I have already corrected the code and uploaded an updated KIXGOLF_CD.ZIP at http://people.bu.edu/jenmeyer/kixtart/kixgolf_cd.zip

The buggy FORMATNUMBER() function has been replaced by a homegrown NumberFormat() UDF which should also correctly set either a '.' or ',' decimal indicator based on the users locale settings.

I will also post a report in the BETA forum as Ruud post about the already mentioned FORMATNUMBER() problem with '0' does not address this particular problem.
_________________________
There are two types of vessels, submarines and targets.

Top
#99282 - 2003-03-12 04:55 AM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
now we are talking!

jens, don't remember to add that even though it's buggy it does not produce any error, it just crashes kix.
_________________________
!

download KiXnet

Top
#99283 - 2003-03-12 05:14 AM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, thanks jens...
here is the results for the code I tried to approve yesterday:

quote:


CD #1
Title = 70's Super Funk
Song #s = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,17
CD Length = 44.99
CD Gap = 0.01
CD Gap [%] = 0.02
Opt. Length = 45.00
CD can be further optimized by 0.01%
A valid CD has been created

CD #2
Title = Partridge Family Unlimited
Song #s = 1,2,3,4,6,7,8,10
CD Length = 44.93
CD Gap = 0.07
CD Gap [%] = 0.16
Opt. Length = 44.94
CD can be further optimized by 0.02%
A valid CD has been created

CD #3
Title = Three Tenors in Antarctica, Again!
Song #s = 1,2,3,4,5,6,7,9,10,14
CD Length = 44.81
CD Gap = 0.19
CD Gap [%] = 0.42
Opt. Length = 44.96
CD can be further optimized by 0.33%
A valid CD has been created

CD #4
Title = Support Your Local KiXGolfer
Song #s = 1,37
CD Length = 44.20
CD Gap = 0.80
CD Gap [%] = 1.78
Opt. Length = 44.70
CD can be further optimized by 1.12%
A valid CD has been created

CD #5
Title = ABBA Bubba!
Song #s = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,27
CD Length = 44.97
CD Gap = 0.03
CD Gap [%] = 0.06
Opt. Length = 44.96
CD has been fully optimized
A valid CD has been created

CD #6
Title = Songs You Never Wanted Your Teenage Daughter To Know About
Song #s = 1,2,4,5,7,8
CD Length = 44.60
CD Gap = 0.40
CD Gap [%] = 0.89
Opt. Length = 44.50
CD has been fully optimized
A valid CD has been created

CD #7
Title = Moon Rocks!
Song #s = 1,2,3,4,5,6,7,9,10,12,13,14,16,17,27
CD Length = 44.99
CD Gap = 0.01
CD Gap [%] = 0.01
Opt. Length = 45.00
CD can be further optimized by 0.01%
A valid CD has been created

CD #8
Title = Ruud's Favs
Song #s = 1,2,3,4,5,6,7,8,9,10,11,12,13,14
CD Length = 42.29
CD Gap = 2.71
CD Gap [%] = 6.02
Opt. Length = 44.58
CD can be further optimized by 5.15%
A valid CD has been created

CD #9
Title = MTV Presents: KiXtart Rulez!
Song #s = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,21,22,23,24,25,26,27,28,30,31,32,33,35,46
CD Length = 45.00
CD Gap = 0.00
CD Gap [%] = 0.00
Opt. Length = 45.00
CD can be further optimized by 0%
A valid CD has been created

CD #10
Title = Songs From the Programmer's Abyss
Song #s = 25
CD Length = 45.00
CD Gap = 0.00
CD Gap [%] = 0.00
Opt. Length = 45.00
CD has been fully optimized
A valid CD has been created

CD #11
Title = Just Noise (100% Pure White Noise)
Song #s = 1,51,52,53,54
CD Length = 44.25
CD Gap = 0.75
CD Gap [%] = 1.67
Opt. Length = 44.25
CD can be further optimized by 0%
A valid CD has been created

CD #12
Title = Cazy Jens And the KIXGolfers
Song #s = 1,2,3,4,5,6,7,8,9,88
CD Length = 44.99
CD Gap = 0.01
CD Gap [%] = 0.02
Opt. Length = 45.00
CD can be further optimized by 0.02%
A valid CD has been created

Average CD Length = 44.59
Average Gap = 0.41
Average Gap [%] = 0.92

KiXtart
KiXtart Version = 4.21 Release Candidate 1
KiXGolf Script = kixgolf_cd.kix

Computer
OS = Windows 2000 Professional
CPU = Intel Pentium III
Speed = 797 MHz
Memory = 375 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: CD Sorter
Processing Start = 2003/03/12 06:02:11.312
Processing End = 2003/03/12 06:17:33.659
Duration = 0000/00/00 00:15:22.346
# Loops = 100
# Processed CDs = 12
# Valid CDs = 12
# Optimized CDs = 3
KiXGolf Result = Valid CD Sorter (Room For Improvement)
KiXGolf Score = 245

Thank you for participating in KiXtart Golf!

_________________________
!

download KiXnet

Top
#99284 - 2003-03-12 05:54 AM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
jens, I still get array reference out of bounds.
kixgolf_cd.kix line 115.
last thing in console:
quote:

CD #2
Title = Partridge Family Unlimited
Song #s = 1,2,3,4,6,7,8,10
CD Length = 44.93
CD Gap = 0.07
CD Gap [%] = 0.16
Opt. Length = 44.94
CD can be further optimized by 0.02%
A valid CD has been created

that error comes due my test code that has added "0" song.
should it still crash?
could the console say something?

{edit}
also, what is this:
code:
CD #11
Title = Just Noise (100% Pure White Noise)
Song #s = 1,51,52,53,54
CD Length = 44.25
CD Gap = 0.75
CD Gap [%] = 1.67
Opt. Length = 44.25
CD can be further optimized by 0%
A valid CD has been created

eh?
how much is 0%?
should I read it that I should make my collection better than yours to be approved as optimized?

[ 12. March 2003, 07:29: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#99285 - 2003-03-12 10:53 AM Re: KiXtart Golf: CD Sorter
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Nuts.

Ran to completion and then no output. Removed the formatnumber and restarted.

May not going to get an opportunity to optimise at this rate [Frown]

Top
#99286 - 2003-03-12 10:55 AM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
richard, do you still run with brute force?
I used that approach and it took t000 much time so made some cuts.

now one cd takes about 3-5 seconds at most.
_________________________
!

download KiXnet

Top
#99287 - 2003-03-12 11:15 AM Re: KiXtart Golf: CD Sorter
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Yep, still using brute force with some speed up techniques.

If I pre-sort the arrays I can make massive improvements in speed, but with a huge overhead in code.

If I convert to integer I can probably make similar improvements, again with code overhead.

At the moment I just want it to run to completion so I can check that the algorithm is OK before optimising.

Run times aren't too bad. Latest run (still active) is:
code:
Loop #1 started @ 09:00:28
CD #1 @ 09:00:28
CD #2 @ 09:02:18
CD #3 @ 09:02:20
CD #4 @ 09:02:25
CD #5 @ 09:02:34
CD #6 @ 09:02:37
CD #7 @ 09:02:37
CD #8 @ 09:02:44
CD #9 @ 09:05:32
CD #10 @ 10:07:56
CD #11 @ 10:08:01

CD#9 is the hardest so far at just over the hour.

I think I may be having rounding problems with the floating point which are causing some comparison problems. For instance, one of my checks halts processing down a tree when the gap become negative (too many tracks).

This is a problem when the values get buggered up internally, so instead of "1" you have "0.99999976234". Substract "1" from it and you will get a negative value which will cause the sequence to be deemed invalid.

Maybe I will have to switch to integer sooner rather than later...

Top
#99288 - 2003-03-12 11:35 AM Re: KiXtart Golf: CD Sorter
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Completed and the mainn script crashed.

Will d/l the latest package and try again

Top
#99289 - 2003-03-12 11:48 AM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, making them integer with say 3 decimal points should make it faster.
but indeed it will also cause a lot of extra code.

well, you boys can be developing now.
my code is fully compressed now and it can't even be optimized any less without increasing of the code size dramatically.

so, if someone goes under 240 strokes with good CD times, I give up.

good luck to ya.
_________________________
!

download KiXnet

Top
#99290 - 2003-03-13 12:10 AM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, as could not get my hands on the older versions can't say for sure but AFAIK the problem is the bug.

get the newist version and if there is still problems, we might get to report new bug [Big Grin]
_________________________
!

download KiXnet

Top
Page 4 of 9 « First<23456>Last »


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

Who's Online
1 registered (Allen) and 496 anonymous users online.
Newest Members
Raoul, Timothy, Jojo67, MaikSimon, kvn317
17875 Registered Users

Generated in 0.178 seconds in which 0.127 seconds were spent on a total of 12 queries. Zlib compression enabled.

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