// readme

元扫雷(Metasweeper)

English version is here.

  • 包含无猜、可猜模式,录像播放器及插件系统的现代化专业扫雷版本

简介

元扫雷(Metasweeper)由资深扫雷专业玩家与软件工程师共同打造——不是对传统扫雷的简单重复,而是在算法、性能、可扩展性与工具链层面的全面现代化。

元扫雷生成的录像格式已获得开源扫雷网官方认可,并参与国际排行榜。

项目优势与技术亮点

(1)算法与引擎体系

元扫雷由ms_toollib工具箱赋能,核心竞争力来自后者高度优化的算法组件,构成完整的扫雷智能算法系统。

  • 三大判雷引擎:提供多层次策略推理,覆盖从简单集合到枚举法求解。
  • 统一局面状态机:将游戏局面抽象为自动状态机,提升算法集成度与可扩展性。
  • 概率推断引擎:支持计算局面中任意一格是雷的概率,求解速度仅次于JSMinesweeper。
  • 光学局面识别(OBR)引擎:可从任意扫雷应用的截屏中重建局面,实现跨游戏智能分析。

(2)架构与技术栈

项目在性能、安全性、工具链友好度之间取得扎实平衡。

  • Python / PyQt5 + Rust 复合架构

    • Python 负责 UI、生态扩展;
    • Rust 提供核心算法计算的高性能与内存安全。
  • 界面与算法完全解耦,使 UI和工具链可独立推进。

  • 完全开源的工具链 ms_toollib(MIT License),可通过 pip install ms_toollib 直接安装并在其他项目中复用。


(3)游戏模式与交互能力

具备目前扫雷软件生态中覆盖度最广、交互方式最现代化的功能。

  • 支持 全部 6 种无猜模式 + 标准 + Win7 模式;弱可猜 / 强可猜模式均为独家实现。
  • Ctrl + 滚轮 自由缩放界面尺寸,提供罕见的 UI 灵活度。
  • Space:即时计算当前盘面每一格的雷概率。
  • Ctrl + Space:截屏识别并对任何外部扫雷应用执行概率计算(OBR)。
  • 局面筛选器:基于自定义策略的复杂条件过滤。
  • 可编程计数器:内置 3BV/s、STNB、RQP、pluck、ZiNi 等 30+ 指标,支持完整 Python 表达式语法自定义计算公式,自由度无上限。 *…
The Undervalued Score +

How much a project earns versus how much attention it actually gets. Above 50 means the work is outrunning its audience. Recomputed nightly from commit velocity, contributor effort, issue resolution, fork utility, release cadence, and project maturity — divided by a logarithmic reach factor.

score  = signal / reach

signal = 0.25·commit_velocity   // commits in last 90 days (cap 30)
       + 0.20·contributor_work  // unique authors × velocity (cap 100)
       + 0.20·issue_resolution  // closed ÷ total issues
       + 0.20·fork_ratio        // forks ÷ stars (proxy for real usage)
       + 0.10·release_cadence   // releases in 90 days (cap 3)
       + age_bonus              // +0 to +0.30 after 6 months
       + homepage_bonus         // +0.05 if homepage is set

reach  = log₁₀(stars + watchers + 10)
The Health Score +

Is the project alive and maintained right now? A 0–100 pulse recomputed nightly from commit recency, rhythm, how fast issues close, and how quickly PRs get merged.

health = 0.35·recency       // days since last commit (90d decay)
       + 0.25·cadence       // commit rhythm consistency
       + 0.20·issue_health  // closed ÷ total issues
       + 0.20·pr_health     // merged ÷ total PRs
Health bands +

The colour and label on every card come straight from the health score.

Healthy   80 – 100   active, responsive, regular releases
Stable    60 – 79    maintained, steady, no alarms
Quiet     40 – 59    slowing down — watch this one
At Risk    0 – 39    going dark · candidate for rescue
// Tags — what each label means +

Tags are independent behavioral signals computed nightly. A project can hold multiple at once. They drive the home page sections.

solo_builder      one person holds > 80% of commits (last 180d)
needs_contributors has open "help wanted" or "good first issue" labels
hidden_gem        < 100 stars · active in last 3 months · documented
legacy_hero       repo > 5 years old · committed this year
fork_magnet       forks/stars > 0.5 · used as template or dependency
release_machine   5+ releases in the last 90 days
under_pressure    > 10 open issues · ≤ 2 contributors · health ≥ 60
community_watch   watchers > stars · devs tracking before the public
community_hub     GitHub Discussions enabled · > 20 discussions
funded            maintainer has active funding channel
Why rank against stars at all? +

Stars are an outcome, not effort. A project with 8 stars and daily commits is doing more interesting work than one coasting on 8k. We measure the building, then divide by the attention already received — so the genuinely undervalued rise to the top.

// stars   = lagging indicator
// commits = leading indicator
// we rank by the leading one