Here's my command-line minesweeper solver, in c++. It is not optimal, but does a pretty good job of solving expert sized minefields. I never worked out what percentage of minefields it solves, because I planned on doing some more work on end game scenarios. That was about ten years ago. The code is quite readable, so may be of interest to fellow coders, and anyone is welcome to extend it if they wish.