Re: Random labeling options for CLPFD

From: <>
Date: Sun, 8 Nov 2015 07:54:32 +0300

> 5 нояб. 2015 г., в 20:10, <> <> <> написал(а):
>> 5 нояб. 2015 г., в 16:04, Michael Hanus <> написал(а):
>> 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 :-)
> Alex

P.S.: This also means that current comment in CLPFD/CLP.FD for random_variable is incorrect (but fits random_value). Sorry for this! I was as well confused due to absent notes on these two swipl labeling options.
curry mailing list

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

This archive was generated by hypermail 2.3.0 : Do Jun 20 2024 - 07:15:13 CEST