Inspiration

Inspired during the workshop with Improbable

What it does

Models the probability of a mine being on each uncovered cell, and plays where it is most certain. If you want to play yourself while viewing the probabilities, comment out t.start() in the Mines class

How we built it

We started with https://github.com/janbodnar/Java-Minesweeper-Game but very little of the original code remains. We tried to use Keanu to model the uncertainties but failed completely because we couldn't work out how to use the IntegerVertex classes. Instead, we just store a 2D array of probabilities and update them manually after each play.

Challenges we ran into

Lack of documentation for Keanu

Accomplishments that we're proud of

It is nicely visualised, and can be used as a helper to a human or play against the board by itself. It gets very close to the theoretical best of 90% in an easy game (10 mines on a 10x10 grid) and 70% on medium (40 mines on 16x16) Probabilities calculated by: bcw (https://math.stackexchange.com/users/90142/bcw), Odds of winning at minesweeper with perfect play, URL (version: 2013-09-07): https://math.stackexchange.com/q/486283

What's next for Probabilistic Minesweeper AI

It would be nice to migrate it to Keanu or some other PPL

Built With

Share this project:
×

Updates