Feasibility and Availability based Heuristics for ACO

0 downloads 0 Views 291KB Size Report
Jul 11, 2018 - Feasibility and Availability based Heuristics for ACO ... ACO + Oblivion Rate [GC13] .... Advances in Water Resources, 30(4):954 – 965, 2007.
Feasibility and Availability based Heuristics for ACO algorithms solving Binary CSP Nicol´as Rojas-Morales† , Maria-Cristina Riff and Bertrand Neveu † [email protected] Departamento de Inform´ atica Universidad T´ ecnica Federico Santa Mar´ıa Valpara´ıso

11th July, 2018 2018 IEEE Congress on Evolutionary Computation Rio de Janeiro, Brazil

1/33

1

Introduction

2

Baseline algorithm: Ant Solver

3

Our approach

4

Experiments and Results

5

Conclusions and Future Work

6

References

2/33

Introduction

Introduction: CSP

A Constraint Satisfaction Problem (CSP) can be defined as a triple (X , D, C ) where: X is the set of variables X = [x1 , . . . , xN ] D is the set of domains D = [D1 , . . . , DN ] C is the set of constraints among variables The goal is to find a complete instantiation IC that satisfies all the constraints.

3/33

Introduction

Introduction: CSP

A Constraint Satisfaction Problem (CSP) can be defined as a triple (X , D, C ) where: X is the set of variables X = [x1 , . . . , xN ] D is the set of domains D = [D1 , . . . , DN ] C is the set of constraints among variables The goal is to find a complete instantiation IC that satisfies all the constraints. Binary CSPs → Each constraint considers only two variables

3/33

Introduction

Introduction: Ant-based Algorithm

Ant-based algorithms Construction algorithm → Inspired in the behavior of real ants Intermediate decisions are taken based on: Heuristic knowledge - specific information of the problem of interest Pheromone information - communicate interesting paths to the colony

Pheromone is (globally/locally) updated in every iteration considering a heuristic H In some cases, a local search procedure is included

4/33

Introduction

Introduction: Ant-based Algorithms for CSP

Some ant-based algorithms have been proposed for solving CSPs: ACON [YZNL17] ACOU [ZZ17] N-Queen ACO [KBS+ 09] ACO + Oblivion Rate [GC13] Ant Solver [Sol02] Opposite Learning Ant Solver [RMRM16a]

5/33

Baseline algorithm: Ant Solver

Ant Solver Baseline Algorithm

6/33

Baseline algorithm: Ant Solver

Ant Solver Baseline Algorithm a MAX − MIN Ant System [SH00] algorithm proposed for solving CSPs

6/33

Baseline algorithm: Ant Solver

Ant Solver

Main components Searches for a solution that minimizes the number of unsatisfied constraints

7/33

Baseline algorithm: Ant Solver

Ant Solver

Main components Searches for a solution that minimizes the number of unsatisfied constraints There are two decisions for each assignment: 1 2

Selection of the next variable → given criteria Selection of the value → state transition rule

7/33

Baseline algorithm: Ant Solver

Ant Solver

Main components Searches for a solution that minimizes the number of unsatisfied constraints There are two decisions for each assignment: 1 2

Selection of the next variable → given criteria Selection of the value → state transition rule

Heuristic knowledge represents the effect of an assignment in terms of the number of unsatisfied constraints: ηIp (hXj , v i) =

1 1 + F (hXj , v i ∪ Ip ) − F (Ip )

(1)

where F is the number of conflicts of the partial instantiation.

7/33

Baseline algorithm: Ant Solver

Ant Solver

Main components Pheromone represents the desirability of a simultaneous assignment (hXi , v i, hXj , w i)

8/33

Baseline algorithm: Ant Solver

Ant Solver

Main components Pheromone represents the desirability of a simultaneous assignment (hXi , v i, hXj , w i) Heuristic H: an amount of ∆τ will be deposited (in each pair of vertices (i, j)): 1 ∆τ(IC , i, j) = (2) F (IC ) where F is the number of conflicts and IC is the best quality complete instantiation constructed in the current iteration

8/33

Baseline algorithm: Ant Solver

Ant Solver

Main components Pheromone represents the desirability of a simultaneous assignment (hXi , v i, hXj , w i) Heuristic H: an amount of ∆τ will be deposited (in each pair of vertices (i, j)): 1 ∆τ(IC , i, j) = (2) F (IC ) where F is the number of conflicts and IC is the best quality complete instantiation constructed in the current iteration Ant Solver (AS) includes pre and post processing steps that use a min-conflicts based local search procedure

