[gecode-users] Random Distributions (INT_VAL_RAND)

Christian Schulte cschulte at kth.se
Fri Apr 11 10:19:06 CEST 2014


Actually, there might be an easier way to do. Have a look at the Gecode
source file gecode/kernel/rnd.hpp. If you implement a random number
generator that has the very same interface (just replace
Support::RandomGenerator by your own random number generator) you can use
that instead for the normal branchers.

Cheers
Christian

--
Christian Schulte, Professor of Computer Science, KTH,
www.ict.kth.se/~cschulte/


-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Guido Tack
Sent: Friday, April 11, 2014 10:12 AM
To: negate273 at gmail.com
Cc: users at gecode.org
Subject: Re: [gecode-users] Random Distributions (INT_VAL_RAND)

Have a look at Sect. 8.8 in MPG, it shows how to implement a custom value
selection strategy.

Cheers,
Guido

On 11 Apr 2014, at 5:38 pm, negate273 at gmail.com wrote:

> Are there any implementations for different random distributions for
integer *value* selection, besides the uniform distribution supported by
INT_VAL_RND() ? For Eg. I'd like the values to be distributed based on a
normal distribution or maybe a logarithmic distribution. 
> If not, can you point me to some code which would be a good starting point
to implement such a value selection method, as I'm not sure where the
implementation for INT_VAL_RND exists ? Is it in
gecode/int/branch/val-sel-commit.cpp ?
> There was a thread in May 2009 titled "How to set an arbitrary
RandomGenerator for randomized branching", but  not sure if it ever got
implemented ?
> 
> Thanks, ~az 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users


_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list