Page 5 of 9 « First<34567>Last »
Topic Options
#99291 - 2003-03-13 12:42 AM Re: KiXtart Golf: CD Sorter
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Well, a trial run (first 5 CDs) optimised all of them.

Full run in progress now.

Top
#99292 - 2003-03-12 01:46 PM Re: KiXtart Golf: CD Sorter
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
At last! A full run.

Optimised 11 CDs - the one that is not optimised can be optimised by a further "0%" apparently.

How do I do that then?

Here's the results. The golf score is not interesting as the UDF is still full of long variable names and debug code.

quote:
CD #1
Title = 70's Super Funk
Song #s = 20,19,16,15,13,7,6,5
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 #2
Title = Partridge Family Unlimited
Song #s = 19,9,8,4,3,1
CD Length = 45.00
CD Gap = 0.00
CD Gap [%] = 0.00
Opt. Length = 44.94
CD has been fully optimized
A valid CD has been created

CD #3
Title = Three Tenors in Antarctica, Again!
Song #s = 15,14,13,12,11,10,8,6,5,4,2,1
CD Length = 45.00
CD Gap = 0.00
CD Gap [%] = 0.01
Opt. Length = 44.96
CD has been fully optimized
A valid CD has been created

CD #4
Title = Support Your Local KiXGolfer
Song #s = 40,39,38,37,36,35,34,25
CD Length = 44.80
CD Gap = 0.20
CD Gap [%] = 0.44
Opt. Length = 44.70
CD has been fully optimized
A valid CD has been created

CD #5
Title = ABBA Bubba!
Song #s = 30,29,28,27,26,25,24,23,22,21,20,19,16,12,11,9,8,6,4
CD Length = 45.00
CD Gap = 0.00
CD Gap [%] = 0.00
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 = 8,7,5,4,2,1
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 = 40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,18,
13,11,9,6,3,2
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 #8
Title = Ruud's Favs
Song #s = 20,19,18,17,16,15,10,9,8,7,6,5,4,3,2
CD Length = 44.58
CD Gap = 0.42
CD Gap [%] = 0.92
Opt. Length = 44.58
CD can be further optimized by 0%
A valid CD has been created

CD #9
Title = MTV Presents: KiXtart Rulez!
Song #s = 50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,
28,27,25,22,21,20,19,16,13,5
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 #10
Title = Songs From the Programmer's Abyss
Song #s = 50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,
28,27,26,24,23,22,21,20,19,16,15,14,13,8,7,6,4
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 = 70,69,68,67,50
CD Length = 44.25
CD Gap = 0.75
CD Gap [%] = 1.67
Opt. Length = 44.25
CD has been fully optimized
A valid CD has been created

CD #12
Title = Cazy Jens And the KIXGolfers
Song #s = 100,99,98,97,96,95,94,93,85,62,41
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

Average CD Length = 44.85
Average Gap = 0.15
Average Gap [%] = 0.33

KiXtart
KiXtart Version = 4.20
KiXGolf Script = kixgolf_cd.kix

Computer
OS = Windows XP Professional
CPU = Intel(R) Pentium(R) 4 CPU 2.00GHz
Speed = 2000 MHz
Memory = 247 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: CD Sorter
Processing Start = 2003/03/12 11:10:55.056
Processing End = 2003/03/12 12:47:29.431
Duration = 0000/00/00 01:36:34.375
# Loops = 1
# Processed CDs = 12
# Valid CDs = 12
# Optimized CDs = 11
KiXGolf Result = Valid CD Sorter (Room For Improvement)
KiXGolf Score = 549

Thank you for participating in KiXtart Golf!

