Skip to main content

Numle Helper

Project description

Numle Helper - 数字猜谜游戏助手

这是一个用于解决类 Wordle 数字猜谜游戏(通常称为 Numle)的 Python 命令行工具。它可以帮助您根据已有的线索计算出最佳猜测,或者验证某个数字组合。

功能

  • 游戏模式 (play): 程序随机生成一个指定长度的数字,由用户来猜,并给出提示。
  • 检查模式 (check): 当您知道谜底时,可以用来快速验证某个猜测的结果(包含几个数字、位置正确几个数字)。
  • 求解模式 (solve): 核心功能,一个强大的交互式解谜助手。根据您提供的线索(例如,猜测 12345 后,有 2 个数字包含在谜底中,1 个数字位置正确)来排除不可能的组合,并自动计算和推荐下一步的最佳猜测。
  • 自动求解模式 (auto-solve): 给定一个谜底,程序将自动进行猜测并展示完整的求解过程。如果未提供谜底,则会随机生成一个。
  • 测试模式 (test): 对指定长度的所有可能谜底进行遍历求解,以测试求解器的性能和正确率。支持多进程并行计算以提高效率。

如何使用

需事先安装 python3、uv

查看帮助

uv run main.py --help

命令示例

游戏模式 (play)

开始一个5位数字的猜谜游戏:

uv run main.py play 5

检查模式 (check)

12345 为谜底,检查用户的猜测:

uv run main.py check 12345

求解模式 (solve)

启动一个5位数字的交互式求解器:

uv run main.py solve --length 5

自动求解模式 (auto-solve)

自动求解谜底 98765

uv run main.py auto-solve 98765

随机生成一个5位数的谜底并自动求解:

uv run main.py auto-solve --length 5

测试模式 (test)

使用所有 CPU 核心测试4位数字的所有可能性:

uv run main.py test -l 4 -p 0

Project details


Download files

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

Source Distribution

numle-0.1.4.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

numle-0.1.4-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file numle-0.1.4.tar.gz.

File metadata

  • Download URL: numle-0.1.4.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for numle-0.1.4.tar.gz
Algorithm Hash digest
SHA256 0202e29361c8104765ebd4a2c5773743c10ea4ce7b4a5bed512256e029c66c13
MD5 44c43f65cdd9dd559e668b115a6d89a7
BLAKE2b-256 8bfe822f4e2104a4f1c20e2711a7b7371fca2ae40fd5fb17e9045860a1134c01

See more details on using hashes here.

File details

Details for the file numle-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: numle-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for numle-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 635583c7d902faa84655bd23e1d63c28630cbc7947a12401e1d35e35ad397506
MD5 d6b1aeb15027fc667ceb592d596c234d
BLAKE2b-256 9451ecc16d475d674daa9a1f455495ffe56385f9427984d2b787c29c64baabcb

See more details on using hashes here.

Supported by

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