#69332 - 2002-08-24 07:50 PM
Re: KiXtart Golf Tournament IV: Anagrams (Part 2, The code!)
|
Anonymous
Anonymous
Unregistered
|
I found this from a review of the Chambers dictionary
Most mutual anagrams (9) aster a plant earst formerly reast to become rancid resat sat an examination again stare a fixed look stear a young ox strae dried stalks of corn Taser a small gunlike device teras a monstrosity
|
Top
|
|
|
|
#69333 - 2002-08-25 05:19 PM
Re: KiXtart Golf Tournament IV: Anagrams (Part 2, The code!)
|
Sealeopard
KiX Master
Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
|
Time's up, and here are the results:
Part I: 1) 487 = AJH 2) 495 = Lonkero 3) 625 = Howard Bullock 4) 742 = Sealeopard
This makes AJH the winner of the first round with Lonkero a close second.
Part II 454 = Fernando Madruga 457 = MightyR1 (based on Fernando Madruga) 460 = Sealeopard (based on Fernando Madruga) 463 = Fernando Madruga (based on Lonkero) 466 = Lonkero 471 = Lonkero (based on AJH) 472 = AJH 484 = Lonkero (based on AJH) 487 = AJH 495 = Lonkero 554 = Richard Howarth 625 = Howard Bullock 702 = Sealeopard
First of all, welcome to our newest competitor Fernando Madruga, who some of you already know from the Win32 Perl mailing list.
Secondly, he provided the shortest script for the second part for a final winning score of 454.
I will also incorporate some improvements into the next KiXtart Golf namely a) the inclusion of the KiXtart version used to run the particualr script, b) if a posted script is being improved then the author of the originating script must be named, and c) the original author of the script with the final lowest score will get credits, too.
Thus, we would end up with three potential winners: 1) Winner of KiXtart Golf Part I 2) Winner of KiXtart Golf Part II 3) Original Author of winning script for 2) [ 25. August 2002, 20:12: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.
|
Top
|
|
|
|
#69334 - 2002-08-25 07:29 PM
Re: KiXtart Golf Tournament IV: Anagrams (Part 2, The code!)
|
Fernando Madruga
Starting to like KiXtart
Registered: 2002-08-21
Posts: 149
Loc: Coimbra.Portugal.Europe.Earth....
|
Hi folks!
I took some time to do some anagraming in perl and I found the following anagrams with 10 or more words based on an english word list file (YAWL) that I download from Yet Another Word List. I then made a perl program to calculate all possible anagrams and fed this file containing more than 263.000 words to it. Here are the results for words with 10 or more anagrams:
code:
010:angries earings erasing gainers graines reagins regains reginas searing seringa 010:angriest astringe ganister gantries granites ingrates rangiest reasting stearing tasering 010:easting eatings gainest genista ingates ingesta seating tangies teasing tsigane 010:ester reest reset retes steer stere teers teres terse trees 010:estrin inerts insert inters niters nitres sinter strine triens trines 010:lapse leaps pales peals pelas pleas salep sepal spale speal 011:anestri antsier nastier ratines resiant retains retinas retsina stainer starnie stearin 011:palest palets pastel peltas petals plaste plates pleats septal staple tepals 012:least leats salet setal slate stale steal stela taels tales teals tesla 013:alerts alters artels estral laster rastle ratels salter slater staler stelar talers tarsel 013:apers apres asper pares parse pears prase presa rapes reaps spaer spare spear 013:arets aster earst rates reast resat stare stear strae tares taser tears teras
So, if these were to be taken into consideration and the anagram_test script were to be changed to use one of these, then the final scores would be somewhat changed because the final set of codes (after CHR($d) changed into $d) won't work with these...
If someone wants the perl code to play around (and yes, I know this is not a perl BB, but this kind of script would have taken me AGES to do in KiXtart!), please let me know and I'll post it. On my PC (a PIII@1.100MHz with 512MB) only takes 11 seconds to read in the 263.000+ words file and put out the 20.639 possible anagrams!
You can even use it just to look for anagrams for a given word, or restrict anagrams only for words between x and y characters, based on the dictionary provided. (And, of course, you can use your own dictionary!)
Also, back to the contest, where it says: quote: 463 = Fernando Madruga
, it should say 463 = Fernando Madruga (based on 466 by Lonkero).
Later, Madruga [ 25. August 2002, 19:33: Message edited by: Fernando Madruga ]
_________________________
Later,
[b]Mad[/b]ruga
|
Top
|
|
|
|
#69337 - 2002-08-26 08:30 PM
Re: KiXtart Golf Tournament IV: Anagrams (Part 2, The code!)
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Man! I missed it.. was too busy keeping up with girlfriend/work duties/family stuff.. Someone notify me next time you hold one of these!
Brian
|
Top
|
|
|
|
#69339 - 2002-08-26 08:52 PM
Re: KiXtart Golf Tournament IV: Anagrams (Part 2, The code!)
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
I suppose I'll have to check in more often. It's nice stopping by and seeing all the hard work you guys have put into coding for kixtart.
Brian
|
Top
|
|
|
|
#69342 - 2002-08-27 01:16 AM
Re: KiXtart Golf Tournament IV: Anagrams (Part 2, The code!)
|
Fernando Madruga
Starting to like KiXtart
Registered: 2002-08-21
Posts: 149
Loc: Coimbra.Portugal.Europe.Earth....
|
Well, since nobody else seems willing to do it, I decided to grab anagram_test.kix and "update" it to include one of the 13 word anagrams. (look below for updated script) As for the results (still running under 4.11 RC 1 ):
code:
feeling fleeing snooped spooned last salt slat ablest bleats stable tables alerts alters artels estral laster rastle ratels salter slater staler stelar talers tarsel UDF passed regular input array test admirer married aphrodite atrophied perseus peruses filets itself stifle hoes hose shoe ladder larded raddle filters lifters stifler trifles parental parlante paternal prenatal portes poster presto repost UDF passed another regular input array test UDF passed empty input array test UDF passed empty input string test UDF passed no anagram input array test The Anagram() UDF passed validation kix32 Kixgolf3.kix $f=anagram_test.kix KixGolf v3.0.3 score = 466, running under KiXtart v4.11 RC 1 ----------------------------------- feeling fleeing snooped spooned last salt slat ablest bleats stable tables alerts alters artels estral laster rastle ratels salter slater staler stelar talers tarsel UDF passed regular input array test admirer married aphrodite atrophied perseus peruses filets itself stifle hoes hose shoe ladder larded raddle filters lifters stifler trifles parental parlante paternal prenatal portes poster presto repost UDF passed another regular input array test UDF passed empty input array test UDF passed empty input string test UDF passed no anagram input array test The Anagram() UDF passed validation kix32 Kixgolf3.kix $f=anagram_test.kix KixGolf v3.0.3 score = 463, running under KiXtart v4.11 RC 1 ----------------------------------- feeling fleeing snooped spooned last salt slat ablest bleats stable tables alerts alters artels estral laster rastle ratels salter slater staler stelar talers tarsel UDF passed regular input array test admirer married aphrodite atrophied perseus peruses filets itself stifle hoes hose shoe ladder larded raddle filters lifters stifler trifles parental parlante paternal prenatal portes poster presto repost UDF passed another regular input array test UDF passed empty input array test UDF passed empty input string test UDF passed no anagram input array test The Anagram() UDF passed validation kix32 Kixgolf3.kix $f=anagram_test.kix KixGolf v3.0.3 score = 460, running under KiXtart v4.11 RC 1 -----------------------------------
alerts alters artels estral laster rastle ratels salter slater staler stelar talers tarsel The output array element alerts alters artels estral laster rastle ratels salter slater staler stelincorrect tarsel is feeling fleeing The output array element feeling fleeing is incorrect snooped spooned The output array element snooped spooned is incorrect last salt slat The output array element last salt slat is incorrect ablest bleats stable tables The output array element ablest bleats stable tables is incorrect UDF failed regular input array test admirer married aphrodite atrophied perseus peruses filets itself stifle hoes hose shoe ladder larded raddle filters lifters stifler trifles parental parlante paternal prenatal portes poster presto repost UDF passed another regular input array test UDF passed empty input array test UDF passed empty input string test UDF passed no anagram input array test The Anagram() UDF failed validation kix32 Kixgolf3.kix $f=anagram_test.kix KixGolf v3.0.3 score = 457, running under KiXtart v4.11 RC 1 -----------------------------------
alerts alters artels estral laster rastle ratels salter slater staler stelar talers tarsel The output array element alerts alters artels estral laster rastle ratels salter slater staler stelincorrect tarsel is feeling fleeing The output array element feeling fleeing is incorrect snooped spooned The output array element snooped spooned is incorrect last salt slat The output array element last salt slat is incorrect ablest bleats stable tables The output array element ablest bleats stable tables is incorrect UDF failed regular input array test admirer married aphrodite atrophied perseus peruses filets itself stifle hoes hose shoe ladder larded raddle filters lifters stifler trifles parental parlante paternal prenatal portes poster presto repost UDF passed another regular input array test UDF passed empty input array test UDF passed empty input string test UDF passed no anagram input array test The Anagram() UDF failed validation kix32 Kixgolf3.kix $f=anagram_test.kix KixGolf v3.0.3 score = 454, running under KiXtart v4.11 RC 1 -----------------------------------
So, as you all can see from this long post, the last code passing all tests is 460 by sealeopard based on ??? by ??? (getting too lazy to look elsewhere for this info! )
HTH, Madruga
P.S.: Forgot to include the updated anagram_test. In order to keep this short, I'll just include the two changed lines from the 1st set of tests:
code:
; these were wrapped for display! $inputarray='gas,bleats,stable,fleeing,artels,ratels,alters,talers, ablest,spiff,hack,stelar,staler,tables,feeling,spooned,snooped,grep, estral,alerts,tarsel,slat,salt,last,salter,slater,laster,rastle,drive' $correctoutput='feeling fleeing,snooped spooned,last salt slat, ablest bleats stable tables,alerts alters artels estral laster rastle ratels salter slater staler stelar talers tarsel'
[ 27. August 2002, 01:22: Message edited by: Fernando Madruga ]
_________________________
Later,
[b]Mad[/b]ruga
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(Allen)
and 466 anonymous users online.
|
|
|