8/33

Our approach

Our approach Feasibility and Availability Based Heuristics

9/33

Our approach

Our approach Feasibility and Availability Based Heuristics Feasibility: in terms of minimizing the number of conflicts Availability: related to choosing conflicts “easy” to be repaired

9/33

Our approach

Example

Partial instantiation IP constructed by Ant Solver: IP = {hXr , ai, hXs , bi}

10/33

Our approach

Example

Partial instantiation IP constructed by Ant Solver: IP = {hXr , ai, hXs , bi} Let Xj be the next variable to be instantiated

10/33

Our approach

Example

Partial instantiation IP constructed by Ant Solver: IP = {hXr , ai, hXs , bi} Let Xj be the next variable to be instantiated Let us define U as the number of pairs of incompatible values between two variables

10/33

Our approach

Example

Partial instantiation IP constructed by Ant Solver: IP = {hXr , ai, hXs , bi} Let Xj be the next variable to be instantiated Let us define U as the number of pairs of incompatible values between two variables The next possible values to be assigned are w , y and z: Assignment hXj , w i hXj , y i hXj , zi †

#Conflicts 0 1 1

Conflict with hXr , ai hXs , bi

U 12 20

: Assignments that produce conflicts, if are part of the best quality solution of an iteration, will be also

marked with pheromone

10/33

Our approach

Our approach

We define a function E that quantifies the number of incompatible pairs of values between a candidate assignment and assignments in a partial instantiation when a conflict is produced: X E(hXj , w i, IP ) = U(hXj , w i, hXr , ai) (3) hXr ,ai∈IP

11/33

Our approach

Our approach

We define a function E that quantifies the number of incompatible pairs of values between a candidate assignment and assignments in a partial instantiation when a conflict is produced: X E(hXj , w i, IP ) = U(hXj , w i, hXr , ai) (3) hXr ,ai∈IP

and in a complete instantiation: E(IC ) =

X

U(hXj , w i, hXr , ai)

(4)

(hXj ,w i,hXr ,ai)∈IC †

Notice that when an assignation does not produces a conflict, U is 0.

11/33

Our approach

Focused Ant Solver

We propose Focused Ant Solver (FAS), replacing some components of AS: Heuristic Knowledge will be defined as: η(hXj , w i) = ηIp (hXj , w i) +

1 (1 + E(hXj , w i, IP ))2

(5)

12/33

Our approach

Focused Ant Solver

We propose Focused Ant Solver (FAS), replacing some components of AS: Heuristic H: an amount of pheromone ∆τ will be deposited: ∆τ (ICE , (hXj , w i, hXr , ai)) =

1 F (ICE )

(6)

ICE : the complete instantiation with the lowest number of conflicts and the lowest E function value of the current iteration, (hXj , w i, hXr , ai) is a non conflict pair of assignments F (ICE ) is the quality of ICE

13/33

Experiments and Results

Experiments and Results

14/33

Experiments and Results

Experiments and Results

Experiments Setup We considered a set of 100 randomly-generated binary CSP instances from the transition phase, using Model A [GMP+ 01]. Each instance considers 100 variables and 8 values per domain. A number of 20 independent executions were considered per instance. The stopping criterion was defined as 4 × 109 conflict checks. Parameter values were defined using EVOCA [MR13]: Algorithm Ant Solver Focused Ants

nbAnts 9 46

α 15.0 15.5

β 4.5 14.4

ρ 0.0001 0.0005

τmax 17.0000 26.3931

15/33

Experiments and Results

Results p2 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.30 0.31

AS 100,0 63,5 35,5 13,0 36,0 50,0 80,0 99,5 97,5 100,0

AS-T 100,0 84,0 59,5 47,5 64,0 58,0 93,5 100,0 99,0 100,0

FAS 100,0 93,5 73,5 65,5 65,0 65,5 99,0 100,0 98,0 100,0

Table : Success rate obtained by AS, AS-T and FAS considering different p2 categories with (100, 8, 0,14, p2 ) †

: We defined a success rate (SR) as SR = 100 ∗

SuccessRuns TotalRuns

16/33

Experiments and Results

Execution Time p2 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.30 0.31

AS-T 3.468 35.082 53.327 66.843 53.622 48.468 21.572 3.344 4.508 0.311

