Read Introduction then press 'New Game' to Play!


The Traditional Game of Hangman, Algorithms, Artificial Intelligence and Beyond...

You are invited to test your creativity and ability in problem-solving in Hangman. But first read:


  1. Play the game first to develop your own strategy to help you to be a more successful player of the game. The computer hosts the game for you. Can you express your strategy for finding the random word chosen as an explicit algorithm for a human solution? When you have given it a go, press 'Hints' for help and discussion and how to use the 'Scanner' and 'Reduce dictionary' buttons.
  2. The small dictionary (shown below when you press 'New Game'), from which the computer chooses its random word, consists largely of words used in Computing. You can consult this dictionary to help you in your task.
  3. You can enlist the computer's help in the task in a variety of ways, see 'Hints' 1-8. You now have, possibly, a more effective way of finding the word --- a human computer-aided algorithm.
  4. Finally, with, or without, the Hints and discussion, can you devise an algorithm for the computer to play hangman and so build a program where the computer guesses the word the user selects from the computing dictionary.
  5. There are many different solutions to this problem. Can you improve your computer algorithm so that it does better than a human? Is this an example of Artificial Intelligence? Is the computer able to learn from its experience in your program? More to follow.

Instructions to play the traditional game

  • The Computer dreams up a random word from its dictionary of Computing.
  • The aim of the game is to guess the letters to spell out the random word
  • Press 'New Game' to start.
  • Type in a letter of the alphabet or a hyphen(-) and press 'Guess a letter'.
  • You have 6 strikes and on the 6th incorrect guess you are out (hanged!). The solution and definition appears.
  • If you guess the word before 6 strikes you win. The solution and definition appears.
  • Press 'New Game' to start another game. The letters you guess correctly are entered in the template for you, together with your strike count and a record of the letters you have tried.
  • Press 'Hints' whenever you want to develop your algorithm to play the game.
  • The word and its definition, will be printed here and immediately below where you enter your guesses. For example, a word in our Computing dictionary might be:

heuristic: (1) enabling a person to discover or learn something for themselves. "A ‘hands-on’ or interactive heuristic approach to learning". (That's what this exercise is about!) See the start of the Computing dictionary for more information and definitions when you start a new game...

Instructions to play the human computer-aided game

  1. Adapt your algorithm to take advantage of the 'Scanner' button, which helps with pattern matching and the 'Reduce Dictionary' button which reduces the size of the dictionary by including only relevant words, initially of the right length...
  2. Press 'Scanner' after you have started the game and have guessed a few letters correctly. The scanner will transform the dictionary words into a format that makes it easier to match your template against words in the dictionary. You do this by using the scroll bar to scroll down the page through the reformatted Computing dictionary.
  3. Press 'Reduce Dictionary' when you want to enlist the help of the computer to remove from the Computing dictionary all the words which do not have the required number of letters in the random word. You are then operating on a smaller 'current dictionary' of words of the right length.
  4. There will be other opportunities to reduce the size of the 'current dictionary' by including only those words that match the template. (To be implemented)

Valid CSS!