LucianaColella7 / CI2024_lab1

Laboratory 1
0 stars 0 forks source link

Review Lab1 #1

Open Sgroi71 opened 3 weeks ago

Sgroi71 commented 3 weeks ago

The first two algorithms are perfect, but the third one has a major issue: since the fitness consists of two elements (valid and cost), you need to account for non-valid solutions. The variable df compares only the cost part of the fitness, as you need a value to compute the exponential. As a result, non-valid solutions can be accepted as better than the current solution, leading to a final result where the cost is 0 (the solution that selects 0 sets).

I propose a solution by modifying the fitness function to assign a very bad fitness score to non-valid solutions.

Screenshot 2024-10-19 at 16 23 31

Additionally, I suggest an improvement regarding the constant cooling rate: experiment with adaptive or non-linear cooling schedules that adjust based on the progress of the search.

The idea is to combine the self-adaptive strength approach from RMHC with simulated annealing. In the following solution, I introduce a self-adaptive mutation for the cooling rate based on how much the fitness has changed over the last 100 steps.

Screenshot 2024-10-19 at 16 31 22
LucianaColella7 commented 3 weeks ago

Thank you so much for your help with the code and your suggestions! They will be precious for improving my work and for the upcoming labs.