#97469 - 2003-01-06 03:49 AM
KiXGolf: Part 3 - And the winners are... (and alternate scoring method)
|
Sealeopard
KiX Master
   
Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
|
KiXtart Golf: Burrows-Wheeler-Transform Results
The tournament started on December 18, 2002 in this thread KiXGolf: Burrows-Wheeler Transform
The tournament package is available at http://people.bu.edu/jenmeyer/kixtart/kixgolf_bwt.zip.
Answer for the special recognition challenge was: Charles Dickens as the quote is from the first paragraphs of "A Christmas Carol".
Winner for the special recognition challenge is : Shawn, who provided the correct answer some 20 hours after the challenge was posted.
First valid KiXGolf Scorer (private coding): maciep with a KiXGolf score of 628 on December 20, about 28 hours into the challenge.
Winner of the first round (private coding): Howard Bullock with a KiXGolf score of 193 on December 29.
Winner of the second round (public coding): MightyR1 with a KiXGolf score of 191 on December 29, about one hour after Howard posted his code. MightyR1 took advantage of an apparent bug in the way ASC() handles a multi-character string.
Special recognition also goes to Howard Bullock who took his CPU beyond the normal usage pattern and had his computer runnign for over 92 hours at 100% CPU usage without damage to his computer However, his final winning code is slightly faster
A graph outlining the improvements of the various codes will follow on Monday (KiXGolf Score versus BBS Posting Time for all participants).
And now to the third part!
Part three is a test for some potential improvements to the KiXGolf scoring. Not only will you have to minimize your keystrokes, but you will also have to take into consideration memory usage and running time. The Extended KiXGolf Score will be a weighted average of those three indicators.
An update KiXGolf package including the new measurements is available at http://people.bu.edu/jenmeyer/kixtart/kixgolf_bwt.zip.
For easier coding purposes the actual BWTDecode() function has been moved into it's own external UDF file. Additionally the function can be run multiple times inside a loop to measure average performance more precisely. Timing is accurate to the millisecond and memory usage is accurate to the byte.
A text file is created automatically which contains computer information and the extended KiXGolf statistics so they can be easily posted on the KiXtart BBS.
I would like to ask all of you who participated or who are generally interested in KiXGolf to download the updated package and run it on your computers. Please post back the text file containing the enhanced performance information. You can also give the various other posted solutions a try or post your own BWTDecoder even if it didn't win anything.
I am very interested in how the Extended KiXGolf score look like on different computers and with different algorithms.
Ultimately the Extended KiXGolf Score will be calculated by testing all submitted solutions on the same computer to create a level playing field.
Also, please feel free to comment of the implementation of the extended measurements and the usefulness of them. [ 06. January 2003, 03:57: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.
|
|
Top
|
|
|
|
#97473 - 2003-01-06 04:43 AM
Re: KiXGolf: Part 3 - And the winners are... (and alternate scoring method)
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Hi Jens, the memory reading seems to be off a little. (Memory = 1245 MB) I only have 512MB unless you are counting the SWAPfile.
code:
KiXtart KiXtart Version = 4.20 Beta 1 KiXGolf Script = kixgolf_bwt.kix
Computer OS = Windows 2000 Professional CPU = Intel Pentium III Speed = 848 MHz Memory = 1245 MB
KiXGolf Scoring Engine Scoring Engine = 3.0.3
KiXtart Golf Score Tournament = KiXtart Golf: Burrows-Wheeler Transform Date & Time = 2003/01/05 22:43:25 KiXGolf Result = passed KiXGolf Score = 191 Extended KiXtart Golf Statistics Number of Repetitions = 10 Start Time = 2003/01/05 22:42:33.669 Stop Time = 2003/01/05 22:43:24.985 Running Time = 0000/00/00 00:00:51.316 KernelModeTime [ms] = 00:00:00.010 Avg. KernelModeTime [ms] = 00:00:00.001 UserModeTime [ms] = 00:00:48.389 Avg. UserModeTime [ms] = 00:00:04.838 Execution Time [ms] = 00:00:48.399 Avg. Execution Time [ms] = 00:00:04.839 delta HandleCount = -2 delta ThreadCount = -1 delta PeakWorkingSetSize [kB] = 0 delta WorkingSetSize [kB] = 188 KiXGolf Score = 191 KiXGolf Weighting = 0.5 Running Time Score [s] = 4.839 Running Time Weighting = 0.25 Memory Score [kB] = 188 Memory Weigthing = 0.25 Extended KiXGolf Score = 143.70975 Thank you for participating in KiXtart Golf!
Also, not sure why it says ten repetitions and visually displayed two string lengths. quote: C:\Data\Scripts\Golf\bwt>C:\Data\Kix2001\KiX2001.420b1\kix32 kixgolf_bwt.kix
Source string = Marley was dead: to begin with. There is no doubt whatever about 'that. The register of his burial was signed by the clergyman, the clerk, the undertaker, and the chief mourner. XXX signed it. And XXX' s name was good upon 'Change, for anything he chose to put his hand to. Old Marley was as dead as a door-nail. Mind! I don't mean to say that I know, of my own knowledge, what there is particularly dead about a door-nail . I might have been inclined, myself, to regard a coffin-nail as the deadest piece of ironmongery in the trade . But the wisdom of our ancestors is in the simile; and my unhallowed hands shall not disturb it, or the Count ry's done for. You will therefore permit me to repeat, emphatically, that Marley was as dead as a door-nail. String length = 749 Encoded string = nt..e!t.dt.....d.dtssrdr;,rddssleosdeeeeaysssetIsaaao,,essdtgftsynfseebdInttIffd,sslre,m,fy setooeoossXey,rdy,snn,ttl:e,endeeydyyyel,tuend yXn rtedwtynkfenrrrtellothrrlde ' . XXXX eeeer ennnntihhcnem hhh gMMMlp ww www hhhehhhhsr aau ien n ilnraaaeeennnoneaa nae s nhvhhhhhnrrcrh hsmhhmhggdldddddmpinwnnlbirrbrs ervtknhhhllpdgdctlllooeoolof enendnieeii rtsn Cttwtwp tt tttTttttTttct cgrt tphmssaaaamws gf Mlh hh wgdm wra illaiiiuOiwccrrrecaiaalrloy a irn e oewiiaioai---- aiAaaaiuaoggiriaou o kkuatnttttto cdpddmrgdddf oooffthnYdC mbbnln e m u euoeoeoooeotuaeeoe eueaaaaeuioeaetaaaaiaaa'aiir'ii daa ioy eieiuaauohui'suabaiiarsai ' yar s nsooc o otbooopBaeo o oolrmabmeeerlgmn Offset = 224 Decoded string = Marley was dead: to begin with. There is no doubt whatever about 'that. The register of his burial was signed by the clergyman, the clerk, the undertaker, and the chief mourner. XXX signed it. And XXX' s name was good upon 'Change, for anything he chose to put his hand to. Old Marley was as dead as a door-nail. Mind! I don't mean to say that I know, of my own knowledge, what there is particularly dead about a door-nail . I might have been inclined, myself, to regard a coffin-nail as the deadest piece of ironmongery in the trade . But the wisdom of our ancestors is in the simile; and my unhallowed hands shall not disturb it, or the Count ry's done for. You will therefore permit me to repeat, emphatically, that Marley was as dead as a door-nail. Validation = passed (decoded string is identical to encoded string)
[ 06. January 2003, 04:45: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#97476 - 2003-01-06 08:35 PM
Re: KiXGolf: Part 3 - And the winners are... (and alternate scoring method)
|
kholm
Korg Regular
   
Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
|
Jens,
Shawns code is about 850 times as fast as the winning code
Eventhough Shawns code is way faster and uses less memory it still loose in the Extended KiXGolf Score
I don’t belive it is possible to make a weighted score, so maybe you should omit the Extended KiXGolf Score
I like the other stat’s, but i agrre with Jack, the only thing we can compare during the competition is the size.
To check Shawn’s very fast script, change kixgolf_bwt.udf to:
code:
; begin Burrows-Wheeler Transfrom Decoder SHAWNS CODE
;! Function bwtdecode($s, $x) Dim $,$j,$k,$n $n = Len($s) - 1 Dim $t[$n],$l[$n],$c[255] For $ = 0 To $n $l[$] = Asc(SubStr($s,$ + 1,1)) $j = $l[$] $t[$] = $c[$j] $c[$j] = $c[$j] + 1 Next For $ = 0 To 126 $k = $k + $c[$] $c[$] = $k - $c[$] Next For $ = 0 To $n $x = $t[$x] + $c[$l[$x]] $bwtdecode = Chr($l[$x]) + $bwtdecode Next EndFunction ;! ;!
-Erik
|
|
Top
|
|
|
|
#97479 - 2003-01-06 09:45 PM
Re: KiXGolf: Part 3 - And the winners are... (and alternate scoring method)
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
My 2 cents --
I believe that there is just as much value (perhaps more) in shortening the execution time as there is in shortening the code. In a logon script, for example, there is the time it takes to execute the script as well as the time it takes to download the script. In most cases, the execution time becomes a much greater factor, especially on slow machines.
I think we would do well to focus on execution time and memory usage in addition to code length. It is easy to measure shorter code, but it is NOT easy to measure execution time because this varies on each computer. Thus, a bit of extra emphasis on this area is worthwhile.
However, I do not necessarily believe that an "Extended Golf Score" that is a composite of multiple variables would be beneficial. To the contrary, a separate score could contain the execution time, and yet another could contain memory usage, if necessary.
Optimization for each separate metric would be beneficial and could exist separately from each of the others. I believe that the only way a composite score would be beneficial is if it was tailored to each KiXgolf competition.
For example, a competition could be to sort a given multi-dimensional array with these criteria: 1. Finish in under 100 ticks on a reference PC. 2. Be shorter than 100 keystrokes.
Seperate winners would exist in each category.
Unfortunately, it would be difficult to tell your progress if your PC differs from the reference PC.
This brings me to another point: the benefit of creating a table that shows measurements of different KiXtart operations on different PC configurations.... Essentially, this would be a benchmark test. Perhaps, a benchmarking test would be worthwhile as the next KiXgolf coding challenge, though probably a little large in scope for a competition of that nature.
Brian
|
|
Top
|
|
|
|
#97481 - 2003-01-06 10:37 PM
Re: KiXGolf: Part 3 - And the winners are... (and alternate scoring method)
|
kholm
Korg Regular
   
Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
|
Jens,
I know your scoring method is experimental Why not let size and time be equally important!
Then the Extended KiXGolf Score could be then be calculated like this:
code:
$dExtScore=$dGolfScore*$dTimeScore
Scores: Shawn : Extended KiXGolf Score = 12,282 Howard: Extended KiXGolf Score = 533,279
How do we compare in the ‘secret’ part one of the competition?
The next competition could be making a fair scoring UDF for extended KiXGolf score Should the result be multiplied by CPU speed ?
|
|
Top
|
|
|
|
#97486 - 2003-01-07 12:26 AM
Re: KiXGolf: Part 3 - And the winners are... (and alternate scoring method)
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|