-
Notifications
You must be signed in to change notification settings - Fork 0
/
readMe
33 lines (26 loc) · 1.57 KB
/
readMe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
MineSweeper
by Curtis Lowder
How to run:
To run the code, run the main command in the Main class.
Note: the default configuration will run the AI players only.
if you want to run the code in a mode that will allow a human to play,
Answer no to the prompt of should run
Running the code under AI control will run two major parts to the code:
the probabilistic and random AI.
Playing as a human is only meant for testing purposes
The probabilisticPlayer is the main focus of this program.
The randomPlayer is only meant as a control to compare performance.
Algorithm for probabilityPlayer:
The algorithm in this code simply assigns a probability to each of the neighbors of an uncovered and numbered cell.
Dividing the number of mined cells / number of covered cells, calculates the probability of each of a cells
neighbors being a mine. After all the uncovered and numbered cells have their neighbor's probabilities calculated,
the algorithm uncovers the lowest probability cell. If no probabilities are known for any of
the cells, the algorithm picks a random covered cell, and uncovers it. This algorithm repeats until either the board
is solved, or a mine has been hit.
Contact information:
Some interesting information considered in this code:
http://www.techuser.net/mineclick.html
basically, the technique the original MineSweeper used to make sure your first click was never a bomb
https://en.wikipedia.org/wiki/Microsoft_Minesweeper
rules for the game