How the Solver works

Well, the Solver uses several approaches for finding the mines and the empty fields, which can be clicked.
Known mine - a mine which has been revealed by the logical inference.
Hypothetic mine or empty field - a mine or empty field which have been hypothetically assumed during the logical inference.
Field set - group of fields with associated overall amount of mines.
The simple approach which is used first (as simpliest and fastest) is a trivial one. For each open field the number of mines is read from the image on screen, it is then compared to number of closed fields and of known mines. Then the two solutions may be available - first - the number of mines read is equal to number of closed fields, so EVERY closed field hides a mine, and they are marked as known mines, and second - the number of mines read is equal to number of known mines - then all the closed fields that are not known mines are empty, and are clicked. I believe that 50% of players just use this simple approach, which makes them guessing (and thus, vulnerable), if things go tougher.
The sophisticated approach, which works far much slower - uses logical inference. First, it takes any closed field about which no prior information is available, and assumes a mine or empty field there. Then in runs an algorithm very similar to trivial approach to PROOVE that the assumption was wrong. When prooving, of course, no clicks on fields are done. Here also the number of mines information is very helpful and used. If the algorithm succeeds with the proof, then it clicks the filed or marks the mine, depending on initial assumption. After a successfull run of this algorithm, it returns to try a simple one again, as it is much faster.
The endspiel approach makes a last attempt to open any squares by removing the field sets which contain mines from considered set, and if it succeeds removing all mines - the considered set is clear. This approach normally is only effective when 2-5 mines are left, and not used in every game.
The probabilistic approach - is the last resort. If activated, it tries to figure out the field with the lowest probability of having a mine. Of course, this one is not strong, which means it can blow the round up. Currently the probabilistic approach is still in development...


Hosted by uCoz