| Version: | |
|---|---|
| Meta: |
Links:
A terminal Mastermind game with 4 modes and a built-in magic solver. Install with pip and play in seconds — no configuration needed.
Mastermind is a classic code-breaking game: one player hides a secret code, the other tries to crack it. After each guess, you get feedback on how close you are — and you have to use that to narrow it down before you run out of attempts. Simple to learn, surprisingly deep to master.
- Play — Guess the secret code yourself
- Watch — Let the AI solve it optimally
- Assist — Get AI suggestions while playing a real game
- Rules — Learn how to play
Just install Python 3.12+ and pip — the Java runtime is bundled for Linux, Windows, and macOS.
For Android, install Termux and run
pkg install openjdk-21first.
Technical Details for Developers
- JPype: bridges Python and Java at runtime, allowing the Python UI to call into the high-performance Java solver directly without a subprocess.
-
Install Python 3.12+ if you haven't already.
-
Install the latest release:
pip install mastermind-ai
-
Run the program:
mastermind
Tip
If the above does not work, see the Troubleshooting Guide.
You can also try it in your browser with Google Colab.
Contributions are welcome! See the Contributing Guidelines.
Licensed under MIT License by @FlysonBot.
Feel free to leave questions in the Discussions or open an Issue.