Evolving Binary Constraint Satisfaction Problem Instances that are - - PowerPoint PPT Presentation

evolving binary constraint satisfaction problem instances
SMART_READER_LITE
LIVE PREVIEW

Evolving Binary Constraint Satisfaction Problem Instances that are - - PowerPoint PPT Presentation

Evolving Binary Constraint Satisfaction Problem Instances that are Difficult to Solve Jano van Hemert http://www.cwi.nl/jvhemert < jvhemert@cwi.nl > Dutch National Institute for Mathematics and Computer Science (CWI), Amsterdam Jano


slide-1
SLIDE 1

Evolving Binary Constraint Satisfaction Problem Instances that are Difficult to Solve

Jano van Hemert http://www.cwi.nl/˜jvhemert

<jvhemert@cwi.nl>

Dutch National Institute for Mathematics and Computer Science (CWI), Amsterdam

Jano van Hemert — CEC 2003 – p.1

slide-2
SLIDE 2

Research questions

① How viable are evolutionary algorithms for the creation

  • f difficult problem instances?

Jano van Hemert — CEC 2003 – p.2

slide-3
SLIDE 3

Research questions

① How viable are evolutionary algorithms for the creation

  • f difficult problem instances?

② What can we learn from such difficult problem instances?

Jano van Hemert — CEC 2003 – p.2

slide-4
SLIDE 4

Research questions

① How viable are evolutionary algorithms for the creation

  • f difficult problem instances?

② What can we learn from such difficult problem instances? ③ Can we use this process to discover an algorithm’s weak spots in an automatic manner?

Jano van Hemert — CEC 2003 – p.2

slide-5
SLIDE 5

Binary constraint satisfaction & problem difficulty

Jano van Hemert — CEC 2003 – p.3

slide-6
SLIDE 6

Constraint satisfaction

✔ Given a set of variables X, a set of finite domains D and a set of constraints C (Tsang, 1993)

Jano van Hemert — CEC 2003 – p.4

slide-7
SLIDE 7

Constraint satisfaction

✔ Given a set of variables X, a set of finite domains D and a set of constraints C (Tsang, 1993) ✔ Each xi ∈ X has a corresponding discrete domain Dxi from which they can be assigned the value di, denoted as the tuple xi, di, where di ∈ Dxi

Jano van Hemert — CEC 2003 – p.4

slide-8
SLIDE 8

Constraint satisfaction

✔ Given a set of variables X, a set of finite domains D and a set of constraints C (Tsang, 1993) ✔ Each xi ∈ X has a corresponding discrete domain Dxi from which they can be assigned the value di, denoted as the tuple xi, di, where di ∈ Dxi ✔ Every element c ∈ C is a constraint over a subset of variables of X, it consists of sets that contain tuples of

  • bjects that are not allowed to be assigned

simultaneously

Jano van Hemert — CEC 2003 – p.4

slide-9
SLIDE 9

CSP: the problem

☞ Assign to each xi ∈ X an object from Dxi such that no constraint c ∈ C is violated

Jano van Hemert — CEC 2003 – p.5

slide-10
SLIDE 10

CSP: the problem

☞ Assign to each xi ∈ X an object from Dxi such that no constraint c ∈ C is violated ✎ A solution is written as:

  • x1, d1x2, d2 · · · x|X|, d|X|
  • Jano van Hemert — CEC 2003 – p.5
slide-11
SLIDE 11

CSP: the problem

☞ Assign to each xi ∈ X an object from Dxi such that no constraint c ∈ C is violated ✎ A solution is written as:

  • x1, d1x2, d2 · · · x|X|, d|X|
  • ☞ A binary constraint satisfaction problem is a CSP where

all constraints are associated with at most two variables

Jano van Hemert — CEC 2003 – p.5

slide-12
SLIDE 12

Binary constraint satisfaction

☞ Using four parameters it is possible to make predictions about the difficulty of solving binary CSPs (Smith, 1993; Gent et al., 1996)

Jano van Hemert — CEC 2003 – p.6

slide-13
SLIDE 13

Binary constraint satisfaction

☞ Using four parameters it is possible to make predictions about the difficulty of solving binary CSPs (Smith, 1993; Gent et al., 1996) ① the number of variables n ② the domain size m ③ the constraint density p1 ④ the average tightness of constraints p2

Jano van Hemert — CEC 2003 – p.6

slide-14
SLIDE 14

A binary CSP: parameters

x1 x2 x3 x4

a b c a 1 b 1 1 c a b c a b 1 c 1 1 a b c a 1 b 1 c 1

Jano van Hemert — CEC 2003 – p.7

slide-15
SLIDE 15

A binary CSP: parameters

x1 x2 x3 x4

a b c a 1 b 1 1 c a b c a b 1 c 1 1 a b c a 1 b 1 c 1

