Mastermind

From HaskellWiki
Revision as of 11:31, 4 January 2016 by Lemming (talk | contribs) (overview of Haskell implementations)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Mastermind is a board game where player A create a code of a number of symbols (colors, digits, letters) and player B has to guess the code. Player A evaluates every guess of the code using black pegs, meaning "right symbol at right place", and white pegs, meaning "right symbol at wrong place". Player B has to reconstruct the code using only these evaluations.

It is a nice task to let the computer guess a code. Here are some solutions in Haskell:


There are also implementations focussing on the game player rather than a computer player:

See also