Using Z3 library to find a solution to a set of constraints given in a game of mastermind. Leveraging the pigeon-hole principle.
You can modify the constraints given at the beginning of the code (later to be set in a separate input file).
-
In your console,
cd
into the directory where the python filemastermind-solver.py
is, -
Install the required dependencies by running
pip install -r requirements.txt
, -
then run
python mastermind-solver.py
.