in reply to Re: Challenge: Letter Power
in thread Challenge: Letter Power
It can be show that a better solution exists (not necessarily best):modems decamp saddens invokes paw odysseys fuddled absorbs delude eyes +ore cleat cloaks clincher sometime mating bushel shinnied probably fuckers lummo +xes uptown caseload hawker sleekest buzzard bartered songbird pilgrim steepen pithily bruiser shirking kin +ks hooking chalice town clutch mongrels frig pine fibre spindles doughy printing burned rendered warhorse spooked glumness solarium baseless roared steward lo +am carillon ratting inhabits examiner marshals rockiest jemmied zappy alcohols fixers refiners modeler outlook pastels spin prior paired gli +ders wags demean intend stalest streaker twinset equated negated quenched sheered accord shambles capably raffia page washer brownie hussar etches tethe +rs track lifts ricks knows giblets dozy pacify exhausts haulage squires bologna stacking __DATA__ 335 : [ eyesore sleekest bartered printing rendered marshals alcohols +streaker shambles exhausts ] 340 : [ eyesore sleekest steepen printing rendered marshals alcohols s +treaker shambles exhausts ] 374 : [ eyesore sleekest steepen spindles rendered marshals alcohols s +treaker shambles exhausts ] 402 : [ eyesore sleekest steepen spindles baseless marshals alcohols s +treaker shambles exhausts ] 424 : [ eyesore sleekest steepen spindles baseless marshals refiners s +treaker shambles exhausts ] 428 : [ eyesore sleekest steepen spindles baseless marshals pastels st +reaker shambles exhausts ] 434 : [ eyesore sleekest steepen spindles baseless marshals pastels sh +eered shambles exhausts ]
438 : [ eyesore sleekest steepen spindles baseless rockiest refiners s +heered tethers exhausts ]
My heuristic solution is very similar to yours. Rather than picking the best individual score from each group, I calculate the letter frequency across all words. Then I select the word from each group that has the highest score based on that frequency analysis. I have also modified the refinement loop to limit the number of loops to handle the edge case where picking the best individual scores is the worst thing to do.
This way you pick a "good enough" score in a reasonable time frame no matter what.LOOP: for (1 .. $max_loops) { # your refinement loop if ($better) { # update best next LOOP; } # end of your refinement loop last; }
I am now going to try and figure out if I can do a smart exhaustive search to guarantee best solution in a reasonable runtime (less than 2 hours). If I can, I will post a new thread comparing naive brute force, optimized brute force, heuristic, optimized heuristic.
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Challenge: Letter Power
by BrowserUk (Patriarch) on Apr 18, 2009 at 04:41 UTC | |
by Limbic~Region (Chancellor) on Apr 18, 2009 at 14:18 UTC | |
by BrowserUk (Patriarch) on Apr 18, 2009 at 16:44 UTC | |
by Limbic~Region (Chancellor) on Apr 18, 2009 at 18:15 UTC | |
by BrowserUk (Patriarch) on Apr 19, 2009 at 10:52 UTC | |
|