Mastermind game with two settings. You can play the game yourself via the console or have the genetic algorithm play it for you (guesses in average ~4 steps) and crush your self-confidence.
Implementation based on paper
If available in Hex, the package can be installed
by adding mastermind
to your list of dependencies in mix.exs
:
def deps do
[
{:mastermind, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/mastermind.
To play the game yourself from the console, run:
mix run_console_game
Feeling lazy? To have the genetic algorithm play the game for you, run:
mix run_genetic_algorithm