n, m, p1, p2 = 4, ?, ?, ?

Jano van Hemert — CEC 2003 – p.7

slide-16
SLIDE 16

A binary CSP: parameters

x1 x2 x3 x4

a b c a 1 b 1 1 c a b c a b 1 c 1 1 a b c a 1 b 1 c 1

n, m, p1, p2 = 4, 3, ?, ?

Jano van Hemert — CEC 2003 – p.7

slide-17
SLIDE 17

A binary CSP: parameters

x1 x2 x3 x4

a b c a 1 b 1 1 c a b c a b 1 c 1 1 a b c a 1 b 1 c 1

n, m, p1, p2 =

  • 4, 3, 3

6, ?

  • Jano van Hemert — CEC 2003 – p.7
slide-18
SLIDE 18

A binary CSP: parameters

x1 x2 x3 x4

a b c a 1 b 1 1 c a b c a b 1 c 1 1 a b c a 1 b 1 c 1

n, m, p1, p2 =

  • 4, 3, 1

2, 3 9

  • Jano van Hemert — CEC 2003 – p.7
slide-19
SLIDE 19

A binary CSP: parameters

x1 x2 x3 x4

a b c a 1 b 1 1 c a b c a b 1 c 1 1 a b c a 1 b 1 c 1

n, m, p1, p2 =

  • 4, 3, 1

2, 1 3

  • Jano van Hemert — CEC 2003 – p.7
slide-20
SLIDE 20

Grouping conflict pairs

✔ Consider a binary CSP with 3 variables (n = 3), a domain size of 3 (m = 3) and all constraints present

(p1 = 1)

Jano van Hemert — CEC 2003 – p.8

slide-21
SLIDE 21

Grouping conflict pairs

✔ Consider a binary CSP with 3 variables (n = 3), a domain size of 3 (m = 3) and all constraints present

(p1 = 1)

✔ Create the set S = {s0, . . . , sk} with k =

n

2

  • m2, where

every si ∈ S is the set of all possible binary CSPs that have the above properties and, in addition, that the portion of conflicting value pairs present is exactly

p2 = i

k

Jano van Hemert — CEC 2003 – p.8

slide-22
SLIDE 22

Grouping conflict pairs

✔ Consider a binary CSP with 3 variables (n = 3), a domain size of 3 (m = 3) and all constraints present

(p1 = 1)

✔ Create the set S = {s0, . . . , sk} with k =

n

2

  • m2, where

every si ∈ S is the set of all possible binary CSPs that have the above properties and, in addition, that the portion of conflicting value pairs present is exactly

p2 = i

k

✔ Determine for each set si the total number of instances and the total number of unsolvable instances

Jano van Hemert — CEC 2003 – p.8

slide-23
SLIDE 23

Counting solvable instances

5e+06 1e+07 1.5e+07 2e+07 0.2 0.4 0.6 0.8 1 Number of instances Tightness all solvable

Jano van Hemert — CEC 2003 – p.9

slide-24
SLIDE 24

Counting solvable instances

0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 Ratio solvable/all Tightness

Jano van Hemert — CEC 2003 – p.10

slide-25
SLIDE 25

Counting solvable instances

0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 Ratio solvable/all Tightness

Jano van Hemert — CEC 2003 – p.10

slide-26
SLIDE 26

Search effort

☞ The effort to search for a solution is commonly measured in the number of conflict checks ☞ one conflict check occurs when an algorithm checks whether the assignment of values to two variables is forbidden or not

Jano van Hemert — CEC 2003 – p.11

slide-27
SLIDE 27

Phase transition

200 400 600 800 1000 1200 1400 1600 0.2 0.4 0.6 0.8 1 Average number of conflict checks Ratio of conflicts to maximal number of conflicts possible BM-CBJ BT estimation

A pattern easy→hard→easy is called a phase transition

Jano van Hemert — CEC 2003 – p.12

slide-28
SLIDE 28

Important parameters

✔ Using n, m, p1, p2 we can predict with considerable accuracy where a phase transition will occur (Smith, 1993; Gent et al., 1996) ✔ Using these parameters we can create sets of random binary CSPs that are of approximately equal difficulty, which can be used to test the effectiveness and efficiency of algorithms (Palmer, 1985; Achlioptas et al., 2001; MacIntyre et al., 1998) ✔ The most difficult problem instances occur not at the predicted phase transition (Hogg and Williams, 1994)

Jano van Hemert — CEC 2003 – p.13

slide-29
SLIDE 29

Evolutionary computation for evolving binary CSPs

Jano van Hemert — CEC 2003 – p.14

slide-30
SLIDE 30

The problem space

☞ Using order parameters we can estimate what difficult problem instances are

Jano van Hemert — CEC 2003 – p.15

