aicad 1.0.0-rc.1

A library to solve Constraint satisfaction problems with Multi-valued decision diagrams and, optionnaly, neural networks
Documentation

AICAD

Blazingly fast MDD compilation for constraint satisfaction problems with search strategies built on top of it. Compile a set of constraints into a decision diagram, query it, or solve it, with or without a trained neural network.

aicad is a Rust crate, and pyaicad is the Python package built on it.

import pyaicad as ac

model = ac.Model()
x = model.int_vars((4, 4), domain=range(4))              # a 4 x 4 grid of variables
model.add(ac.all_different(row) for row in x)             # latin square: rows ...
model.add(ac.all_different(col) for col in zip(*x))       # ... and columns

mdd = ac.Compiler(model).compile()                        # exact diagram
mdd.count()                                               # 576

Documentation

Everything about using and extending the library is in the aicad documentation:

  • Installation: the Python package (slim and full builds), the Rust crate, and building from source.
  • The Python guide and the Rust guide: modelling, compiling, relaxing, local search and learning, with the same examples in both languages.
  • The Python API reference, and the Rust API.
  • Contributing: adding a constraint, a destroy operator, a search architecture or a neural network.

License

MIT, see LICENSE.