• Create Account

### #ActualÁlvaro

Posted 18 April 2013 - 09:01 AM

You can still use a randomized algorithm of the style of the one I posted. Instead of measuring the probability of each field containing a mine, you can compute some other metric (the expected amount of information obtained by clicking on that field is probably about the best you can do, but it's a bit tricky).

The fact that a test case can be solved without guessing doesn't mean that the two very basic rules you posted are enough to do all the deductions. For instance:
0 0 0 1 - -
0 0 0 1 - -
1 1 1 2 x -
- - - - - -
- - - - - -
Mines left: 4
You can deduce that the field mark x' is safe, but your basic rules won't find that out. My algorithm, however, will have a nice 0 in
that spot.

Another example:
- - - - - -
- - - - - -
- - - 4 - -
- - - - - -
- - - - - -
Mines left: 4
In this case, anything not adjacent to the 4' is safe.

### #1Álvaro

Posted 18 April 2013 - 09:01 AM

You can still use a randomized algorithm of the style of the one I posted. Instead of measuring the probability of each field containing a mine, you can compute some other metric (the expected amount of information obtained by clicking on that field is probably about the best you can do, but it's a bit tricky).

The fact that a test case can be solved without guessing doesn't mean that the two very basic rules you posted are enough to do all the deductions. For instance:
0 0 0 1 - -
0 0 0 1 - -
1 1 1 2 x -
- - - - - -
- - - - - -
Mines left: 4

You can deduce that the field mark x' is safe, but your basic rules won't find that out. My algorithm, however, will have a nice 0 in
that spot.

Another example:
- - - - - -
- - - - - -
- - - 4 - -
- - - - - -
- - - - - -
Mines left: 4

In this case, anything not adjacent to the 4' is safe.

PARTNERS