In this project I created a Mastermind game. The graphic interface is just for testing, so it is obtained using just the console.
You can play by yourself or let the agent play (agent is the one that tries to find the solution efficiently, and the logic is in the agent.py file).
Some settings are in the configure.env file.
The main class, MasterMind, is in game.py.
Try code running main.py, a wrapper that simulates the game and let the player play.
Agent move: DDBBC
Perfects: 0
Corrects: 2
Agent move: EFDEB
Perfects: 1
Corrects: 1
Agent move: CCAFB
Perfects: 1
Corrects: 3
Agent move: AAFCB
Perfects: 1
Corrects: 2
Agent move: FCDCA
Perfects: 5
Corrects: 0
Solution FCDCA was founded in 5/12 attempts.
Solution: FCDCA
Colors: ABCDEF
Attempts: ['DDBBC', 'EFDEB', 'CCAFB', 'AAFCB', 'FCDCA']
Perfects: [0, 1, 1, 1, 5]
Corrects: [2, 1, 3, 2, 0]
#Possibilities: [7776, 1190, 178, 14, 1, 1]
#Attempts: 5/12
Win: True