[gecode-users] Skipping branching alternatives?

Guido Tack tack at ps.uni-sb.de
Mon Jul 10 15:02:06 CEST 2006


> i tried the first idea i mentioned (just return ES_FAILED from the
> commit(..) function) to skip the alternatives, but this results in
> abnormal behavior. dont know why at the moment and didnt had a closer
> look until now.

Branchings may return ES_FAILED, this should very simply fail the space. How 
exactly did you detect you have to fail the space? Did you try using the 
BranchingDesc as internal state, somehow setting a flag in there that says 
that next time you branch with this description, you have to fail?

> so my question again, is there another possibility? or do i ve got to do
>   it bruteforce via clearing one domain to let the propagators do the
> work for me?

This won't change anything, as clearing a variable's domain always has to be 
reported by returning ES_FAILED. Same problem as above.

> anyway i m still interested in skipping the remaing more directly but
> without reimplementing DFS myself.. ;)

This is slightly against the general architecture of Gecode. One of the main 
achievements in CP research was the clear separation of concerns between 
propagation, branching, and search. Propagation does the inferences within 
one space, branching determines the shape of the search tree, and search 
explores the tree.
Cutting off branches is normally considered part of exploration. The clean 
solution would be to implement something like Branch&Bound or SBDS, which are 
search strategies that take the already explored part of the tree into 
account. In fact, what you describe sounds pretty similar to SBDS - the other 
branches you don't want to explore are in a sense symmetric to the solution 
you just found.

I wouldn't be too scared about writing your own search engine. It's very well 
understood, and you'll get great support from search experts here on the 
list ;-)

Cheers,
	Guido

-- 
Guido Tack
Programming Systems Lab, Saarland University, Germany
http://www.ps.uni-sb.de/~tack




More information about the gecode-users mailing list