Skip to content

Robin-Short/mastermind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastermind

In this project I created a Mastermind game. The graphic interface is just for testing, so it is obtained using just the console.

How to play

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.

Example of output:

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

About

Implementation of Mastermind game with agent

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages