60 likes | 190 Views
On Initialization and Mutation. 9 1 4 1 4. Values t ij have to be between 0 and min(source(i),distination(j)) I can compute delta_t ij =min(Source(i) - Sum j tij , destination(j) - Sum i tij), which is how much tij has to be increased/decreased to satisfy the constraints
E N D
On Initialization and Mutation • 9 1 • 4 1 4 • Values tij have to be between 0 and min(source(i),distination(j)) • I can compute delta_tij=min(Source(i)-Sumjtij , destination(j)-Sumitij), which is how much tij has to be increased/decreased to satisfy the constraints • Simple Initialization Procedure: Set tij to 0 initially, and visit tij in some random order and assign the maximum allowed value (delta_tij) to it---[[but tij is larger than min(source(i),distination(j)) (or less than 0) it is set to min(source(i),distination(j)) (set to 0)]] • Complex initialization procedure: Use multiple loops and assign a percentage of the maximum increase to tij, and set it to tij+delta_tij in the last iteration. • Reverse initialization procedure: assign min(source(i),destination(j) to tij and reduce it… • Mutation: Change tij by adding/subtracting a number from it, not violating condition 1, and reuse the simple (complex??) initialization procedure: negative delta_tij values result in a reduction of the amount transported. 5 10 5 11 9
Ideas for the Transportation Problem • If M1 and M2 are legal solutions, a*M1 + b*M2 (with a,b>0 a+b=1) are also legal solutions. This provides as with a quite natural crossover operator. This operator is called arithmetical crossover in the EC numerical optimization literature. • Boundary Mutation (that sets the value of one (possibly more) elements of the matrix to its minimum (0) or maximum possible value (min(source(i), dest(j))), might also have some merit.
Some Initial Thoughts on the Course Project • Have a general theme • Compare at least 2 approaches (could be similar or the second approach could be kind of trivial) • Run algorithms at least 3 times (you might just be unlucky) • Report the results of running the benchmark transparently and completely • Interpret your results (even if there is no clear evidence pointing into one direct); explain your results (could be speculative) • Report the history of the project. • What was expected, what was unexpected?
Conducting Experiments in General and in the Context of the Transportation Problem • Things to observe when running an EC-system • Average fitness • Best solution found so far • Diversity in the current population (expensive) • Degree of change from generation to generation • Visualizing the current best solutions could be helpful • Size of searched solutions; building blocks in the searched solutions • Complexity: runtime, storage, number of genetic operators applied,… • What parts of the search space are searched (hard to analyze) • Things to report when summarizing experiments • Experimental Environment: Operators used and probabilities of their application, selection method, population size, best found solution, best average fitness. • Observed Results: Best solution found, best fitness/average fitness over time, diversity over time.
2001 Material Reverse Initialization Algorithm Let row(I) the sum of elements in the I-th row Let col(j) the sum of the elements in the j-th column Let sour(I) the sum of the supplies of the I-th row Let dest(j) the demand for the j-th colums Let dest(j)=<col(j) and source(I)=<row(I) for I,j=… Visit the matrix elements (possibly excluding some elements) in some randomly selected order and do the following with the visited element vij with its current value v: • maxred= min(col(j)-dist(j), row(i)-sour(i)) • r= min(v, maxred) • vij=vij-r; row(i)=row(i)-r; col(j)=col(j);
2001 Material Boundary Mutation 2 2 0 0 0 2 6 1 1 24 0 2 0 6 1 0 0 3 2 0 6 0 1 20 1 0 2 6 Boundary Mutation: • Selection an element of the matrix • Set it to its maximum possible value (4 in the example) • Rerun a reverse initialization algorithm (the normal initialization algorithm) that reduces the elements of a matrix until the source and destination amounts are correct.