MineSwee++ 3

» Download «

Current version: 3.0.604, released on Mar 6, 2012 (Check here for the older MineSwee+ 2)

If MineSwee++ 3 fails to initialize properly or can not find mscoree.dll, download .Net Framework 2.0 Redistributable Package here.

What is this?

MineSwee++ 3 screenshot

New in MineSwee+ 3: the latest version sports smarter and faster AI and simplified difficulty parameters, along with a more stable user interface.

This is a single-player MineSweeper Flags game that you can play with your contacts with MSN Messenger 6/7 and Windows Live Messenger. When you play with MineSwee++, you play with your computer, not a real human. MineSwee++ 3 has visualized interface and exciting sound effects, just as if you are playing the real MineSweeper Flags game. It comes with some adjustable parameters too.

Development story

Playing Minesweeper Flags that came with MSN Messenger 6's Fun & Games requires good logics and reasoning skills. In my first semester in 2nd year of senior high, I had to hand in a program, as my term project. When my teacher told us about this, I immediately decided to code MineSwee+ - the predecessor of MineSwee++. MineSwee+ was coded in C++ and had only text interface. Having written down many logics entries, I finally finished MineSwee+ and named the computer side [o], the # Middle Sea bot. To be clear-cut: [o], playing the game, thinks in quite the same way as I do, but he - or it - is much faster than I, or indeed any human beings.

After the semester was over, some of my classmates suggested that I re-do the program in Visual Basic, mainly for the purpose of giving it nice-looking graphic user interface. As the "core" of [o]'s thinking way had been done, MineSwee++, which would become the visualized version of MineSwee+, was soon coded and released to the Messenger Plus! community. Some people say it isn't enough smart, but some say it kicks their ass - Anyhow, people do have fun playing with my program and that's what I am happy with :).

Improving [o] has always been what I wanted to do. In my sophomore year in college, I finally came up a new algorithm. Somehow, this time, the opportunity for me to implement it is again term project - now (Intel IA-32) Assembly. So, I implemented the new algorithm in Assembly and used MineSwee++ 2's C[o]re as my term project topic. My classmates said it kicked their ass! This gave me confidence that I could release the new version to the wild, so after some modification and improvement on the codes, I publicized the Preview Release of MineSwee++ 2 three years after the first version's release.

The Preview Release was still written in Visual Basic under which it grew gradually hard to maintain. Also it was not Vista-compatible. Therefore, I decided to re-make the whole user interface in C#. Due to such reconstruction, the new interface that resembled the original Minesweeper Flags more with difficulty control became available.


You can post your question on the Official Thread.

(Old) MineSwee++ 2

» Download «

You will download two installation-free standalone program files (one game, one solver) along with a DLL. If MineSwee++ 2 fails to initialize properly or can not find mscoree.dll, download .Net Framework 2.0 Redistributable Package here.

System requirements

» An Intel Pentium III or AMD Athlon XP, or any other x86 CPU supporting SSE
» Recommended: Intel Pentium D 9xx or AMD Athlon 64 X2.


MineSwee++ 2 is close-source. However, I decide to make the algorithm of C[o]re public. The following pseudo-code is used since MineSwee++ 2 Release Candidate V (2.1.503).

GetGridWithBestProbability(board) returns (row, col)
board: the board being played
row: the row index of the grid to open
col: the column index of the grid to open
   initialize board_sum with all 0
   initialize board_no_mines_around_sum with all 0
   num_mines ← number of mines flagged in board
   num_mines_left ← 51 - num_mines
   num_matched_board ← 0
   while num_matched_board is not large enough and time is not up do
      board2 ← generate a board with num_mines_left 1's randomly spread in suited places 
                                     and (256 - num_mines_left) 0's in other places
      if ((1's of board2) and (mines of board)) matches conditions of board then
         add board2 to board_sum
         for each corresponding grid in board, grid2 in board2,
                                gridnma in board_no_mines_around do
             if total number of mines around (grid and grid2) = 0 then
                gridnma ← 1
                gridnma ← 0
         add board_no_mines_around to board_no_mines_around_sum
         num_matched_boardnum_matched_board + 1
   if num_matched_board = 0 then
      return (0, 0)
   best_grid_row ← 0
   best_grid_col ← 0
   best_grid_probability ← 0
   best_grid_probability_no_mines_around ← 0
   for r ← 1 to 16 do
      for c ← 1 to 16 do
         if board_sum[r][c] ≥ best_grid_probability then
            if board_sum[r][c] - best_grid_probability > num_matched_board × 0.03
               or (board_no_mines_around_sum[r][c] ≤ best_grid_probability_no_mines_around
                   and neither r nor c is margin) then
   return (best_grid_row, best_grid_col)

Frequently Asked Questions

Q: May I use C[o]re.dll in my own program?

A: Yes. Of course, you have to address this usage in your program and on your program website. C[o]re.dll is a 32-bit DLL. Following is some information you may find useful.

Q: How do I use the Solver?

A: Just input the character in the corresponding grids and click "Solve". The characters accepted are: - for an opened grid, + for a flagged-as-mine grid and 0 to 8 for a grid that is opened with a number shown (if no number is shown, then it's a 0). The solver will calculate the probabilities of the grids and display probability information.