numpy is required to run dependecy. If you are using pip run the following command:
pip install -r requirements.txt
To run the the program run the following command:
python3 main.py
After running the program a CLI will appear with 3 options.
- Type ga to run a simulation of mastermind using the genetic algorithm
- Type sa to run a simulation of mastermind using the simulated annealing algorithm
- Type analyse to run both simulations and see their average amount of turns to guess the code.
- Both option 1 and 2 will query the user to type in a code. The code consists of any combination of four digit that range from 1 to 6
- Option 3 will query the user to type the amount of times to run each simulation.