A Numpy and Numba based Python library for solving Constraint Satisfaction Problems over finite domains
Project description
TLDR
NUCS is a Python library for solving Constraint Satisfaction and Optimization Problems. Because it is 100% written in Python, NUCS is easy to install and use. NUCS is also very fast because it is powered by Numpy and Numba.
Documentation
Check out NUCS documentation.
With NUCS, in a few seconds you can ...
Compute the 92 solutions to the BIBD(8,14,7,4,3) problem:
{
'OPTIMIZER_SOLUTION_NB': 0,
'PROBLEM_FILTER_NB': 2797,
'PROBLEM_PROPAGATOR_NB': 462,
'PROBLEM_VARIABLE_NB': 504,
'PROPAGATOR_ENTAILMENT_NB': 36977,
'PROPAGATOR_FILTER_NB': 564122,
'PROPAGATOR_FILTER_NO_CHANGE_NB': 534436,
'PROPAGATOR_INCONSISTENCY_NB': 1307,
'SOLVER_BACKTRACK_NB': 1398,
'SOLVER_CHOICE_DEPTH': 41,
'SOLVER_CHOICE_NB': 1398,
'SOLVER_SOLUTION_NB': 92
}
Demonstrate that the optimal 10-marks Golomb ruler length is 55:
{
'OPTIMIZER_SOLUTION_NB': 10,
'PROBLEM_FILTER_NB': 22204,
'PROBLEM_PROPAGATOR_NB': 82,
'PROBLEM_VARIABLE_NB': 45,
'PROPAGATOR_ENTAILMENT_NB': 416934,
'PROPAGATOR_FILTER_NB': 2145268,
'PROPAGATOR_FILTER_NO_CHANGE_NB': 1129818,
'PROPAGATOR_INCONSISTENCY_NB': 11065,
'SOLVER_BACKTRACK_NB': 11064,
'SOLVER_CHOICE_DEPTH': 9,
'SOLVER_CHOICE_NB': 11129,
'SOLVER_SOLUTION_NB': 10
}
Find all 14200 solutions to the 12-queens problem:
{
'OPTIMIZER_SOLUTION_NB': 0,
'PROBLEM_FILTER_NB': 262011,
'PROBLEM_PROPAGATOR_NB': 3,
'PROBLEM_VARIABLE_NB': 36,
'PROPAGATOR_ENTAILMENT_NB': 0,
'PROPAGATOR_FILTER_NB': 1910609,
'PROPAGATOR_FILTER_NO_CHANGE_NB': 631079,
'PROPAGATOR_INCONSISTENCY_NB': 116806,
'SOLVER_BACKTRACK_NB': 131005,
'SOLVER_CHOICE_DEPTH': 10,
'SOLVER_CHOICE_NB': 131005,
'SOLVER_SOLUTION_NB': 14200
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nucs-0.8.1.tar.gz
(26.5 kB
view details)
Built Distribution
NUCS-0.8.1-py3-none-any.whl
(53.3 kB
view details)
File details
Details for the file nucs-0.8.1.tar.gz
.
File metadata
- Download URL: nucs-0.8.1.tar.gz
- Upload date:
- Size: 26.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 712d574ff8912dafba137845a5269033ef60c3ae76b88575dd9a4aa02d6996ae |
|
MD5 | aae144293f16fc219a8e995acce507f6 |
|
BLAKE2b-256 | a4694b0a6b7a54decfba03cc8f03949c93affcf93ef8624022bc612462182619 |
File details
Details for the file NUCS-0.8.1-py3-none-any.whl
.
File metadata
- Download URL: NUCS-0.8.1-py3-none-any.whl
- Upload date:
- Size: 53.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b471d301da124efc8edb51bba611c5977c1000d9df4bb288326f61e93d618f57 |
|
MD5 | e93f30e8bf236fe1479778e07c202bc4 |
|
BLAKE2b-256 | d614bb67d68129e7ae912574752abaa20deebf870735d1fc0a2e9fb1b14ebe25 |