[gecode-users] AFC decay with global AFC in search engines

Kish Shen kisshen at cisco.com
Fri May 9 19:46:48 CEST 2014


Hi,

I have been testing AFC decay as used in our ECLiPSe Gecode interface 
code, and I suspect the decay specification is ignored:

We use Gecode's older (pre version 4) interface for AFC, i.e. with the 
AFC applied to all variables in the space, mainly because we want to use 
AFC when the search is done in ECLiPSe.

I did not significantly change the code for using AFC with Gecode's DFS 
search engine when moving from Gecode 3 to 4, i.e. I use e.g. 
INT_VAR_AFC_MAX() (also similarly for the other AFC selection 
strategies) in setting the variable selection (select) in

branch(*solver, vars, select, choice)

To set the decay, I do

solver->afc_decay(decay)

before the call to branch().

However, as far as I can tell from running with examples, this setting 
of the decay does not seem to do anything, as I get the same solution in 
essentially the same amount of runtime regardless of the decay setting 
(I tested with 1.0 and 0.0).

To see if changing the decay should make a difference, I did the search 
in ECLiPSe (i.e. not using the search engines), using the same variable 
selection and value choice, and here, for the example I tried (first 
solution, NQueens), setting the decay did make a significant difference 
to the run time, and a different solution is returned for a decay of 1.0 
and 0.0 -- the solution that is returned when the decay is set to 1.0 
seems to be the same one as when the DFS search engine is used.

Is this because the use of INT_VAR_AFC_MAX() actually sets the decay to 1.0?

Thanks in advance for any information!

Cheers,

Kish



More information about the users mailing list