Solver for Queens game
Project description
Queens Solver
Queens Solver solves "Queens" game hosted on linkedin with linear programming.
Installation
To install Queens solver, first run one of the following:
# Using pip
pip install queens-slvr
# Using uv
uv pip install queens-slvr
Then, run this to install browsers for playwright:
install-playwright-browsers
Usage
The Queens solver automatically loads the "Queens" game hosted daily. To call the solver, run:
queens-solver
The solver first loads the game, then solves it, and finally validates the solution on the hosted webpage. Positions of queens are marked by asterisks to the right of color index. An example output looks like:
2026-05-08 12:45:44,409 [INFO] queens_parser: [queens-board] section found
2026-05-08 12:45:44,413 [INFO] queens_parser: Queens game board parsed
2026-05-08 12:45:44,414 [INFO] queens_solver: Added equality constraint: one queen per row
2026-05-08 12:45:44,414 [INFO] queens_solver: Added equality constraint: one queen per column
2026-05-08 12:45:44,414 [INFO] queens_solver: Added equality constraint: one queen per color
2026-05-08 12:45:44,415 [INFO] queens_solver: Combined equality constraints
2026-05-08 12:45:44,415 [INFO] queens_solver: Added upper-bound constraint: at most one queen per diagonally-adjacent tiles (\)
2026-05-08 12:45:44,416 [INFO] queens_solver: Added upper-bound constraint: at most one queen per diagonally-adjacent tiles (/)
2026-05-08 12:45:44,417 [INFO] queens_solver: Combined upper-bound constraints
2026-05-08 12:45:44,417 [INFO] queens_solver: Generated target coefficients for score function
2026-05-08 12:45:44,427 [INFO] queens_solver: Solved linear programming
2026-05-08 12:45:44,596 [WARNING] queens_validator: Skip setting [queen] on row 1, column 5, since the tile is not enabled
2026-05-08 12:45:44,617 [WARNING] queens_validator: Skip setting [queen] on row 2, column 7, since the tile is not enabled
2026-05-08 12:45:44,729 [INFO] queens_validator: Setting [queen] on row 3, column 2
2026-05-08 12:45:44,821 [INFO] queens_validator: Setting [queen] on row 4, column 4
2026-05-08 12:45:45,444 [INFO] queens_validator: Setting [queen] on row 5, column 1
2026-05-08 12:45:45,509 [INFO] queens_validator: Setting [queen] on row 6, column 3
2026-05-08 12:45:45,591 [INFO] queens_validator: Setting [queen] on row 7, column 6
2026-05-08 12:45:49,158 [INFO] queens_validator: Validation result: SUCCESS
[[1 1 1 1 2* 2 2 ]
[1 1 3 3 3 2 4*]
[1 3* 3 3 3 3 4 ]
[1 3 5 5* 5 3 4 ]
[1* 3 3 3 3 3 6 ]
[1 3 7* 7 7 3 6 ]
[7 7 7 7 6 6* 6 ]]
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file queens_slvr-0.1.14.tar.gz.
File metadata
- Download URL: queens_slvr-0.1.14.tar.gz
- Upload date:
- Size: 78.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da706e622cb21330d296a8ba5b59fd03925d0a7d95849311db557f7f866605b1
|
|
| MD5 |
31b9f0b52bf244ee3112e0a8d9420fd2
|
|
| BLAKE2b-256 |
77ed9022e9f892e858892b6af20f894b1af214910ba46d8dc520a0d4ccb2ff6e
|
Provenance
The following attestation bundles were made for queens_slvr-0.1.14.tar.gz:
Publisher:
upload-pypi.yaml on zhuxr11/queens_solver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
queens_slvr-0.1.14.tar.gz -
Subject digest:
da706e622cb21330d296a8ba5b59fd03925d0a7d95849311db557f7f866605b1 - Sigstore transparency entry: 1530875736
- Sigstore integration time:
-
Permalink:
zhuxr11/queens_solver@7ff5745de3791ed2471a80845ce8d7d8704206dc -
Branch / Tag:
refs/heads/master - Owner: https://github.com/zhuxr11
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
upload-pypi.yaml@7ff5745de3791ed2471a80845ce8d7d8704206dc -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file queens_slvr-0.1.14-py3-none-any.whl.
File metadata
- Download URL: queens_slvr-0.1.14-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
492fbe1ffae8cd3f285708c215568c4c9a2649f05aef90d7a85dee82b77d00a3
|
|
| MD5 |
47fcef26e9d62f95dd1ababce44c4d26
|
|
| BLAKE2b-256 |
df1ed522063e7a2dcece42458338aa5dda20122b81a76eee958064fc8757f85e
|
Provenance
The following attestation bundles were made for queens_slvr-0.1.14-py3-none-any.whl:
Publisher:
upload-pypi.yaml on zhuxr11/queens_solver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
queens_slvr-0.1.14-py3-none-any.whl -
Subject digest:
492fbe1ffae8cd3f285708c215568c4c9a2649f05aef90d7a85dee82b77d00a3 - Sigstore transparency entry: 1530875815
- Sigstore integration time:
-
Permalink:
zhuxr11/queens_solver@7ff5745de3791ed2471a80845ce8d7d8704206dc -
Branch / Tag:
refs/heads/master - Owner: https://github.com/zhuxr11
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
upload-pypi.yaml@7ff5745de3791ed2471a80845ce8d7d8704206dc -
Trigger Event:
workflow_dispatch
-
Statement type: