PyCSP3: Modeling Combinatorial Constrained Problems in Python
cs.AI
Submitted: 2020-09-01
Updated: 2026-09-01
Comments: 191 pages
Code: https://github.com/xcsp3team/pycsp3
License: http://creativecommons.org/licenses/by-sa/4.0/
The gist: In this document, we introduce PyCSP 3, a Python library that allows us to write models of combinatorial constrained problems in a declarative manner.
Terminology
Abstract
In this document, we introduce PyCSP 3, a Python library that allows us to write models of combinatorial constrained problems in a declarative manner. Currently, with PyCSP 3, you can write models of constraint satisfaction and optimization problems. More specifically, you can build CSP (Constraint Satisfaction Problem) and COP (Constraint Optimization Problem) models. Importantly, there is a complete separation between the modeling and solving phases: you write a model, you compile it (while providing some data) in order to generate an XCSP 3 instance (file), and you solve that problem instance by means of a constraint solver. You can also directly pilot the solving procedure in PyCSP 3, possibly conducting an incremental solving strategy. In this document, you will find all that you need to know about PyCSP 3, with more than 50 illustrative models.
Sources
- Proceedings of the 2022 XCSP3 Competition
- Proceedings of the 2023 XCSP3 Competition
- XCSP3: An Integrated Format for Benchmarking Combinatorial Constrained Problems
- XCSP3-core: A Format for Representing Constraint Satisfaction/Optimization Problems
- ACE, a generic constraint solver
Related papers
- MAVEN-T: Reinforced Heterogeneous Distillation for Real-Time Multi-Agent Trajectory Prediction
- Model Discovery Agent: LLM-assisted Bayesian experiment design for data-efficient discovery of mechanistic world models
- The Clinician's Veto: Navigating Trust, Liability, and Uncertainty in Autonomous AI Prescribing
- MindHelper: Closed-Loop Embodied Mental-State Reasoning for Precision Intervention
- Incumbent Advantage: Brand Bias and Cognitive Manipulation Dynamics in LLM Recommendation Systems
- VSAL: A Vision Solver with Adaptive Layouts for Graph Property Detection