Preview
In optimum we trust.
GreyJack Solver is a "jack of all trades" constraint metaheuristic solver for Python, built on the robust foundations of Rust and Polars. It empowers you to tackle a wide array of constraint optimization problems, including continuous, integer, and mixed-integer challenges with ease and efficiency.
Editions
There are 2 editions of GreyJack Solver:
- Python edition
- Rust edition
Key Features of GreyJack Solver
- Unmatched Comfort, Expressiveness, Flexibility and speed of developing Designed to express almost any optimization problem with maximum comfortability and clarity.
- Universality Supports a wide range of constraint problems, including continuous, integer, and mixed-integer challenges. Additionally, thanks to Polars, you can optimize virtually any process that can be represented as table data.
- Python's Comfort Meets Rust's Speed All computationally intensive parts of the solver are implemented in Rust and seamlessly integrated into Python, offering fast development cycles with production-ready performance for ~95% real-world tasks.
- Clarity and Simplicity GreyJack provides a clear and straightforward approach to designing, implementing, and improving effective solutions for nearly any constraint problem and scenario.
- Nearly Linear Horizontal Scaling The multi-threaded solving process is organized as a collective effort of individual agents (using the island computation model for all algorithms), which share results with neighbors during solving. This approach ensures nearly linear horizontal scaling, enhancing both the quality and speed of solutions (depending on agent settings and the problem at hand).
- Support for Population and Local Search Algorithms GreyJack Solver supports a wide range of metaheuristics, including population-based and local search algorithms, with highly flexible settings. You can easily find, select, and configure the approach that best fits your problem, delivering optimal results.
- Easy Integration The observer mechanism (see examples) simplifies integration, making it straightforward to incorporate GreyJack Solver into your existing workflows..
Get started with GreyJack Solver
pip install greyjack
- Clone data for examples from this repo
- Explore, try examples. Docs and guides will be later. GreyJack is very intuitively understandable solver (even Rust version).
- Use examples as reference for solving your tasks.
Supported runtime and native compatibility
GreyJack 0.3.9 requires Python 3.10 or newer. The Python/native compatibility
cohort is Python Polars >=1.44.2,<1.45, Rust Polars 0.55.2,
pyo3-polars 0.28.0, and PyO3 0.29.2. These components cross the native
DataFrame boundary together; upgrading Python Polars beyond this range requires
a matching native rebuild and interoperability checks.
Source builds require Rust 1.95 or newer. The repository toolchain is pinned to
1.98.1 in rust-toolchain.toml; rustup selects it when building this checkout.
CI builds and tests installed wheels for CPython 3.10 through 3.14 on Linux
x86_64 (glibc 2.28+), Windows amd64, and macOS ARM64. Intel macOS is outside the
wheel matrix because mandatory Numba 0.63+ no longer supplies Intel macOS wheels.
The tests resolve dependencies within the supported Polars range and run outside the
checkout and verify the installed package path so local sources cannot conceal
a broken wheel. Workflow configuration describes the checks; successful remote
runs provide the evidence that those checks passed.
CI limits build memory for hosted runners with as little as 7 GB RAM by using ThinLTO, 16 codegen units, no debug information, and two build jobs. These workflow-only overrides retain release optimization level 3; local Cargo release settings are unchanged.
Releases use stripped wheels and one source distribution that is rebuilt and
tested outside the checkout. Branch and manual CI runs only prepare artifacts;
matching v* tag pushes attach them to GitHub releases. PyPI publishing remains
manual. See RELEASING.md for the 0.3.9 changes, artifact inventory,
local build commands, and publishing the exact tested CI files with Maturin.
Develop GreyJack and run examples locally
Install rustup, the pinned Rust toolchain, Python, and uv. From the repository root:
uv sync --project examples --group dev
uv run --project examples --group dev python -m pytest greyjack/tests
uv run --project examples python -m examples.object_oriented.employee_scheduling.scripts.solve_task
The examples project declares greyjack as an editable dependency at
../greyjack, so Python source edits apply to the next process. To rebuild the
native extension after Rust or Cargo changes:
uv sync --project examples --group dev --reinstall-package greyjack
Restart running interpreters after rebuilding the native library. An editable Python installation does not hot-reload Rust code; see uv's local dependency cache behavior. The first build compiles the native dependency stack and can take time.
For a separate, activated virtual environment, a direct source installation is also available from the repository root:
python -m pip install maturin
python -m maturin develop --release --manifest-path greyjack/Cargo.toml
Solver lifecycle
Agent failures surface as RuntimeError in the caller, carrying worker error
details. A failed solve does not silently return a partial success. A normal
stop returns the best available solution, or None if no candidate was produced.
KeyboardInterrupt requests cleanup and is re-raised so the caller retains
control of Ctrl-C handling.
Process-based solving uses spawn-safe startup. Put solver execution under a
if __name__ == "__main__": guard and keep worker-callable code importable.
For example:
def main():
# Construct and run your solver here.
pass
if __name__ == "__main__":
main()
Thread callbacks stop cooperatively. A callback that blocks indefinitely cannot be forcibly interrupted safely; callbacks should finish or observe application cancellation so solver cleanup can complete.
RoadMap
- Types, arguments validation
- Write docs
- Tests, tests, tests... + integration wtih CI/CD
- Composite termination criterion (for example: solving limit minutes N AND score not improving M seconds)
- Multi-level score
- Custom moves support
- Website
- Useful text materials, guides, presentations
- Score explainer / interpreter for OOP API
- Reimplement GreyNet in Rust
Metadata
Release files for greyjack 0.3.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| greyjack-0.3.9.tar.gz | 280.8 kB | Details |
Built distributions (wheels)
Total release size: 285.2 MB
Release files / greyjack-0.3.9.tar.gz
| Download URL | greyjack-0.3.9.tar.gz |
|---|---|
| Size | 280.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4601328e2a3cc948894611bd319144cda6b47c142f762b78c917add66863c91c
|
|
BLAKE2b-256 checksum How to use checksums |
6aaf586f0ec87fd40b1d5d86065378439ce0406d5c5231233da08702c2a01b46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp314-cp314-win_amd64.whl
| Download URL | greyjack-0.3.9-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 20.5 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
747a487b3b85ef4cedf290e012982daea27b4fa716175be09769f241fd14eaf4
|
|
BLAKE2b-256 checksum How to use checksums |
aa6751725e5e7bcead67371c60f26114d4b0e5021db39f116097ba8aec21ba62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | greyjack-0.3.9-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 19.1 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7422ff195319c77c6fb7fad6838f8a3da780b9678f70cee84bff4ff3f484eb39
|
|
BLAKE2b-256 checksum How to use checksums |
0a5b4a25fb575cbaa1716bece0bfa2de8ff29e3c1af1185dc9054467467f51e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | greyjack-0.3.9-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 17.3 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
29ae71bec8d6eb472585387b8c717b240bc39598f26b81ddf6bd3e054b4ed8db
|
|
BLAKE2b-256 checksum How to use checksums |
bb019779c30bda4cb3fcb167389c6e780c36309212af17927aaf4c4cc048d42c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp313-cp313-win_amd64.whl
| Download URL | greyjack-0.3.9-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 20.5 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
09f4805ca900f20ba2b756848ea7aa73d1537590526a623d4204a0cc0d91432e
|
|
BLAKE2b-256 checksum How to use checksums |
721923cd643a0adae4f2a796faa0707a0d80cdd1e1b75b743c47be97bac7541a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | greyjack-0.3.9-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 19.1 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d385a3c60bf6d57dec32931c073ec644976f89e026e1371b3a6e1a78bbb45749
|
|
BLAKE2b-256 checksum How to use checksums |
6c51426e1aecb5de104754957e919c0871040d100706b8b9c16e42426c85267a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | greyjack-0.3.9-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 17.3 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
790e38e819abee506349cfe0127d79844d553b4cd1d0045b3cc6aee4ec36ef80
|
|
BLAKE2b-256 checksum How to use checksums |
78a19793d572d98054c102d782074cd36814d03b9cd8b6ea7131fbf2e0b74cdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp312-cp312-win_amd64.whl
| Download URL | greyjack-0.3.9-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 20.5 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ee664aab0f9d65a823669ede803b9fa14b8e702034e166d1f25a6f246e8c1ff1
|
|
BLAKE2b-256 checksum How to use checksums |
93f066c49a09ed61904682f53bff800af77f5debf5031a5c6667c1a44cce236a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | greyjack-0.3.9-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 19.1 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
95e0512ab8a92718232a192130b8f189ad5b0e1050a0708ac42d3db800b65c3f
|
|
BLAKE2b-256 checksum How to use checksums |
2a744e0830553bb8817b61f84ab8f0858eda8d5654eb9756f588de1c9bce6872
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | greyjack-0.3.9-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 17.3 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b5b88f1a1fff88cd62d55bbe79de73f35fd8bae4090068ccd68936e93721e110
|
|
BLAKE2b-256 checksum How to use checksums |
b6ea3d829dca7eb60f41c7fd186ccf9579d9ead7f48c127bc49d01f17134554a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp311-cp311-win_amd64.whl
| Download URL | greyjack-0.3.9-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 20.6 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7f64f6b6ecfca9ea1cd828fbd724fc4c4c04098ab2b5538db43e2ccefebd52f8
|
|
BLAKE2b-256 checksum How to use checksums |
7abd13b239686fe602251e04d052ad2a2c4b6f7774c3e43892919dc2b094f48b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | greyjack-0.3.9-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 19.2 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
fe2949691400508fc7ab7698cef4d3dc1a1c74a7f66c1dfa8a7c0564f205004d
|
|
BLAKE2b-256 checksum How to use checksums |
512cfad85c355d9f25fa4578c1618cfb1d9e6b268d9be2c789ccd0b90df37738
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | greyjack-0.3.9-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 17.4 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
84168503d81ad53784d0e98933490c5d42b4c2e0d3bbc963565c060838f81b3a
|
|
BLAKE2b-256 checksum How to use checksums |
d2bc3416a2e917c4064467ae4016fcdb7328e50906d9145c51d19852693f8c1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp310-cp310-win_amd64.whl
| Download URL | greyjack-0.3.9-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 20.6 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8450a0b539f978285e8575f53d6e3e6fdf111739de15df3b15169beac801cf84
|
|
BLAKE2b-256 checksum How to use checksums |
42e4a90aa1fb9ecb29fc0f2cc0252a7d0611e1bfcf69ad7045989bbb1117d08a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | greyjack-0.3.9-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 19.2 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
93b7b930778f1dbd1b50edf01a23ce165fb11a502cc5d8976be6b63942466f86
|
|
BLAKE2b-256 checksum How to use checksums |
4918ae74ed6eb725a1d3cc746a23f4f9a36ea29de06a11f65d51d12bcef194e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / greyjack-0.3.9-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | greyjack-0.3.9-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 17.4 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
14bada2b2c9d19a31ba22311bbe235cf59cdecf94ba12718391d8f1e3695e2f8
|
|
BLAKE2b-256 checksum How to use checksums |
18bafd5424a82881dc66dfb26760b62e13d6e00d37d29fa65d1ad09ed2a30c4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|