Question: I have to build a Minesweeper solver, but don't really know where to start. The problem is, I have to utilize some metaheuristic algorithm, like ant colony optimization, simulated annealing, genetic programming etc. I have found some related materials on the Internet, but I'm not really sure which of them are useful and which are not, since nothing is a "perfect fit". It looks like I'll have to adjust some metaheuristic algorithm on my own, without following some article written by people who have done it before. That's why I want to know all the things I need to know before I start. 

1. How do I formulate my problem to make it suitable for using metaheuristics to solve it? I know it's basically a CSP (constraint satisfaction problem) but don't know how to use that knowledge to find a suitable algorithm for solving it.
2. Which metaheuristics would be suitable for solving my problem (and why)?
3. Are there any things specific to my problem that I should be aware of?

Answer: 
"ant colony optimization, simulated annealing, genetic programming" ... big words, but I am not sure how you would use any of them!

I suggest having two solvers:

1. Perfect solver: Where there is a perfect answer without any doubt and solving it.
2. Imperfect solver: Where there is doubt and you would like to find the least harmful solution.

Apply the perfect solver first, and if it fails, apply the imperfect solver.

Perfect solver needs to find all the combinatorial possibilities and checking out which of them work. In reality it is not that difficult, since you would be considering 1-5 tiles at once (as a human solver I restrict myself to that many tiles usually), there are only at most 32 combinations which is easy to check.

For imperfect solver, you can consider all the combinations, find out valid combinations, calculate probability of mine at different locations using the valid combinations and pick the one with least mine probability.

Come to think of it these two approaches are the same! In perfect solver you would be choosing the tile with 0 mine probability. So, to summarize: 

1. Pick 1-10 unmarked tiles that are contiguous or connected by at most one gap, and each one of them are connected to at least one revealed non-mine location.
2. Find all the valid combinations
3. If the probability of mine is 0 at any location, choose that option immediately.
4. Or, keep track of location with minimum mine probability.
5. Go to step 1

Step 1 is not as bad as it sounds, because there can be only a few combinations that satisfy both the conditions (contiguous and adjacent to a solved non-mine location).
Metaheuristics might not the best algorithm for Minesweeper - at least not for the easy parts.

Instead, a simple rule engine with inference could probably already tag many of the bombs and reveal the free spots. The inference is needed to reason further once a bomb has been tagged, with that information. For inspiration, see drools's [conway's game of life](http://docs.jboss.org/drools/release/5.5.0.Beta1/drools-expert-docs/html_single/index.html#d0e11249) example.