Implementation of a Reinforcement Learning (RL) model to learn to scratch the less possible surface on the scratch game of the Badulaque of the app "The Simpsons Springfield".
🙋♂️ This project, and as a consequence, its files, belongs to the master´s final project (thesis) of Alejandro Mendoza in Machine Learning and Big Data master degree of the Polytechnic University of Madrid (UPM).
- Generate random tickets in every execution
- Generate tickets with scrathing surface above
- Automated scratching
- Obtain percentage of scratched surface
- Animate/Warn when a symbol is fully discovered
- (Esthetic look of window)
- RL model for scratching
- Test to remove all the frames with the agent to see if the game works
- (random scratching strategy)
- Reward scratching stategy
Obtain the less scrathced surface as possible, obviously showing the three symbols. There aren´t any rewards for same symbols.
NOTE: Symbols change in every ticket generation.
"auxiliar.ipynb" is used for different tests.
"contours.ipynb" is used for showing the creation of the pixel mask and obtaining the valid contours.
Incremental versions of the game until having the complete functionality. You can execute "phase6-final-game.py" to play yourself.
Different phases that a ticket has during the game.
Emoji images used for generating the tickets. Downloaded from the Emojipedia.
Some useful files like the window background of the tickets or the script to plot the training process.
Agents trained with full liberty configuration. This means, after removing a cell, the agent can go to any cell (including repetition).
Agents trained with radial strategies towards the game. This means, after removing a cell, the agent can go to any cell around the removed one.
Results of all agents of all versions of the game.
Github emojis: ikatyang
Emojipedia (downloaded last iOS emoji versions): Emojipedia
Tkinter 8.6 (later unsed): Poor Python documentation
PyQT5 (later, the one used): Official web
PyQT5 better documentation: Qt.io
ChatGPT: ChatGPT
Stackoverflow: Searching questions
Spanish governement surely scratches the money out of our pockets.
Any doubt or suggestion contact with the author:
Alejandro Mendoza: alejandro.embi@gmail.com