Re: Random labeling options for CLPFD

From: <>
Date: Thu, 5 Nov 2015 20:10:34 +0300

> 5 нояб. 2015 г., в 16:04, Michael Hanus <> написал(а):
> On 11/05/2015 07:11 AM, wrote:
>>> 4 нояб. 2015 г., в 18:48, Michael Hanus <> написал(а):
>>> Hi Alex,
>>> it is no problem to add this extension to the next release of PAKCS.
>>> There is the disadvantage that this does not work with SICStus Prolog,
>>> but at least you get a reasonable error message from the Prolog system.
>>> Best regards,
>>> Michael
>> Could you please also add random_value(Seed) in a same way?
> Sure, I could do it, but since it is an undocumented feature,
> please could you explain the difference between random_value
> and random_variable (in order to put the right documentation
> comment into the library)?
> Best regards,
> Michael

Michael, I will try.

random_variable is the variable selection strategy: the random variable is selected next for instantiation (so stochastic not yet tried permutation per solution in contrast to controlled vars traversal in other strategies).
random_value is the value order option: the domain is explored for instantiation in random order (set random not yet tried value within domain to selected variable instead of incrementation with up/down orders).

They may be used separately for a single solution with either random permutation or random set of values requirements, or combined together for random distribution when multiple solutions are needed. The only current problem I know is that they both set the seed, so when used together, the option order matters: Not a case for time-dependent seed value though :-)


> _______________________________________________
> curry mailing list
> curry_at_lists.RWTH-Aachen.DE
> http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry

curry mailing list

Received on Di Nov 10 2015 - 11:23:45 CET

This archive was generated by hypermail 2.3.0 : Mo Dez 04 2023 - 07:15:14 CET