Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Stumbled on this (and the previous) old thread. Thought I could provide some input even if the thread is dead.

Strategy in this thread up to this point:

  1. Find all possible candidate words, given correct guesses so far. e.g.: If the word is "PerlMonks" and we've got "Pe___o_ks", candidate words will match the regex "Pe...o.ks" perfectly.
  2. Determine which unguessed letter appears in the most candidate words. Break ties for letters that occur most of all (i.e. density).
  3. Discussion of using probabilistic/heuristic analyses, with undetermined efficacies.

I would suggest one more deterministic strategy before getting to (3): entropy and distribution.

Suppose we have the following five candidate words: aacd, aaef, bbgh, bibj. Using rules listed in (2), letters 'a' and 'b' are still tied.

However, it's clear that guessing 'b' will give us more information than 'a'. While guessing 'b' would reveal the solution, guessing 'a' would not. This is because 'b' is more evenly and chaotically distributed throughout the length of the words, allowing the step (1) in the next guessing round to narrow down candidate words even faster.


In reply to Re: Challenge: Design A Better Hangman Algorithm by Kache
in thread Challenge: Design A Better Hangman Algorithm by Limbic~Region

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-23 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found