A Python package that simulates the Mastermind game with an AI solver.
Project description
| Testing: | |
|---|---|
| Version: | |
| Activity: | |
| Meta: |
[!NOTE]
This repo is currently still under development. Currently there is a beta version that have the basic simulation feature finished. If you encountered any issue, please open up an issue and let me know! I will try to fix them as soon as possible.
Links:
Mastermind
This is a python implementation of the classic puzzle game Mastermind. It simulates the game and allow you to play with either another human being (sits next to you) or the computer, with a AI Solver build-in (still under development). You can install this game with pip or try it out in your browser with Google Colab.
What is Mastermind?
Mastermind is a code-breaking game for two players. The first player (the code-setter) creates a secret code, which the second player (the code-cracker) tries to guess. The code-cracker has a limited number of attempts to guess the code correctly. After each guess, the code-setter provides feedback to the code-cracker, indicating how many dots have the right color and are in the right place, and how many are the right color but in the wrong place. The code-cracker uses this feedback to refine their guesses until they correctly guess the code or run out of attempts.
Getting Started
Prerequisites
To run this project, you must have the following installed (installation guide below):
- Python 3.10 (or higher)
- pip (comes with Python, needed to install the project as a library)
Or alternatively you can run this program in your browser with Google Colab
Installation Guide
-
Install Python 3.10+ if you have not already.
-
Install this the latest python release using pip in your terminal:
pip install mastermind-ai
-
Run the program with the following command:
mastermind
-
Enjoy!
[!TIP] If the above does not work, try the troubleshooting guide below.
Troubleshooting
If you encounter any issues during installation, please check the following:
-
Do you have trouble finding your terminal?
- For windows users, press
Ctrl + Rand typecmdand press enter. - For mac users, press
Cmd + Spaceand typeterminaland press enter. - For linux users, press
Ctrl + Alt + T.
- For windows users, press
-
Do you have the correct version of
pythoninstalled? Check with the following command:python --versionIf you get an error, you need to install python. If your python version is lower than 3.10, you need to upgrade your python version.
-
Do you have
pipinstalled properly? Check with the following command:pip --versionIf you get an error, you need to install
pip. -
Did you encountered an error associated with installing the dependencies of this project? Try installing the dependencies manually using the following command:
pip install pandas
If you get an error, the dependencies does not work on your machine. You will have to find your own way to install the dependencies.
-
If you are still having trouble, please feel free to open up an issue here, and we will try to help you out. Or alternatively you can run the program in your browser
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
All contributors must adhere to the Contributor Covenant Code of Conduct to ensure a welcoming and inclusive environment for all contributors.
To contribute to the code directly, you must also follow the Contributing Guidelines to ensure a smooth and efficient collaboration process.
License
Licensed under MIT License by @FlysonBot.
Questions?
If you have any questions, please feel free to leave them in the Discussions or open up an Issue.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mastermind_ai-1.6.2b0.tar.gz.
File metadata
- Download URL: mastermind_ai-1.6.2b0.tar.gz
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2629057e42aea4afa74310442e7bb74869e887f18752093cb5be5ec21487e7e7
|
|
| MD5 |
1eb27a1b787faf30e37cda686e61f09c
|
|
| BLAKE2b-256 |
2d916d619affe993add50208061fa9e448841a6232d55001cab2da123551e078
|
Provenance
The following attestation bundles were made for mastermind_ai-1.6.2b0.tar.gz:
Publisher:
release_pypi.yaml on FlysonBot/Mastermind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mastermind_ai-1.6.2b0.tar.gz -
Subject digest:
2629057e42aea4afa74310442e7bb74869e887f18752093cb5be5ec21487e7e7 - Sigstore transparency entry: 152568498
- Sigstore integration time:
-
Permalink:
FlysonBot/Mastermind@4e41176c47c120f3517395a00776153aab064cf6 -
Branch / Tag:
refs/tags/v1.6.2-beta - Owner: https://github.com/FlysonBot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_pypi.yaml@4e41176c47c120f3517395a00776153aab064cf6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mastermind_ai-1.6.2b0-py3-none-any.whl.
File metadata
- Download URL: mastermind_ai-1.6.2b0-py3-none-any.whl
- Upload date:
- Size: 36.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dfe615a895464be16851e60c12e006c71cacf4559ea72e14f5abf6c696247cb
|
|
| MD5 |
f874e157a15f4968a1784ea365ec84aa
|
|
| BLAKE2b-256 |
56faea0b22394f24f8a1c95164a2875ce2ff617bf767fc00dfae2ab6d96a0f14
|
Provenance
The following attestation bundles were made for mastermind_ai-1.6.2b0-py3-none-any.whl:
Publisher:
release_pypi.yaml on FlysonBot/Mastermind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mastermind_ai-1.6.2b0-py3-none-any.whl -
Subject digest:
5dfe615a895464be16851e60c12e006c71cacf4559ea72e14f5abf6c696247cb - Sigstore transparency entry: 152568499
- Sigstore integration time:
-
Permalink:
FlysonBot/Mastermind@4e41176c47c120f3517395a00776153aab064cf6 -
Branch / Tag:
refs/tags/v1.6.2-beta - Owner: https://github.com/FlysonBot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_pypi.yaml@4e41176c47c120f3517395a00776153aab064cf6 -
Trigger Event:
release
-
Statement type: