Search code examples
constraint-programmingnon-deterministicconstraint-satisfaction

Non-deterministic CSP programming tool?


Hi i need a non deterministic constraint satisfaction problem tool, because i need different solutions with the same input of the problem. Someone knows about a tool with this characteristic?

I only know tools like Gecode (c++), Choco (Java) and Curry (Haskell) that i think work in deterministic way.


Solution

  • If what you want is to get some random solution, most CP tools have some support for using randomised heuristics. For example, the standard Gecode branchers have options for this, for example INT_VAR_RND and INT_VAL_RND for integer variables. To get a different search each time, make sure to set the seed uniquely.

    Note that using random heuristics will not give you any guarantee of the distribution. For example, your problem might have only two solutions, but almost all random choices might lead to one of the solutions giving a very skewed distribution.