A python based program which uses Scikit-learn (Python's machine learning library), PIL to detect and win32api to play a candy crush game on its own.
The aim of this project is to illustrate "Supervised" machine learning.
- Just run
Scikit-Play-GUI.py
to run the Graphical User Interface. - Click on "START Your Game!" button.
- Click on "CLICK to get the coordinates" button, it will cause an external application to run named "Wheres my cursor".
- Hover your mouse on the upper left and bottom right corners of the board and note down their respective coordinates.
- Enter those coordinates in the GUI itself.
- Click on "SciKit-Play". Congrats you are a GOD now!
- Take a screenshot of the desktop
- Extract the game-board from it, using the coordinates given by the user. If the game-board is not found, then the game has ended or there is some error.
- Divide the game-board in cells and extract each cell
- Using a classification algorithm determine what candy is in which cell
- Store this information in a 2-d array
- Compute the best move using a greedy-like algorithm
- Wait for the board to stabilize and all the movement to stop
- Go to 1
NOTE : This branch contains the training data for the board Recognizer, which is an experimental addition to the project