This is a short course about constraint programming.
- a tl;dr introduction with the bare minimum to know about constraint programming;
- slides for a 3h course, pdf version
A self-documented notebook is available in the notebook folder. The free and open-source facile library is a basic wrapper around the OCaml facile solver. You may find more powerful solvers in your future life but this one should do the job to introduce and illustrate the basic concepts of constraint programming in Python.
You will need a working Python environment. Anaconda is recommended. To access the materials:
git clone https://github.com/xolearn/constraints
cd constraints
pip install -r requirements.txt
jupyter labThe notebook for the basic lab session is notebook/lab-session.ipynb.
In case you are stuck with your configuration, you can fall back to a slightly less comfortable option with Google Colab:
-
click on the link;
-
insert a new cell at the top of the notebook with
!pip install 'facile>=1.5'
and execute it to install the library;
-
all the
%loadcommands for the solutions will not work: you will have to copy paste the solutions directly from each of these files.
More details on this page.
- Constraint Processing (book) by Rina Dechter
- Le problème des 8 reines... et au-delà par Jean-Paul Delahaye.
Pour la science, janvier 2016