[eclipse-users] How to ic:search/6 with symmetry breaking during search (sbds) of lib(ic_sbds)?

From: Martin Berger <Martin.Berger_at_...59...>
Date: Wed, 04 Jul 2007 18:34:46 +0200
Hello ECLiPSe users,

I have some problems with and questions to the sbds method of the search 
predicate of libary ic and the corresponding needed predicate 
sbds_initialise/4 of libary ic_sbds.

http://eclipse.crosscoreop.com/doc/bips/lib/ic_sbds/index.html
http://eclipse.crosscoreop.com/doc/bips/lib/ic_sbds/sbds_initialise-4.html

I followed the N-queens example for setting up symmetry predicates given 
as list to sbds_initialise/4. Here is a simplified version of how I 
tried to build my symmetry predicate:

rotate90(Var,Value,SymVar,SymValue) :-
(
	(not var(Value)) -> (
		Var is SymVar,
		(Value == 'left') ->  SymValue is 'rear' ; true,
		(Value == 'right') ->  SymValue is 'front' ; true,
		(Value == 'front') -> SymValue is 'left' ; true,
		(Value == 'rear') -> SymValue is 'right' ; true
	) ; true
).

In my problem, I am facing a pure value symmetry, at least as far as I 
know and understand it! Thats why "Var is SymVar" and the value is set 
to a symmetrical one. The symmetrical group is the dihedral group, the 
symmetry group of a square. The group elements are: identity, 
rotate90/180/270, reflextionX, reflextionY, flipCorner1, flipCorner2.

However now, search is given my a lot more symmetrical solutions than 
without sbds. I am not sure if the problem are the symmetry predicates 
or there is any conflict/sideeffect with the rest of my code. Am I doing 
or understand something completely wrong?

I would happy to see more examples (of you) or a tutorial of how to 
write symmetry predicates for sbds. Or can anybody of you give me some 
advice or hints?

Thank you for your help!

Best regards,
Martin Berger
Received on Wed Jul 04 2007 - 17:34:35 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST