Search for a tool
Mastermind Solver

Tool to solve Mastermind automatically. Mastermind is a board game based on deduction, created by Mordecai Meirovitz. This board game proposes to the player to find a combination of colours in a minimum of tentatives, receiving at each attempt, a global informatino about correct or incorrect colors and positions.

Results

Mastermind Solver -

Tag(s) : Board Game

dCode and you

dCode is free and its tools are a valuable help in games, puzzles and problems to solve every day!
You have a problem, an idea for a project, a specific need and dCode can not (yet) help you? You need custom development? Contact-me!

Team dCode read all messages and answer them if you leave an email (not published). It is thanks to you that dCode has the best Mastermind Solver tool. Thank you.

Mastermind Solver

Mastermind game solver

Tool to solve Mastermind automatically. Mastermind is a board game based on deduction, created by Mordecai Meirovitz. This board game proposes to the player to find a combination of colours in a minimum of tentatives, receiving at each attempt, a global informatino about correct or incorrect colors and positions.

How to use the Mastermind solver (syntax to use)?

The Mastermind solver have to be configured in size (number of pegs in the code) and in size (number of available colours). (A mastermind has generally 4 pegs among 6 colours)

The solver uses text to describe proposals and deduct possible solutions.
Each proposed combination is separated by a carriage return.

The syntax is composed of N letters (where N is the number of pegs and each letter is a colour) and 1 or 2 digits to indicate rightly or wrongly positioned pegs.

Example: Combination RGBY 2 0 correspond to a proposal with in position 1 : R for Red, in position 2 : G for Green, in position 3 : B for Blue and in position 4 : Y for Yellow
Here we use the initial of the color (beware of doubles : Black and Blue for example)

Example: Digits 2 and 0 correspond respectively to 2 pegs in the right position and 0 in wrong position. (Be careful to indicate this with the right number)

It is also possible to indicate jokers (empty cells or unknown indicated by ?,*,- or _) as for the combination, than for right and wrong position.

Example: Black Black Yellow Red (1 in the right position, 2 in the wrong position) is written: BBYR12

Example: Red Green Blue (1 in the right position and ignore the wrongly placed) is written: 'RGB 1?' (? = joker)