slide-31
SLIDE 31

The problem space

☞ Using order parameters we can estimate what difficult problem instances are ☞ However, problem instances with the same order parameters still show a large variation in the search effort required to solve them

Jano van Hemert — CEC 2003 – p.15

slide-32
SLIDE 32

The problem space

☞ Using order parameters we can estimate what difficult problem instances are ☞ However, problem instances with the same order parameters still show a large variation in the search effort required to solve them ☞ How do we get to the really, really, really hard to solve problem instances?

Jano van Hemert — CEC 2003 – p.15

slide-33
SLIDE 33

The problem space

☞ Using order parameters we can estimate what difficult problem instances are ☞ However, problem instances with the same order parameters still show a large variation in the search effort required to solve them ☞ How do we get to the really, really, really hard to solve problem instances? ☞ Idea: use an evolutionary algorithm to search the space

  • f problem instances

Jano van Hemert — CEC 2003 – p.15

slide-34
SLIDE 34

General idea

✔ Fix the number of variables and each variable’s domain size ✔ Let the evolutionary algorithm evolve the structure of the problem ✔ Use a complete algorithm to solve the evolved structures ✔ The fitness function is the search effort required by the complete algorithm

Jano van Hemert — CEC 2003 – p.16

slide-35
SLIDE 35

The evolutionary algorithm

✔ Start with 30 randomly created problem instances that are easy to solve ✔ Run a generational EA with elitism for 200 generations ✔ Apply crossover and then mutation to create new problem instances (next slide) ✔ Run a backtracking algorithm on the new problem instances ✎ Record search effort, solvability and tightness of every problem instance created using a complete solver

Jano van Hemert — CEC 2003 – p.17

slide-36
SLIDE 36

Crossover and mutation

a b c a 0 1 0 b 1 0 1 c 0 0 0 a b c a 0 0 0 b 1 0 1 c 0 1 0 a b c a 1 0 1 b 0 0 0 c 1 0 1 a b c a 0 0 1 b 1 0 1 c 0 0 1 a b c a 0 0 0 b 1 0 1 c 1 1 1 a b c a 1 1 0 b 0 1 1 c 0 1 0

x1 x2 x3 x1 x2 x3 CSP 1 CSP 2

Jano van Hemert — CEC 2003 – p.18

slide-37
SLIDE 37

Crossover and mutation

a,a a,b a,c b,a b,b b,c c,a c,b c,c

CSP 1

x1, x2 1 1 1 x1, x3 1 1 1 1 x2, x3 1 1 1

CSP 2

x1, x2 1 1 1 1 x1, x3 1 1 1 1 1 x2, x3 1 1 1 1 1

Jano van Hemert — CEC 2003 – p.19

slide-38
SLIDE 38

Crossover and mutation

x1, x2 x1, x3 x2, x3

CSP 1

000101010 001101001 010101000

CSP 2

101000101 000101111 110011010

Jano van Hemert — CEC 2003 – p.20

slide-39
SLIDE 39

Crossover and mutation

x1, x2 x1, x3 x2, x3

CSP 1

000101010 001101001 010101000

CSP 2

101000101 000101111 110011010 uniform crossover Offsp. 101100011 000101101 010111010

Jano van Hemert — CEC 2003 – p.20

slide-40
SLIDE 40

Crossover and mutation

x1, x2 x1, x3 x2, x3

CSP 1

000101010 001101001 010101000

CSP 2

101000101 000101111 110011010 uniform crossover Offsp. 101100011 000101101 010111010

Jano van Hemert — CEC 2003 – p.20

slide-41
SLIDE 41

Crossover and mutation

x1, x2 x1, x3 x2, x3

CSP 1

000101010 001101001 010101000

CSP 2

101000101 000101111 110011010 uniform crossover Offsp. 101100011 000101101 010111010 mutation Offsp. 101000011 001101100 010111010

Jano van Hemert — CEC 2003 – p.20

slide-42
SLIDE 42

Crossover and mutation

a b c a 0 1 0 b 1 1 1 c 0 1 0 a b c a 1 0 1 b 0 0 0 c 0 1 1 a b c a 0 1 1 b 0 1 1 c 1 0 0

x1 x2 x3 Offspring

Jano van Hemert — CEC 2003 – p.21

slide-43
SLIDE 43

Experiments

Jano van Hemert — CEC 2003 – p.22

slide-44
SLIDE 44

Setup

✔ Perform 100 independent runs of the evolutionary algorithm ✔ Create 1 million problem instances in the classical way by generating them randomly using Model E (Achlioptas et al., 2001) with a tightness equally distributed over the range (0.29,0.38)

Jano van Hemert — CEC 2003 – p.23

slide-45
SLIDE 45

Convergence analysis (EA)

