Skip to main content

Minesweeper solver in Zig

Project description

Minesweeper solver

A minesweeper solver written in Zig.


The following cell representations are used for input boards:
- `#` for an unclicked cell
- `<N>` where `N=0,1,2,...` is a number shown in a cell
- `.` as an alternative to `0` (since the number 0 is not normally shown)
- `*` to represent a single mine (may be a revealed mine or a flag)
- `*<N>` where `N=1,2,...` is the number of mines


Example usage:
```
>>> import zig_minesolver
>>> board = """
... # 2 # # #
... # # # # #
... # 3 # # #
... # 2 # 4 #
... # # # # #
... """
>>> probs = zig_minesolver.get_board_probs(board, mines=8)
>>> print("

".join(str(x) for x in probs)) [0.27108, 0.0, 0.27108, 0.31325, 0.31325] [0.48594, 0.48594, 0.48594, 0.31325, 0.31325] [0.26506, 0.0, 0.50602, 0.5494, 0.5494] [0.26506, 0.0, 0.50602, 0.0, 0.5494] [0.10843, 0.10843, 0.24096, 0.5494, 0.5494] >>> ```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

zig_minesolver-0.1.1-py3-none-win_amd64.whl (161.5 kB view details)

Uploaded Python 3 Windows x86-64

zig_minesolver-0.1.1-py3-none-win32.whl (174.5 kB view details)

Uploaded Python 3 Windows x86

zig_minesolver-0.1.1-py3-none-manylinux1_i686.whl (442.1 kB view details)

Uploaded Python 3

zig_minesolver-0.1.1-py3-none-macosx_11_0_arm64.whl (162.3 kB view details)

Uploaded Python 3 macOS 11.0+ ARM64

zig_minesolver-0.1.1-py3-none-macosx_10_9_x86_64.whl (174.8 kB view details)

Uploaded Python 3 macOS 10.9+ x86-64

File details

Details for the file zig_minesolver-0.1.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: zig_minesolver-0.1.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 161.5 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.5

File hashes

Hashes for zig_minesolver-0.1.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c98ef05ec2005be41e9e43e0aaa2a75c12deb65d9a5e43d510298fbe8949d9f3
MD5 f2ceff5a0802cadde27249d3c320db4f
BLAKE2b-256 0ff8c865325878396215365a1f5c6b48af0c162de7132a9db9887c1c9857816e

See more details on using hashes here.

File details

Details for the file zig_minesolver-0.1.1-py3-none-win32.whl.

File metadata

  • Download URL: zig_minesolver-0.1.1-py3-none-win32.whl
  • Upload date:
  • Size: 174.5 kB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.5

File hashes

Hashes for zig_minesolver-0.1.1-py3-none-win32.whl
Algorithm Hash digest
SHA256 54bc740a4e68fd6d44328421171a248fa366f6ad00a6fafc98f46a733b3be1d2
MD5 98e34278643ebbf331cfa72496186589
BLAKE2b-256 4cae0c4a9e9f52f6dff280cf8163033651a4f1adf70d1466836fbbef508db02e

See more details on using hashes here.

File details

Details for the file zig_minesolver-0.1.1-py3-none-manylinux1_x86_64.whl.

File metadata

  • Download URL: zig_minesolver-0.1.1-py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 432.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.5

File hashes

Hashes for zig_minesolver-0.1.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2ff58842eff9055772ea6c0e3d558ac8155eee3bccf0aa3bec7734991aa797c3
MD5 d859ff28f33413f7c7e68c1ba8f561f7
BLAKE2b-256 8b45e7fb179ebec23c68027dc9884fe228205958a4c92e0f6a8c6a4b1f74abd2

See more details on using hashes here.

File details

Details for the file zig_minesolver-0.1.1-py3-none-manylinux1_i686.whl.

File metadata

  • Download URL: zig_minesolver-0.1.1-py3-none-manylinux1_i686.whl
  • Upload date:
  • Size: 442.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.5

File hashes

Hashes for zig_minesolver-0.1.1-py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 65a075131c86db96f73ef9eda96d53723441ffdc270fbde83c9f319e11e7576c
MD5 3172df6988710ec6f9a98e4c01d35714
BLAKE2b-256 912cfe1402fd2128a036974a9e034c87bdcc170cd82c4a6fbaaa2355f49d8ff8

See more details on using hashes here.

File details

Details for the file zig_minesolver-0.1.1-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: zig_minesolver-0.1.1-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 162.3 kB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.10.1 pkginfo/1.7.1 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for zig_minesolver-0.1.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8b53930432e426a373d1df163335803ac963d9264e5e2d0baecea182c542d586
MD5 35313cd372cf573da98db0385cb33607
BLAKE2b-256 abab61c9ae0de77dd02b5858ce266914436f3ce5cbcf2da7e063d00169755445

See more details on using hashes here.

File details

Details for the file zig_minesolver-0.1.1-py3-none-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: zig_minesolver-0.1.1-py3-none-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 174.8 kB
  • Tags: Python 3, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.5

File hashes

Hashes for zig_minesolver-0.1.1-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d4f14e3787857c393c90a126e93c4ede26f88762f789617322eb96927fb38d44
MD5 b58c82f847fbba9e2adc6c415d3a680c
BLAKE2b-256 3905337c81a66fa46a9d03da0a0209ae45c4d1b46bce84c79eedf0f9e6537619

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page