https://github.com/lemonpi/cp_solver
Constraint satisfaction problem solver
https://github.com/lemonpi/cp_solver
Last synced: 9 months ago
JSON representation
Constraint satisfaction problem solver
- Host: GitHub
- URL: https://github.com/lemonpi/cp_solver
- Owner: LemonPi
- Created: 2018-07-16T22:48:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-17T20:34:54.000Z (over 7 years ago)
- Last Synced: 2025-06-16T10:00:57.323Z (9 months ago)
- Language: Python
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction
A pure python constraint satisfaction problem solver.
# Installation (development)
Install in editable mode with `py -3 -m pip install -e .` so that
modifications in the repository are automatically synced with the
installed library.
# Testing
Install dependencies
`py -3 -m pip install tox pytest coverage pytest-cov`
Run pytest at top level directly independently
`py -m pytest -s -v --log-cli-level=DEBUG --show-capture=no`
Run tox from any directory to run tests in a virtual environment and tests coverage.
`tox`
# Organization
Everything is under the `cp_solver` package.
Basic components such as `Variable`, `Constraint` and `CSP` are in `cp_solver.base`.
Constraint propagators for pruning purposes such as `ForwardCheck` and
`GeneralArcConsistency` are in `cp_solver.propagator`.
Search algorithms such as `BacktrackSearch` are in `cp_solver.search`.