FAS 2.881 21.188 36.798 44.443 36.364 35.723 15.890 3.189 4.541 0.340

Table : Average execution time in seconds among the 20 independent runs and the 10 instances per category (p2 )

17/33

Experiments and Results

Wilcoxon Test Results

Comparison AS-T - FAS

PR 218

NR 90

Ties 1692

Total 2000

p-value 0.00

Table : Wilcoxon test results †

: For the comparison the number of Positive Ranks (PR), Negative Ranks (NR) and Ties, total comparisons

and p-value are showed.

18/33

Conclusions and Future Work

Conclusions and Future Work

We propose two heuristics based in the feasibility and availability of candidate assignments The objective is to discriminate between assignments that can lead the construction process to feasible complete instantiations We included this information in Ant Solver in its Heuristic Knowledge and Pheromone management Results show that the inclusion of these heuristics in Ant Solver improves its search process, obtaining more non conflict complete instantiations. For future work we are interested in: Evaluate the proposed heuristics in other CSPs/combinatorial problems Evaluate the inclusion of Opposition-Inspired Learning strategies in FAS [RRM17]

19/33

Conclusions and Future Work

Feasibility and Availability based Heuristics for ACO algorithms solving Binary CSP Nicol´as Rojas-Morales† , Maria-Cristina Riff and Bertrand Neveu † [email protected] Departamento de Inform´ atica Universidad T´ ecnica Federico Santa Mar´ıa Valpara´ıso

11th July, 2018 2018 IEEE Congress on Evolutionary Computation Rio de Janeiro, Brazil

20/33

References

References I M.H. Afshar. Partially constrained ant colony optimization algorithm for the solution of constrained optimization problems: Application to storm water network design. Advances in Water Resources, 30(4):954 – 965, 2007. T. Bartz-Beielstein and M. Preuss. Experimental research in evolutionary computation. In Genetic and Evolutionary Computation Conference, GECCO 2007, Proceedings, London, England, UK, July 7-11, 2007, Companion Material, pages 3001–3020. ACM, 2007. G.-F. Deng and W.-T. Lin. Ant colony optimization-based algorithm for airline crew scheduling problem. Expert Systems with Applications, 38(5):5787 – 5793, 2011. M. Dorigo. Optimization, learning and natural algorithms. Ph. D. Thesis, Politecnico di Milano, Italy, 1992. 21/33

References

References II A. E. Eiben and Zs. Ruttkay. Constraint satisfaction problems, 1997. A. Gonz´alez-Pardo and D. Camacho. A new CSP graph-based representation for ant colony optimization. In Proceedings of the IEEE Congress on Evolutionary Computation, CEC 2013, Cancun, Mexico, June 20-23, 2013, pages 689–696, 2013. I. P. Gent, E. Macintyre, P. Prosser, B. M. Smith, and T. Walsh. Random constraint satisfaction: Flaws and structure. Constraints, 6(4):345–372, 2001. M. Khichane, P. Albert, and C. Solnon. An ACO-Based Reactive Framework for Ant Colony Optimization: First Experiments on Constraint Satisfaction Problems. In T. St¨ utzle, editor, Learning and Intelligent Optimization, pages 119–133. Springer Berlin Heidelberg, 2009.

22/33

References

References III

S. Khan, M. Bilal, M. Sharif, M. Sajid, and R. Baig. Solution of N-Queen problem using ACO. In Multitopic Conference, 2009. INMIC 2009. IEEE 13th International, pages 1–5. IEEE, 2009. V. Kumar. Algorithms for constraint-satisfaction problems: A survey. AI magazine, 13(1):32, 1992. E. MacIntyre, P. Prosser, B. Smith, and T. Walsh. Random constraint satisfaction: Theory meets practice. In Principles and Practice of Constraint Programming - CP98, 4th International Conference, Pisa, Italy, October 26-30, 1998, Proceedings, volume 1520 of Lecture Notes in Computer Science, pages 325–339. Springer, 1998.

23/33

References

References IV E. Montero and M.-C. Riff. A new algorithm for reducing metaheuristic design effort. In Proceedings of the IEEE Congress on Evolutionary Computation, CEC 2013, Cancun, Mexico, June 20-23, 2013, pages 3283–3290. IEEE, 2013. A. Roli, C. Blum, and M. Dorigo. Aco for maximal constraint satisfaction problems, 2001. N. Rojas-Morales, M.-C. Riff, and E. Montero. Ants can learn from the opposite. In Proceedings of the Genetic and Evolutionary Computation Conference 2016, GECCO ’16, pages 389–396. ACM, 2016. N. Rojas-Morales, M.-C. Riff, and E. Montero. Learning from the opposite: Strategies for ants that solve multidimensional knapsack problem. In IEEE Congress on Evolutionary Computation, CEC 2016, Vancouver, BC, Canada, July 24-29, 2016, pages 193–200. IEEE, 2016. 24/33

