[Edu-sig] python wrappers for gecode

Laura Creighton lac at strakt.com
Wed Mar 22 17:32:30 CET 2006

Somebody was looking for these earlier.  According to the bottom of this
message, Logilab has a primative version of this now.


------- Forwarded Message

Return-Path: python-logic-bounces at www.logilab.org
Delivery-Date: Wed Mar 22 16:43:13 2006
Return-Path: <python-logic-bounces at www.logilab.org>
Subject: Re: [Python-logic] Additional informations about the CSP library
	in Python
From: =?ISO-8859-1?Q?Aur=E9lien_Camp=E9as?= <aurelien.campeas at logilab.fr>
To: python-logic at www.logilab.org, saymon at netium.com.br, saymon at netium.com.br
List-Id: Logic and constraint propagation for Python

On Wed, 2006-03-22 at 10:48 -0400, saymon at netium.com.br wrote:
> Hello,
> I was looking for a CSP library to work with, as I have to make a software
> that involves Constraint Satisfaction, and I found Logilab's library, 
> as a recommendation from my Master-in-Science course tutor (I am 
> studing in the university to get the MSc title in Artificial Intelligence). 
> Now I am trying to use it, after reading a Python tutorial, 
> but I still have some problems on using that CSP library. Do you 
> have any additional documentation about it (the possible commands, 
> how they are used, etc.)? 

I think not. At this point, the source might be yout best documentation
(it is quite readable). Note that all the available public methods are
probably exposed in the web site demo. Which one do you feel is
missing ?

> I am working only with the informations you 
> published on the web page, and now they are not enough, as the software
> I am building deals with constraints with numbers, not literals.

There is nothing special about the kind of constraints you want to use.
Logilab constraint.py is quite agnostic about that.
Your have to ensure you give the correct operators (as constraints) to
the repository ...

You might feel that this package misses a very important optimisation :
it lacks dedicated propagators for integer variables (basically a linear
constraint solver) and thus its performance sucks in this area, compared
to other more complete solvers. This pathological behaviour shows for
instance in the naive specification of the send more money problem.

If you need good performance with numbers, you should have a look at
Mozart/Oz which contains a whole high-level constraint solving machinery
- - which actually inspired logilab constraint package. Oz solver works
very well and can help you debug your problem in powerful ways.

If you are looking for *extreme* performance, then have a look at
gecode, all written in plain C++, which is basically the Oz solver minus
the concurrency management, but plus more stuff ... 

Note that there is currently a thin wrapper for python -> gecode
currently in gestation at logilab. If you are interested in helping
contraint.py benefit from the ultra-efficient gecode by completing the
wrapper, you are welcome - just ask, and I'll talk with Ludovic here
which is sitting on a primitive version of it.


> Thanks a lot in advance.
> Saymon Erickson
> Manaus - Brazil
> _______________________________________________
> Python-logic mailing list
> Python-logic at lists.logilab.org
> http://lists.logilab.org/mailman/listinfo/python-logic

Python-logic mailing list
Python-logic at lists.logilab.org

------- End of Forwarded Message

More information about the Edu-sig mailing list