100 1000 10000 100000 1e+06 1e+07 1e+08 20 40 60 80 100 120 140 160 180 200 average number of conflict checks generations 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 20 40 60 80 100 120 140 160 180 200 average tightnes generations 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 20 40 60 80 100 120 140 160 180 200 average ratio of solvable instances generations Jano van Hemert — CEC 2003 – p.24

slide-46
SLIDE 46

Problem space (EA)

100 1000 10000 100000 1e+06 1e+07 1e+08 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 number of conflict checks tightness unsolvable solvable

Jano van Hemert — CEC 2003 – p.25

slide-47
SLIDE 47

Solvable problem instances

100 1000 10000 100000 1e+06 1e+07 1e+08 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 number of conflict checks tightness EA max mean min

Jano van Hemert — CEC 2003 – p.26

slide-48
SLIDE 48

Unsolvable problem instances

100000 1e+06 1e+07 1e+08 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 number of conflict checks tightness EA max mean min

Jano van Hemert — CEC 2003 – p.27

slide-49
SLIDE 49

Hardest problem instances

1e+07 2e+07 3e+07 4e+07 5e+07 6e+07 7e+07 8e+07 9e+07 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 number of conflict checks tightness unsolvable solvable

Jano van Hemert — CEC 2003 – p.28

slide-50
SLIDE 50

Hardest problem instances

1 10 100 1000 10000 100000 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 number of problem instances tightness unsolvable solvable

Jano van Hemert — CEC 2003 – p.29

slide-51
SLIDE 51

Conclusions

Jano van Hemert — CEC 2003 – p.30

slide-52
SLIDE 52

Evolving Binary CSPs

✔ The evolutionary algorithm is able to direct its search near the predicted phase transition

Jano van Hemert — CEC 2003 – p.31

slide-53
SLIDE 53

Evolving Binary CSPs

✔ The evolutionary algorithm is able to direct its search near the predicted phase transition ✔ It provides us with an automatic method of producing hard problem instances for the solver

Jano van Hemert — CEC 2003 – p.31

slide-54
SLIDE 54

Evolving Binary CSPs

✔ The evolutionary algorithm is able to direct its search near the predicted phase transition ✔ It provides us with an automatic method of producing hard problem instances for the solver ✔ The whole process requires no knowledge of the phase transition and no analysis of the solver

Jano van Hemert — CEC 2003 – p.31

slide-55
SLIDE 55

Problem difficulty

✔ The hardest problem instances found are those that have no solution

Jano van Hemert — CEC 2003 – p.32

slide-56
SLIDE 56

Problem difficulty

✔ The hardest problem instances found are those that have no solution ✔ The phase transition seems quite wide

Jano van Hemert — CEC 2003 – p.32

slide-57
SLIDE 57

Problem difficulty

✔ The hardest problem instances found are those that have no solution ✔ The phase transition seems quite wide ✔ The left side of the phase transition (solvable to unsolvable) contains instances that are much easier to solve than on the right side (unsolvable to solvable)

Jano van Hemert — CEC 2003 – p.32

slide-58
SLIDE 58

Problem difficulty

✔ The hardest problem instances found are those that have no solution ✔ The phase transition seems quite wide ✔ The left side of the phase transition (solvable to unsolvable) contains instances that are much easier to solve than on the right side (unsolvable to solvable) ✎ Not in the paper: an explanation for difficulty is the size

  • f the minimal unsolvable subproblem, which equals the

size of the problem

Jano van Hemert — CEC 2003 – p.32

slide-59
SLIDE 59

References

Achlioptas, D., Kirousis, L., Kranakis, E., Krizanc, D., Molloy, M., and Stamatiou, Y. (2001). Random constraint satisfac- tion: A more accurate picture. Constraints, 4(6):329–344. Gent, I. P ., MacIntyre, E., Prosser, P ., and Walsh, T. (1996). The constrainedness of search. In Proceedings of the AAAI-96, pages 246–252. Hogg, T. and Williams, C. (1994). The hardest constraint prob- lems: A double phase transition. Artificial Intelligence, 69:359–377. MacIntyre, E., Prosser, P ., Smith, B., and Walsh, T. (1998). Random constraint satisfaction: theory meets practice. In Maher, M. and Puget, J.-F ., editors, Principles and Prac- tice of Constraint Programming — CP98, pages 325–339. Springer-Verlag. Palmer, E. M. (1985). Graphical Evolution. John-Wiley & Sons, New York. An introduction to the theory of random graphs — an im- portant tool in modeling networks of interactions. Smith, B. (1993). The phase transition in constraint satisfaction problems: A closer look at the mushy region. Technical Report RR 93.41, University of Leeds. 32-1

slide-60
SLIDE 60

Tsang, E. (1993). Foundations of Constraint Satisfaction. Aca- demic Press. 32-1