Download presentation
Presentation is loading. Please wait.
Published byAusten Lambert Modified over 9 years ago
1
Constraints in Evolutionary Algorithms
2
Constraints: the big questions, page 233 how to evaluate and compare feasible and infeasible solutions avoid, eliminate, repair or penalize infeasible solutions what is the relation of infeasibility to optimality
3
fitness / constraints / representation: a tradeoff some features of a problem may be included by 1.representation 2.constraints on feasible solutions 3.inclusion in fitness evaluation variables; domains; constraints; fitness
4
Factors in analyzing constraints 1.Representation 2.Search space 3.Neighbour definition & variation operators 4.Evaluation: fitness function 5.Selection operators
5
1. Representation possible strategies to address constraints: include (some) constraints in representation use ‘decoders’ to interpret all solutions as feasible
6
constraints in representation: n queens How many states? Any queen anywhere: 16 4 = 65536(n 2 ) n Queens on different squares: 16x15x14x13 = 43680n 2 !/(n 2 -n)! Queens in separate columns: 4 4 = 256n n Queens in separate cols, rows: 4x3x2x1 = 24n!
7
decoder makes all solutions feasible: ordinal representation of TSP recall: transform to ordinal representation A D B C F E ->131121 F D E B C A-> 644221 apply normal crossover and restore 134221 A D F C E B 641121 F D A B E C
8
decoder makes all solutions feasible: ordinal representation of TSP represent TSP of size n cities by n variables, v 1, v 2, v 3,..., v n D 1 = {1, 2, 3,..., n} D 2 = {1, 2, 3,..., n-1}... D n-1 = {1, 2} D n = {1}EXAMPLE: n=6: 641121 decodes to: F D A B E C
9
2. Search space partial representation space: constraints reduce domains constraints prune subtrees BUT (for Evolutionary Algorithms) complete representation space constraints reduce feasible domains neighbour definition & variation operations determine effect during search
10
Shape of complete representation search space basic shape is multi-dimensional based on domains neighbour definitions & variation operators determine connectivity of the space constraints make solutions either feasible or infeasible (e.g., simplex method) shape of feasible subspace connected? convex?
11
3. Neighbour definitions & variation operators determines connectedness of space including feasible and infeasible subspaces properties with respect to transitions from feasible solution: is feasible space connected? are offspring of feasibles all feasible? ~~ convexity recall revised crossover definitions for TSP
12
Connected feasible space? example: variables v 1, v 2, v 3,..., v 6 D 1 = D 2 =...= D 6 = {1, 2, 3} constraint: values must be repeated in more than one variable feasible: {1, 2, 3, 3, 1, 2}, {3, 3, 3, 2, 2, 2} How to define alteration: crossover? mutation?
13
4. Evaluation: fitness function how to include feasibility, infeasibility in fitness evaluation 1.rejection of infeasible solutions 2.repair of infeasible solutions to feasible put repaired solution in population? 3.infeasibility penality 4.different fitness functions
14
4. Evaluation: fitness function 1.rejection of infeasible solutions while creating offspring solutions, reject infeasible solutions and replace with feasible solutions v 1, v 2, v 3,..., v 6 D 1 = D 2 =...= D 6 = {1, 2, 3} constraint: values must be repeated in more than one variable feasible: {1, 2, 3, 3, 1, 2}, {3, 3, 3, 2, 2, 2}
15
4. Evaluation: fitness function 2.repair of infeasible solutions to feasible when an infeasible offstring is created, repair it before evaluation put repaired or infeasible solution in population? Which fitness feasible: {1, 2, 3, 3, 1, 2}, {3, 3, 3, 2, 2, 2}
16
4. Evaluation: fitness function 3.infeasibility penality evaluate an infeasible solution for fitness but add a penalty term to its fitness value feasible: {1, 2, 3, 3, 1, 2}, {3, 3, 3, 2, 2, 2} fitness: π i=1 to 5 |v i – v i+1 | - 10*(singletons)
17
4. Evaluation: fitness function 4.different fitness functions evaluate infeasible solutions and feasible ones separately how to compare them? feasible: {1, 2, 3, 3, 1, 2}, {3, 3, 3, 2, 2, 2} fitness: eval(s) = q u.eval u (s) + q f.eval f (s) eval f (s) = π i=1 to 5 |v i – v i+1 | eval u (s) = -10*(singletons)
18
5. Selection operators reject infeasible solutions return infeasible solutions to feasible space if possible (hill climbing?) allow infeasible solutions to remain in population
19
evolutionary example knapsack filling given a set of objects of varying weights, how many containers (knapsacks) are needed to carry all the objects? W: {w 1, w 2, …,w n }, set of object weights K: knapsack capacity variables? domains? constraints? fitness? a ‘decoder’ model with a feasible representation
20
example from stochastic search Lewis - sudoku by simulated annealing where are the constraints? box, row, column, initial values representation evaluation transformation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.