In the example presented by Tanktalus, the candidate word list to choose from had already been tailored to favor a high density of the letter a. I wondered what would happen if you were to generalize the problem. We both agreed that it would be too difficult to expect a computer to find words appropriate to fit a random category so instead, I have chosen to choose words at random.
I have already explored a number of heuristic approaches for making a "best guess", refinement algorithms to improve a "best guess" and a naive brute force implementation in C to perform an exhaustive search to produce the guaranteed optimal solution. I will present all of that in replies to this main thread for those looking for inspiration or validation.
Develop a pure perl solution that, in roughly 60 seconds, will provide a high scoring solution to a given puzzle. I will be providing a number of canned puzzles with the known best solution as well as code you can use to generate your own. There is no penalty for prep work behind the scenes so if you have some ingenious idea to construct a database of solutions or what not - by all means. Just keep in mind that the presented solution must be pure perl and finish within roughly 60 seconds.
Note: I will be adding my own contributions later today but most of my ideas have already been discussed over in the original challenge.Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Challenge: Letter Power Revisited (Brute Force)
by Limbic~Region (Chancellor) on Apr 20, 2009 at 14:24 UTC | |
by gwadej (Chaplain) on Apr 20, 2009 at 14:55 UTC | |
by Limbic~Region (Chancellor) on Apr 20, 2009 at 18:15 UTC | |
|
Challenge: Letter Power Revisited (Sample Puzzles)
by Limbic~Region (Chancellor) on Apr 20, 2009 at 14:25 UTC | |
|
Challenge: Letter Power Revisited (Generate Your Own Puzzle)
by Limbic~Region (Chancellor) on Apr 20, 2009 at 14:26 UTC | |
|
Challenge: Letter Power Revisited (Heuristics)
by Limbic~Region (Chancellor) on Apr 20, 2009 at 22:27 UTC | |
|
Re: Challenge: Letter Power Revisited
by delirium (Chaplain) on Apr 21, 2009 at 20:02 UTC |