[gecode-users] Value selection when branching

Lars Otten ottenl at student.chalmers.se
Mon Feb 13 18:02:38 CET 2006


On 02/10/06 15:22, Lars Otten wrote:
> Turns out it wasn't easy as it seemed:
> [...]
> So I guess I'll have to revise it yet again... :-/

Finally it seems to work, after digging deeper into the DFS engine I came up
with the following:

The Branching object instances still keep a record of their resp. random
seeds and reinitialise the random number generator everytime a random choice
is to be made. This way, as long as a given space does not change its
'state', the random choices will be deterministic.

At the end of the Branching's commit function, though, we can be sure that
something in the space's state has changed, i.e. that at least one
variable's domain has changed. Thus at this time we can change the
Branching's random seeds, so that in the new state the random choices will
be different (but still consistent).

One question is then of course how to reinitialise the random seeds after
commiting, I'm currently looking into several ideas for this...

Thanks to Mikael for tipping me off towards this approach. :)

/Lars




More information about the gecode-users mailing list