GithubHelp home page GithubHelp logo

Comments (6)

darioizzo avatar darioizzo commented on August 13, 2024

Indeed. We never really thought through the champion concept for stochastic optimization cases. I would see some options:

  1. Deactivate the champion as we do for multiobjective optimization, throwing if it is queried
  2. Delegate to the UDAs the task of resetting the champion when the seed is changed

Maybe 2) should be the way to go?

Example:
Change the Seed
Recompute the champion fitness in the new seed and force the champion to have it
Recompute all the population fitnesses in the new seed

from pagmo2.

darioizzo avatar darioizzo commented on August 13, 2024

The approach 2) above would require to implement a clear_champion method in population:

Change the Seed
Store the champion X
Clear the champion
Recompute the fitness of X in the new seed
Recompute all the population fitnesses in the new seed
Set the champion to the best of all the above

from pagmo2.

CoolRunning avatar CoolRunning commented on August 13, 2024

It puts a bit of an additional burden to the programmer of the algorithm. On the other hand: a user (who has no idea and just wants a problem to be optimized) might not need the champion or might have even false assumptions about the meaning of it.

from pagmo2.

darioizzo avatar darioizzo commented on August 13, 2024

As a temporary solution #161 activates a throw if the champion is requested in stochastic optimization problems

from pagmo2.

CoolRunning avatar CoolRunning commented on August 13, 2024

This solution conflicts at the moment with the default print of islands, which wants to show you the champion. See:

isl = pg.island(algo = pg.sga(), prob = pg.inventory(), size=100)
print(isl)
ValueError                                Traceback (most recent call last)
<ipython-input-62-0fb3b4c0cefa> in <module>()
----> 1 print(isl)

ValueError: 
function: champion_x
where: C:\bld\pygmo_1523717981890\_b_env\Library\include\pagmo/population.hpp, 439
what: The Champion of a population can only be extracted for non stochastic problems

from pagmo2.

bluescarni avatar bluescarni commented on August 13, 2024

Fixed in #198.

from pagmo2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.