ms_toollib
A cross-platform minesweeper algorithm toolbox with a native Rust core.
Supports Python 3.7–3.13 on Windows, Linux, and macOS.
Installation
pip install ms_toollib
No additional dependencies required.
Features
| Category | Description |
|---|---|
| Mine Laying | Random mine placement (first-click safe, Win7-style), no-guess mine generation (filter & adjustment methods) |
| Board Metrics | 3BV, 3BV/s, openings (Op), islands (Isl), ZiNi (Greedy/Human/Random) |
| Probabilities | Per-cell mine probability with block decomposition and enumeration |
| Deduction Solver | 3-tier solver: direct subset, subtract-and-compare, full enumeration (≤55 cells) |
| Solvability Check | Determine if a board is no-guess, find unsolvable structures |
| Game State Machine | MinesweeperBoard / SafeMinesweeperBoard that accepts mouse clicks and tracks full game state |
| Replay Parsing | Read AVF, EVF, MVF, RMV formats; save/write EVF (v0–v4) and EVFS containers |
| Optical Recognition | Recognize board state from an RGBA image via ONNX neural network (Sobel, Hough, DP) |
Quick Start
import ms_toollib as ms
# Generate a no-guess Beginner board
board = ms.laymine_solvable(9, 9, 10)
print(ms.cal_bbbv(board)) # 3BV
print(ms.cal_zini(board, 1)) # Greedy ZiNi
# Per-cell mine probability
prob = ms.cal_probability_onboard(board, 10)
# Parse a replay
video = ms.AvfVideo("replay.avf")
video.parse()
video.analyse()
print(video.bbbv)
See the full documentation for detailed API references.
Public API
Functions (30+):
cal_all_solution, cal_bbbv, cal_board_numbers, cal_hzini, cal_op, cal_probability, cal_probability_onboard, cal_rzini, cal_zini, get_all_not_and_is_mine_on_board, is_able_to_solve, is_guess_while_needless, is_solvable, laymine, laymine_op, laymine_solvable, laymine_solvable_adjust, laymine_solvable_thread, mark_board, obr_board, refresh_board, refresh_matrix, refresh_matrixs, refresh_matrixses, sample_bbbvs_exp, solve_direct, solve_enumerate, solve_minus, unsolvable_structure, valid_time_period
Classes (15):
AvfVideo, BaseVideo, Board, EvfVideo, Evfs, EvfsCell, GameBoard, KeyDynamicParams, MinesweeperBoard, MvfVideo, RmvVideo, SafeBoard, SafeBoardRow, SafeMinesweeperBoard, VideoActionStateRecorder
Supported Platforms
| OS | Architectures |
|---|---|
| Windows | x86, x64 |
| Linux | x86, x86_64, aarch64, armv7, ppc64le, s390x |
| macOS | x86_64, aarch64 |
Source & Issues
- GitHub: https://github.com/eee555/ms_toollib
- Documentation: https://docs.rs/ms_toollib/latest/ms_toollib
- PyPI: https://pypi.org/project/ms_toollib/
Metadata
Release files for ms_toollib 1.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ms_toollib-1.6.0.tar.gz | 337.4 kB | Without provenance | Details for ms_toollib-1.6.0.tar.gz |
Built distributions (wheels)
Total release size: 29.7 MB
Release files / ms_toollib-1.6.0.tar.gz
| Download URL | ms_toollib-1.6.0.tar.gz |
|---|---|
| Size | 337.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
431ccc4016cc81df845780f949a943ea5a3462d584dd9ac5ad102896ee891274
|
|
BLAKE2b-256 checksum How to use checksums |
83666fb008954eee99bd5fc068088d885374197028625dba4604c41f9e08020e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ms_toollib-1.6.0-cp38-abi3-win_amd64.whl
| Download URL | ms_toollib-1.6.0-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
cf5a212cabe323b6033fb09d2c887ae7eb2673f67c22390100bbe0d9df0cd4d6
|
|
BLAKE2b-256 checksum How to use checksums |
01928f0568f790ee3110fc13e4c0202fc92f5ee1f00ae4cb36fe057b65ba3f7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ms_toollib-1.6.0-cp38-abi3-win32.whl
| Download URL | ms_toollib-1.6.0-cp38-abi3-win32.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.8 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
67b3caa1187c159fe297fae0e7922bc3151d4e4109ae9497533c6f4eb6bc326f
|
|
BLAKE2b-256 checksum How to use checksums |
f5e697404de7510ec60fdc66d6968f09504d25a1e36cee22534145553def93bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ms_toollib-1.6.0-cp38-abi3-musllinux_1_2_x86_64.whl
| Download URL | ms_toollib-1.6.0-cp38-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.8 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
043840a3122954689ca6c24df151bb2ee02a023d1e8fc62db4f471941201a2f1
|
|
BLAKE2b-256 checksum How to use checksums |
9851854f298d0e8b185385b8969b4c89c1f861b801cab0e3d6e1a6c8e66b2d30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ms_toollib-1.6.0-cp38-abi3-musllinux_1_2_i686.whl
| Download URL | ms_toollib-1.6.0-cp38-abi3-musllinux_1_2_i686.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.8 Linux musl 1.2+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
343fdb1f42dd81662f6c5f2988805b8700ecf2be0bf512b4a74ffca6684e5620
|
|
BLAKE2b-256 checksum How to use checksums |
6894b33bef1cdf70f1712f6dc53b2aa397d6f362b131dab764fa60d53d54bd2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ms_toollib-1.6.0-cp38-abi3-musllinux_1_2_aarch64.whl
| Download URL | ms_toollib-1.6.0-cp38-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.8 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
3d5a321670e96e745c233e1b16eb3d1f0af02ff9c37cf677874b0bf6c3fc2815
|
|
BLAKE2b-256 checksum How to use checksums |
cfd5199d2cc4babae370db836d64d711dcd670178e7e898f01173a3f495e2341
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ms_toollib-1.6.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | ms_toollib-1.6.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
57b3808a1ff2a313b692b6dc43c6e6052ca2091ba6637dc7e63b2c7ed076958d
|
|
BLAKE2b-256 checksum How to use checksums |
4fa0b82eae6113bac2268770c20bccb7ce13846a6e1fe32a08754d80470b7672
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ms_toollib-1.6.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | ms_toollib-1.6.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
867867908935d3ddd25e00d421d0c8fc8f63f5f5a9bbc50e0add3f3e80ae282f
|
|
BLAKE2b-256 checksum How to use checksums |
c7f24bc648ae46354cbf97c1420557a2a769fbd90dff90b852c63be11efc55b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ms_toollib-1.6.0-cp38-abi3-manylinux2010_i686.manylinux_2_12_i686.whl
| Download URL | ms_toollib-1.6.0-cp38-abi3-manylinux2010_i686.manylinux_2_12_i686.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.8 Linux glibc 2.12+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
7c77ec9deb476eb04ad3ca9f1089b51e8c0c514c282fe02123f2768214687f5c
|
|
BLAKE2b-256 checksum How to use checksums |
ebebfbdd07fefd3bb996263e36e3847c1ae7fc35589254f894a65fae40c141f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ms_toollib-1.6.0-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | ms_toollib-1.6.0-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
08d6b70e4315342bd24e70ae3881f23a0fdb5f8e41c76d53095d840dbad51904
|
|
BLAKE2b-256 checksum How to use checksums |
b832886e73d71dcc9df4cfe089c8deb0d4a559c9bbcde67ea583147c04b8b8f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ms_toollib-1.6.0-cp38-abi3-macosx_10_12_x86_64.whl
| Download URL | ms_toollib-1.6.0-cp38-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.8 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
3681d189e9eaa9f7cebad4f8085945df6f698302e2c98fdbc98f4ec74f2461e0
|
|
BLAKE2b-256 checksum How to use checksums |
75af0e7c3326567a588747810c2c216c1ccad55be7c0302d83c8653ed410295c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for ms_toollib 1.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.