Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7442693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:12:52+00:00 2026-05-29T11:12:52+00:00

I named it as AI way because I’m thinking make Application to play the

  • 0

I named it as “AI way” because I’m thinking make Application to play the hangman game without human being interactive.

The scenario is like this:

  1. a available word list which would contains hundreds of thousands English word.
  2. The Application will pick certain amount of words, e.g 20 from the list.
  3. The Application play Hangman against each word until either WON or FAILURE.
    The restriction here is max wrong bad guess.
    26 does not make sense obviously and let’s say 6 for the max wrong guess.

I tried the strategy mentioned at wiki page but it does not work well.
Basically successful rate is about 30%.

Any suggestions / comments regarding strategy as well as which field I should dig in order to find a fair good strategy?

Thanks a lot.

-Simon

PS: A JavaScript implementation which looks fairly well.
(https://github.com/freizl/play-hangman-game)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:12:53+00:00Added an answer on May 29, 2026 at 11:12 am

    Updated Idea

    1. Download a dictionary of words and put it into some database or structure of your choice
    2. When presented with a word, narrow your guesses to words of the same length and perform a letter frequency distribution (you can use a dictionary and/or list collection for fast distribution analysis and sorting)
    3. Pick the most common letter from this list
    4. If the letter is found, create a regex pattern based on the known letter(s) and the word length and repeat from step 2
    5. You should be able to quickly narrow down a single word resulting from your pattern search

    For posterity:

    Take a look at this wiki page. It includes a table of frequencies of the first letters of words which may help you tune your algorithm.

    You could also take into account the fact that if you find a vowel or two in a word the likelihood of finding other vowels will decrease significantly and you should then try more common consonants instead. The example from the wiki page you listed start with E then T and then tries three vowels in a row: A, O and I. The first two letters are missed but once the third letter is found, twice then the process should switch to common consonants and skip trying for more vowels since there will likely be fewer.

    Any useful strategies will certainly employ frequency distribution charts on letters and possibly words e.g. some words are very common while others are rarely used so performing a letter frequency distribution on a set of more common words might help… guessing that some words may appear more frequently than other but that depends on your word selection algorithm which might not take into account “common” usage.

    You could also build specialized letter frequency tables and possibly even on-the-fly. For example, given the wikipedia h a ngm a n example: You find the letter A twice in a word in two locations 2nd and 6th. You know that the word has seven letters and with a fairly simple reg ex you could isolate the words from a dictionary that match this pattern:

    _ a _ _ _ a _
    

    Then perform a letter frequency on that set of words that matches this pattern and use that set for your next guess. Rinse and repeat. I think doing some of those things I mentioned but especially the last will really increase your odds of success.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to force use of a named route in ASP.NET MVC
I have 500 images named Image1.tif all the way to Image500.tif and I need
I want in a good performance way (I hope) replace a named parameter in
Have a scenario where we un-intentionally merged a named branch ( ABC ) into
i'm trying to figure out a way to record a user plays without slowing
I'm thinking of the best way to store personal contacts in a database for
I want to make a program that moves certain named folders (and all files
One way to have interprocess communication is through a (named) pipe between the processes.
I'm searching for a way to write complex data configurations for my application. I
I'm trying to find a way to invoke an interactive command-line program so that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.