So, the question is what does the "0%" mean? Can this disk be optimised further or not?
The optimal length is 44.58 and the created cd is 44.58 (CD#8)

Looks to me like is should be 12 optimised CDs.

[ 12. March 2003, 13:48: Message edited by: Richard H. ]

Top
#99293 - 2003-03-12 01:50 PM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
same question I had...
have to look up
_________________________
!

download KiXnet

Top
#99294 - 2003-03-12 01:55 PM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
optimal results with cd8:
Songs=3,20,2,11,7,6,19,10,1,5,8,13,14,9,17

would need to calc those values but I think it's all about floating point overflow.
it can also be that jens is only calculating for say 0.001 and your code is 0.0000001 better or worse in time...
_________________________
!

download KiXnet

Top
#99295 - 2003-03-12 02:01 PM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
now as I think of it.
yeah.
the screen only displays the seconds but he most likely has a $optimal>$UDFprovided switch which does calc with floats.
_________________________
!

download KiXnet

Top
#99296 - 2003-03-12 02:26 PM Re: KiXtart Golf: CD Sorter
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
CD#8 only takes 3 mins to calculate so I ran again.

CD size generated is 44.5842, so my result is .0042 better than the optimal [Eek!]

Top
#99297 - 2003-03-12 02:37 PM Re: KiXtart Golf: CD Sorter
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Lonk / Rich,

You guys are running like crazy...

I'm a bit stuck [Frown]
Will start thinking of new algorithm!
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#99298 - 2003-03-12 02:52 PM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
richard, did you calc also what is the actual time for the optimal?
it can be also something like 44.5847
_________________________
!

download KiXnet

Top
#99299 - 2003-03-12 03:01 PM Re: KiXtart Golf: CD Sorter
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Ok, I'm in a bit of a quandry now.

I've got a solution that fully optimises all CDs.

It takes about 1 hour 40 minutes on a machine that I use for work, so I'm not really interested in running it 100 times to generate exactly the same results. Just take the result and multiply by 100 for a worst case run time.

Now, do I start cutting the code to get a lower byte count, or do I start adding code to get a faster executing script?

Do I change the algorithm for one which produces a less accurate result with a smaller script or faster run time?

Top
#99300 - 2003-03-12 03:02 PM Re: KiXtart Golf: CD Sorter
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
quote:
richard, did you calc also what is the actual time for the optimal?
it can be also something like 44.5847

No, fair point. I'll do that now.

Top
#99301 - 2003-03-12 03:19 PM Re: KiXtart Golf: CD Sorter
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
This is England calling...

The result in reverse order for CD#8 is...
code:
CD #8
Title = Ruud's Favs
Song #s = 20,19,18,17,16,15,10,9,8,7,6,5,4,3,2
CD Length = 44.58
CD Length = 44.5842
CD Gap = 0.42
CD Gap [%] = 0.92
Opt. Length = 44.58
Opt. Length = 44.5842
CD can be further optimized by 0%
A valid CD has been created

The lengths are printed twice - the second length is unformatted.

So they appear to be the same, although the script insists that it can be further optimised.

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

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, it's bug in jens' code.

what comes to the task and competition...
I think we have no competition possible anymore or if we do, we need to do 3 different goals:
-fastest
-most accurate
-smallest

my current code combines these all but we can't compare our scripts in any way if there is no one clear goal. which we don't have now... I quess.

or was it that to do a script that executes 100 loops before next sunday and does that in accepted way and is smallest.

I have already created my current golf code.
if we go for valid and small, this should be unbeatable:

[edit, removed shitty stuff as proven my point]

hehee!
I'm good [Big Grin]

[ 12. March 2003, 18:20: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#99303 - 2003-03-12 04:14 PM Re: KiXtart Golf: CD Sorter
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Joeel: Your code won't stand up to the competition as everybody else has better optimized code, which is part of the requirements.

I've also got word back from Ruud, he confirmed that there's a bug in the FORMATNUMBER() function. He has already provided me with a private build that should eliminate the bug. However, I will have to test this first and report back to Ruud.

With regards to the 'loop 100 times' issue: The 'run time' display will show whether your code can run within the allotted time, so I'm flexible on that one. I choose '100' as an relatively arbitrary number which would translate to about 2 hours per loop. Two hours seemed very reasonable to me.

I will beef up the reporting part a little bit so that the processing time will also be reported on a per-CD basis.

I'm also going to investigate the 'Can be optimized by 0.00%' issue. However, I believe it's just a display problem, as the length calculations are accurate to four digits but I'm only displaying two digits. I will modify the code accordingly.

The determination whether there's room for improvement is water-tight, however, I will double-check this, too.

[ 12. March 2003, 16:41: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#99304 - 2003-03-12 04:19 PM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
eh?
it does not stand?
so new rule we got here... I see.

the code has to be 100% optimized and shortest to be the winner.
ok, re-doing my codes...
_________________________
!

download KiXnet

Top
#99305 - 2003-03-12 04:24 PM Re: KiXtart Golf: CD Sorter
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
It does not have to be 100% optimized, however the rules do state
quote:
More precisely, given a comma-delimited list of arbitrary indices, songList, find an array of indices, indexList, such that
  • sum(songList(indexList)) <= mediaLength, and
  • gap = (mediaLength - sum(songList(indexList))) / mediaLength is minimized.

Without this requirement I could just return one song per CD and achieve a low KiXGolf score. [Wink]
_________________________
There are two types of vessels, submarines and targets.

Top
#99306 - 2003-03-12 04:35 PM Re: KiXtart Golf: CD Sorter
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
quote:
I'm also going to investigate the 'Can be optimized by 0.00%' issue. However, I believe it's just a display problem, as the length calculatiosn are accurate to foru digits but I'm only displaying two digits. I will modify the code accordingly.

The determination whether there's room for improvement is water-tight, however, I will double-check this, too.

Eh? How do you mean?

If you look ate the result I posted above (CD#8) the optimal value and the value I calculated are the same to 4 decimal places, but I still get a "could be optimised further". This gives me a "room for improvement", as it is the only CD in the 12 which reports a problem.

Top
#99307 - 2003-03-12 04:42 PM Re: KiXtart Golf: CD Sorter
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Richard: I'll look into this.
_________________________
There are two types of vessels, submarines and targets.

Top
#99308 - 2003-03-12 05:31 PM Re: KiXtart Golf: CD Sorter
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Richard: I've rechecked your results and...
You've created a perfect CD Sorter!

The solution you've provided fully optimizes all CDs based on the 'Gold Standard' that was provided as a comparison. Interestingly, your song lists are not identical to the 'Gold Standard', especially if you look at the reuslts for CD 10. The 'Gold Standard' chooses to use only song 25.

However, you managed to improve the reference solution on a total of 10 CDs!

I have updated the output generator of the KIXGOLF_CD.KIX script. It will now give more detailed feedback about the number of optimized CDs, and whether you've beaten the gold Standard or completely filled the CD. It will also print the duration needed to compute each Cd optimization.
_________________________
There are two types of vessels, submarines and targets.

Top
#99309 - 2003-03-12 06:18 PM Re: KiXtart Golf: CD Sorter
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
jens, indeed... my last ironic example was doing a match against any non-zero value and returned that.
anyway, I'm still not clear with the ruling.
this far richard has the gold as what comes to filling the cd.
on the other hand I have the shortest code which compromises the disc usage in benefit of better score.

as I come to this, my shortest code gets to:
code:
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 07:09:05.224
Processing End = 2003/03/12 07:24:12.879
Duration = 0000/00/00 00:15:07.655
# Loops = 100
# Processed CDs = 12
# Valid CDs = 12
# Optimized CDs = 3
KiXGolf Result = Valid CD Sorter (Room For Improvement)
KiXGolf Score = 243

Thank you for participating in KiXtart Golf!

_________________________
!

download KiXnet

Top
#99310 - 2003-03-12 06:42 PM Re: KiXtart Golf: CD Sorter
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
However, Richard has a lower average gap, thus he minimized the gap better than you did.

If your average gap would be as good as Richards, then the KiXGolf score would be the deciding factor.
_________________________
There are two types of vessels, submarines and targets.

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


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

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

Generated in 0.078 seconds in which 0.029 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