Escaping mines with AI
During our brainstorming, our team kept coming back to the idea that AI is driving the tech world. Since most of our group is made up of near-complete beginners, we wanted to try building something that fits within our skillset while still challenging our most experienced member.
Ultimately, this all led us to this question: can AI take a relatively simple program like minesweeper and improve it? Can AI learn to play that game in so little time? What inspires this project is the hope that AI can take something that we created ourselves and do something meaningful with it.
Real intelligence gained
We learned that AI can learn how to play this game, but it still makes mistakes, just like us. Meanwhile, our beginner members learned how to create Minesweeper in Python by employing nested for loops, lists, and define methods and classes. While running the code, the genetic algorithm has a noticeable improvement compared to randomly selecting players.
How we built the project
We worked as a team to brainstorm, create, and understand how genetic algorithms worked. No generative AI was used in the coding of this project.
Challenges
In Minesweeper when you press on a square that is a 0, it should reveal all other 0's adjacent to it. We ran into issues when the 0's kept evaluating each other instead of new ones. We also ran into issues with the genetic algorithm not being able to save information from previous generations.
What's next for GenMinesweeper
GenMinesweeper is a genetic algorithm that models a simple strategy, the game of minesweeper. The results from this model prove that it might be able to model even more complex strategies, and these strategies are what's changing the world. Genetic algorithms are heavily useful in robotics in many fields, and this model for minesweeper being successful means that we are one step closer.
Built With
- copy
- deap
- math
- network
- python
- random
- statistics
- torch
Log in or sign up for Devpost to join the conversation.