Materials for a constraint programming course

View the Project on GitHub xoolive/constraints

Constraint programming

This is a short course about constraint programming.


Environment setup

Windows users should first activate WSL using the official instructions (French version). Please install the most recent Ubuntu version (unless you have another version ready.)

You will need to set up by yourself the following pieces:

Lab session

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.

The notebook for the basic lab session is notebook/lab-session.ipynb.

Run the following command (in WSL for Windows users):

jupyter lab


Projects should be run as Python scripts from Visual Studio Code.

Open the workspace file (with the WSL connector for Windows users), then access the project folder.

Details about projects are presented on this page.


In case you are stuck with your configuration for the first lab session only, you can fall back to a slightly less comfortable option with Google Colab:

Further reading