LeonardoTredese / s302294-computational-intelligence-2022-2023

0 stars 0 forks source link

Lab2 Review #3

Closed saccuz closed 1 year ago

saccuz commented 1 year ago

General Thoughts

Well done in providing more than one way to mutate and to crossover.

Disagreement

Conclusion

Great work, you take advantage of the python language to randomize the use of different kind of mutation and crossover. Results you found are absolutely good, also considering the low amount of time needed to obtain them.

LeonardoTredese commented 1 year ago

I agree that the loose weight mutation is context biased, I did that on purpose. I wouldn't always be useful.

LeonardoTredese commented 1 year ago

You are right, I could use an adaptive mutation rate between the two mutations and crossovers. I would also try to avoid the double mutation and see if the performance improves.

LeonardoTredese commented 1 year ago

I ran the code in different settings to check the behavior of applying multiple mutations in the same epoch. For each problem size I repeat the search three times

With double mutation

N=5 N=10 N=20 N=100 N=500 N=1000
Mean weight 5 10 24 188 1518.33 3662.33

Performing population mutation after offspring generation

N=5 N=10 N=20 N=100 N=500 N=1000
Mean weight 5 10 24 210 1442 3472.33

Here I was surprised that for N = 500 the result was exactly 1442 all three times

Performing population mutation after generating offspring, No mutation when creating offspring.

N=5 N=10 N=20 N=100 N=500 N=1000
Mean weight 5 10 24 200.33 1665.33 3962.33

The results for N < 500 are all pretty similar, so I will consider only larger results. Performing the population mutation independently from offspring seems to improve the solution. Still it appears that applying a slight mutation after the crossover is still useful.

LeonardoTredese commented 1 year ago

I tried to reduce the number of crossovers while in further generations at using the rate $\frac{\alpha}{\sqrt[]{n}}$ where n is the generation number.

alpha N=5 N=10 N=20 N=100 N=500 N=1000
Mean weight 10 5 10 25 248 1859.33 4265.66
Mean weight 5 5 10.33 24 201.33 1634 3718.33
Mean weight 2 5 10 24 201.66 1684.33 3860.66
Mean weight 1 5 10 25.33 213 1595.33 3877.33

Apparently reducing the crossovers worsens the best found solution, therefore I will not keep it in the final implementation. Probably because the algorithm will explore less search space.

Comment on "Performing population mutation after offspring generation"

At the light of what was explained at lesson, in the previous comment I noticed that performing a mutation with a certain probability after the crossover improves the final solution. A possible explanation is that the offspring will be different from the parents even if they are similar or identical therefore improving diversity and reducing the quick convergence rate caused by the loose weight mutation.