ciren / cilib

Typesafe, purely functional Computational Intelligence
https://cilib.net
Apache License 2.0
124 stars 101 forks source link

Dynamic example #297

Closed KyleErwin closed 4 years ago

KyleErwin commented 6 years ago

A simple example to showcase dynamic problems in cilib.

The example uses an absolute value benchmark with an added bias factor that increases over time. This causes the most optimum area to shift from the upper bound of each dimension to the lower bound.

The algorithm of choice is a gbest pso with the updatePBestBounds method. The implementation of the pso is stolen\borrowed from the pso package.

The addition of this example should make the example package more "complete" (in the sense that there isn't a a dynamic problem currently).

KyleErwin commented 6 years ago

@gpampara I think perhaps if each example is to showcase a certain feature then by adding functionality to change the algorithm parameters over time would we not be repeating ourselves as it is in the TimeVaryingGBestPSO? Or perhaps we should merge these two examples?

gpampara commented 6 years ago

I didn't think of that, yeah. I wonder if we can maybe change the name of the example to be a little clearer with its intention? It's just very vague at the moment. The same goes for TimeVaryingGBestPSO.

Also, I think that if the example file's intention is to showcase how the problem changes over time, we should probably focus on that, removing the custom algorithm definition and just use things that are already defined so that the changing aspect of the problem is more obvious in the sample.