reset password
Author Message
rabbott
Posts: 1649
Posted 19:54 Apr 17, 2020 |

In the current PyLogo version, the fitness target is computed as the floor of the maximum possible value if items could be subdivided.

More interestingly, whenever a new Individual is created, the total weight of the selected items is checked against the max_weight of the problem. If the total weight is greater than the max_weight, items are randomly unselected until the total weight is less than or equal to the max_weight. The effect is that the GA finds the solution almost immediately. It generates the solution in the initial population about half the time. If the solution is not in the initial population, it is found in just a few generations.

This is one of the issues that come up when working with such a small problem.

Last edited by rabbott at 21:43 Apr 17, 2020.