References

References V N. Rojas-Morales, M.-C. Riff, and E. Montero. A survey and classification of opposition-based metaheuristics. Computers & Industrial Engineering, 110:424–435, 2017. T. St¨ utzle and H. Hoos. MAX–MIN Ant System. Future Generation Computer Systems, 16(8):889–914, 2000. L. Schoofs and B. Naudts. Ant colonies are good at solving constraint satisfaction problems. In Proceedings of the 2000 Congress on Evolutionary Computation. CEC00 (Cat. No.00TH8512), volume 2, pages 1190–1195, 2000. C. Solnon. Ants can solve constraint satisfaction problems. IEEE Trans. Evolutionary Computation, 6(4):347–357, 2002.

25/33

References

References VI

K. Ye, C. Zhang, J. Ning, and X. Liu. Ant-colony algorithm with a strengthened negative-feedback mechanism for constraint-satisfaction problems. Information Sciences, 406:29–41, 2017. Q. Zhang and C. Zhang. An improved ant colony optimization algorithm with strengthened pheromone updating mechanism for constraint satisfaction problem. Neural Computing and Applications, 2017.

26/33

References

Appendices

27/33

References

Ant Solver Input: Define parameters values Output: Overall best solution reached 1: Pre-processing(nBest,) 2: InitializePheromoneTrails() 3: while F (IC ) > 0 or maxChecks not reached do 4: for k = 1 → nbAnts do 5: IkC ← ConstructCompleteInstantiation() 6: Post-processing(IkC ); 7: end for 8: UpdatePheromoneTrails(ILBest ); C 9: end while 10: return IGBest C

28/33

References

Ant Solver

Ant Solver algorithm for CSP

29/33

References

Further Ant Solver details The global pheromone updating rule is defined as: τijnew = (1 − ρ) ∗ τijold + ∆τ (ICLBest , i, j)

(7)

where τijnew is the updated pheromone value for edge (i, j), τijold is the current pheromone value for edge (i, j) and ρ is the decreasing rate used for pheromone evaporation. Ant Solver has seven parameters: α, β, ρ, τmax , nbAnts, nbBest and .

30/33

References

Experiments Setup

Binary CSP’s can be generated at random considering four parameters hn, m, p1 , p2 i: n defines the number of variables, m corresponds to the number of possible values in the domain of each variable, p1 ∈ [0, 1] represents the connectivity, i. e. it determines the number of constraints and p2 ∈ [0, 1] corresponds to the tightness of the constraints, i. e. it determines the number of incompatible pairs of values for each constraint. Model A: each one of the n ∗ (n − 1)/2 possible edges in GΩ is independently selected with probability p1 , and for each selected edge, each one of the m2 possible pair of values is selected as incompatible with probability p2 . We considered instances with n = 100 variables, m = 8 domain sizes, p1 = 0,14 and p2 ranging from 0,22 to 0,31.

31/33

References

Constrainedness measure [MPSW98]: κ(n, m, p1 , p2 ) =

n−1 1 ∗ p1 ∗ logm ( ) 2 1 − p2

(8)

- κ ≈ 0, problems are under-constrained and soluble - κ ≈ ∞, problems are over-constrained and insoluble - κ ≈ 1 problems are between solubility and insolubility and is difficult to find a solution or to prove there are none. p2

0.22

0.23

0.24

0.25

0.26

0.27

0.28

0.29

0.30

0.31

κ

0.828

0.871

0.915

0.959

1.003

1.049

1.095

1.141

1.189

1.237

Table : κ values for the selected p2 values

32/33

References

Parameter values for Ant Solver and Focused Ants were defined using a tuner algorithm called Evolutionary Calibrator (EVOCA) [MR13]: Ant Solver performs a pre-processing step to initialize the pheromone matrix. During this step some instances from p2 = [0,22, 0,23, 0,29, 0,30, 0,31] categories can be solved. In order to correctly evaluate parameter configurations, instances only from p2 = [0,24, 0,25, 0,26] categories were used during the tuning process.

33/33