Anonymine - guess free minesweeper


To top of the page

Anonymine is the "anonymous minesweeper" as I never had any name for it, but I think "Anonymine" works just fine.

Anonymine is a curses mode (console) minesweeper that checks if the fields actually are solvable with only deduction. This means that no guessing will be required, and that the only way to lose is by making a mistake.

And being solvable without guessing is not its only feature, it has many other unusual or even unique features: the games are fully customizable and Anonymine seems to be the only minesweeper with von Neumann neighbourhoods.

For each game you can set the field type (normal / hexagonal / von Neumann), width, height and number of mines, only restricted to certain minimums and security limits (to avoid igniting your computer).

If you're interested, the minesweeper solver algorithm is in its own Python module and can be used for other purposes than playing Anonymine. It contains features that are rather useless for the game such as measuring difficulty.
I started wondering "How do you solve a minesweeper systematically?" in late 2015 and created the algorithm and then realized it could be used in a game.

The supported field types/game types are:

Von Neumann neighbourhoods

I have never seen another minesweeper that can have fields with von Neumann neighbourhoods. In a von Neumann neighbourhood, each cell/square has only four neighbours, at the edges but not at the corners.

The biggest number you'll ever see is 3. But that doesn't mean it's easy, it's quite the opposite actually.

Traditional fields with Moore neighbourhoods

Like any other minsweeper.

Hexagonal fields

Every cell is a hexagon and has six neighbours, (with obvious exceptions). This mode has separate key bindings because there is no single "up" and single "down" direction.

More features:

It works quite well on (unbelievably) small terminal screens. The minimal resolution for the traditional and the von Neumann gametypes is 7 columns by 4 rows, and for the minimum for the hexagonal gametype is 10 columns by 8 rows.

It also looks fine on monochrome terminals.

Even the losers can get on their very own highscores table.

What's new?

To top of the page

Release notes
    - Several changes to the build system:
        - Removed {PRE,NORMAL,POST}_{INSTALL,UNINSTALL} stuff from Makefile
        - Removed unnecessary recursion from Makefile, if you set $builddir, you
          will now need to cd into builddir before running make.
        - You may need to run make twice (same issue as in 0.5.21)

0.5.24 [MacOS >= 10.13]
    - Insist on using 'fork' as start_method for multiprocessing on macOS.
      Python has changed the default to 'spawn' due to a bug, but I don't
      think it would affect a single threaded program.

Windows 83
    - Totally goofed up previous versions, some files were not included.

See the rest of the file on Gitlab

Bigger changes
What's new in 0.5.0 since 0.4.0?

As usual, there has been several bugfixes which are not mentioned here.

    * Really low mine densities without crashing (stack overflow).
    * Mouse support.
        + 0.4.14: Minor update
    * Added an attention mode to make it easier to find free cells
      near the end.
        + 0.4.15: Also applied to numbers surround by too many flags
        + 0.4.17: Removed a restriction from the above addition
    * Different colors for different digits
    * Utilize PyPy -> Makes field initialization approx 2.5 times as fast.
        * Python modules will no longer be automatically installed for other
          available Python versions.
        * 0.4.3:  The PyPy bug was slved
        * 0.4.12: Platform specific bugfix, at least FreeBSD was affected.
0.4.5 - 0.4.7
    * Improvements to the build system.

See the rest of NEWS on Gitlab

Low level changes

See ChangeLog on Gitlab


To top of the page

Windows, Haiku

Anonymine is FOSS and released under the 2-clause BSD license. You can either download tarballs from my site or clone it from GitLab.

This game is not available for mobile devices.

You can also try it over SSH. Log in as on port 2222, password is "play".

List of all downloads

If you find any bugs, please mail me or create an issue.

Mac OS, GNU/Linux and other unix-like operating systems

Note regarding future versions of MacOS

MacOS 10.15 Catalina will be the last version that ships with Python pre-installed. Python3 might get installed automatically by XCode just like git and make. But I would recommend installing Python from Homebrew instead, that way you can install PyPy3 which is much faster than the standard Python.

You can download Homebrew from their site following their instructions which hopefully will be updated before the release of MacOS 10.16. With Homebrew installed, you can run the command brew install pypy3 to install PyPy.


There are two options:

Cygwin version

It takes a few minutes to install and wastes nearly 1 GB of disk space, but it's better after installation. It looks better and runs faster with Cygwin.

The installer tries to be automatic, but there are a few bugs, so you should really read the README.

Installing Python and windows-curses
  • Instructions
  • You can use 7-Zip (or another archiver that can handle compressed tar files) to extract the tar.xz. (Links are above)
    The zip file from Gitlab doesn't work, and the compressed tar files from Gitlab require admin privileges to extract correctly.


Download the unix version from above or git clone directly in Terminal.

I haven't had time to figure out how to install it on Haiku, but it runs fine from the git clone or extracted tarball. Just follow the instuctions in INSTALL.Haiku


To top of the page

You can contact me at

How can the game always be possible to win?

It contains an algorithm that will try to solve the game before you see the field. If the field can't be solved, a new will be randomized, and if it can be solved, the algorithm will tell the game where to place the mines.

What are the losers' highscores?

Normally you'd have to actually win a game to get on the highscores, but not Anonymine: If you come close to winning but fail, you'll get on a highscores table designated for the losers who can't win an unlosable game.
Both the count of mines left and the time are factors for the rankings.

Can I change the colors?

You can edit the "cursescfg" configuration file, which specifies what characters should be displayed for what items on the screen and in which color.

How does the algorithm work with the different games (modes/fieldtypes)?

The solver operates on a network of cells connected to all of their neighbours. It is completely unaware of the concrete visual representation of the field.

Can it play a real game for the user?

No, but there are some demos in the test module. They don't look pretty, but they'll show the algorithm in action.


To top of the page

The von Neumann field: The biggest number you'll ever see is 3. This mode makes Anonymine a unique minesweeper. (Attention mode has been enabled to find the last few cells.)

Traditional (Moore) field, nothing special

Hexagonal field

The losers' highscores


To top of the page

In simple terms: Desktops and latptops only, not for tablets and smartphones. It's possible to play the game from a phone using remote access.

If you're not a hardcore unix/Linux enthusiast, installing the game from source will probably be quite an unfmailiar procedure. But simply following the instructions should work.

Check the README for more details.

Tested on

Here's a list of various platforms Anonymine has been tested on. It works on all of them unless I say otherwise, but there may be some minor issues.

Windows: w/ Cygwin
No issues once installed
Windows: Natively (with Python + windows-curses installed)
Works since 0.5.9 (from tarball) / 0.5.6 (from GitLab)
Multiprocessing still doesn't work.
Works since 0.5.2, but 0.5.13 or newer recommended. Can't change the title bar properly or even close the terminal window after exit.
Tested on: Debian, Fedora, Mint, OpenSUSE, Trisquel, Ubuntu
No issues, and there really shouldn't be any
Installs and runs fine
No color on virtual consoles by default, use TERM=xterm or TERM=linux and just refresh the screen (press any unbound key) whenever it glitches.
No mouse support caused temporary breakage (see RELEASE-NOTES). Need to use TERM=vt100 even in xterm and the terminal may need to be reset(1) after exit.
Mostly fine, but has a dodgy workaround for bug #14.
It works great, but mouse doesn't work.
OpenIndiana (OpenSolaris fork)
(no issues)
Requires GNU Make (gmake) and old versions might not install.