Code:

 

Impossible Hangman


Published
 

2022

 

About

Programmed in Javascript, this project used Javascript Hangman by YvonneD as a base. The program was modified to be impossible to win.

Behind the game

I feel a little bad naming this impossible hangman. Most people I have shown this to take impossible as a challenge and not as a literal description of the game.

This game cheats and you cannot win. At the start it generates a list of words that are mutually exclusive. Each time you guess a letter that is unique to one of the words, that word is removed from the list. There will always be at least one word left on the list after six guesses, and that word will be revealed as what you were supposed to guess.

The hardest part of programming this was coming up with the lists of words. That part was done manually. In the next version, adversarial hangman, the computer will use a library of thousands of words and eliminate them as guesses are made.