Re: ...That label/1 predicate's real efficiency?
- From: "Dirk Mittler" <mdirk@xxxxxxxxxxxx>
- Date: Sat, 27 Aug 2005 21:16:59 -0400
"A.L." <alewando@xxxxxxxxxx> wrote in message
news:ae11h1l651jd7i8b4emq48guvsm2ike38b@xxxxxxxxxx
> On Sat, 27 Aug 2005 10:44:57 -0400, "Dirk Mittler"
> <mdirk@xxxxxxxxxxxx> wrote:
>
>>It was never my intention to complain. {:-)} And I thank you for pointing
>>out that in constraint solvers, "labelling" is an important step. I will
>>look up the subject in more detail then, when I find the time. For now I
>>*imagine* that labelling could satisfy this need of assigning to the
>>attributed variables, after constraints have been specified. This could be
>>why in one Prolog example which I've seen, the 'label' command is given
>>last
>>over several variables to tell the compiler to solve. It will intrigue me
>>then to learn how this command really works.
>
> "labeling" in its simplest form is pretty dumb procedure that uses
> trial-and-error method to "assign" values to domain variables
> ("asign" means selecting a value from variable's domain). It works
> more or less this way:
>
> 1. Select values from domains of all variables and check
> constraints,
> 2. If constraints satisfied, you have solution. If all values have
> been tested, there is no solution
> 3. If not, change value of one selected domain variable and go to 2
>
> Clearly, there are some technical details how to arrange this
> process and make it efficient. See Apt book on constraints about
> details of this process.
I have yet to decide, which of the books I will order, that Amazon ships to
Canada.
But at least, I do feel another book coming on. {:-)}
One afterthought which I have about this labelling predicate: Your reply
makes it sound as though the computer would really need to try out all the
possible combinations of values for the variables, until it finds a
combination which satisfies the constraints. Yet, you avoid actually writing
that. I seem to have observed so far, that in typical cases when one puts
constraints onto a set of variables, these constraints can derive some of
the variables from only a very few which have been set "by trial and error"
.. I've written one simple case where an entire series of solutions follows
from only one fact, plus from constraints. With no label/1 command at all.
So what seems like a "dumb procedure" could actually be more efficient
already, than it sounds. It might be necessary only to run 1 or 2 out of 7
variables through their finite domains, before the other ones all follow
from unifications which stem from these attributes. The label/1 predicate,
which takes a list of variables, might succeed as soon as none of them are
left unbound, but succeed through the propagation of the constraints which
have already been applied.
Am I correct?
Dirk
P.S. I'm generally reluctant to switch from one software platform to the
other, because I trust software which already installed correctly, and which
didn't make any mess in doing so. SWI Prolog seems good enough for me.
.
- Follow-Ups:
- Re: ...That label/1 predicate's real efficiency?
- From: A . L .
- Re: ...That label/1 predicate's real efficiency?
- References:
- Re: I now realize WHY my 'consistency check' was pointless: CLP.
- From: A . L .
- Re: ...Contemplating unspecified constraint SOLVERS.
- From: Dirk Mittler
- Re: ...Contemplating unspecified constraint SOLVERS.
- From: A . L .
- Re: ...Contemplating unspecified constraint SOLVERS.
- From: Dirk Mittler
- Re: ...Contemplating unspecified constraint SOLVERS.
- From: A . L .
- Re: I now realize WHY my 'consistency check' was pointless: CLP.
- Prev by Date: Re: I now realize WHY my 'consistency check' was pointless: CLP.
- Next by Date: Re: I now realize WHY my 'consistency check' was pointless: CLP.
- Previous by thread: Re: ...Contemplating unspecified constraint SOLVERS.
- Next by thread: Re: ...That label/1 predicate's real efficiency?
- Index(es):
Relevant Pages
|
|