Giter VIP home page Giter VIP logo

Comments (3)

darioizzo avatar darioizzo commented on May 22, 2024

Nothing odd here. All is intended behavior.

There several problems with the use of the archipelago and the algorithm detailed above.

  1. If you use the archipelago with pg.de and pop_size=1 the "error occurred" is to be expected as de is a population based algorithm and needs at least a population of size 4.
  2. When an archipelago raises error in the islands, you can inspect those exceptions by calling the wait_check method. See https://esa.github.io/pagmo2/docs/python/tutorials/using_archipelago.html#managing-exceptions. If you do so you will see that the exeption is likely to be "de needs at least 4 individuals ...."
  3. Simulated annealing is not population based and, as documented, only evolves one selected individual in the population. Which is what the code above shows.
  4. "Notice that only the island with the smallest fitness" should be "Notice that only the chromosome with the smallest fitness" -> Which is what sa is supposed to do.
  5. " most of the fitness vectors change using pg.de()" -> again thats intended behaviour of de. Since the user only evolves for one generation (use of default parameters)

Will close this and let the user rethink what he is doing and in case ask for help in gitter.

from pagmo2.

bsugerman avatar bsugerman commented on May 22, 2024

Thanks for those explanations. I've read and re-read the documentation for c++ and python versions quite a few times, and never understood that an archipelago acts as you suggested. I'm sorry if I use the wrong terms here, but I understand that an archipelago is a collection of islands, and each island is a population of N potential solution vectors to a problem. I thought that evolving an archipelago was just a threaded/parallel way of evolving a population. So if I set up a population of size=96, it will create 96 test vectors for a problem, and then use the algorithm to minimize all 96 of them. I understood an archipelago of n=6 islands with pop_size=16 would also create 96 test vectors and minimize all 96 of them, but using 6 threads so it runs 6x faster. Instead, you seem to be saying that such an archipelago will create 96 test vectors but only evolve the lowest initial champion on each island with simulated annealing, and leave the other 15 alone? However, with the differential-evolution algos, it will minimize all 96 vectors?

Whether I'm right or not, I hope this indicates that the documentation may be missing some important information, or it may be placed in a non-obvious place, or stated in a confusing way.

from pagmo2.

darioizzo avatar darioizzo commented on May 22, 2024

We are always happy to improve the documentation, If you point us exactly to bits that confused you we can consider rewording.

An archipelago is a set of islands, each containing a population. When evolving, the archipelago evolves the population in each island in parallel. To inspect the best individual in each isalnd you can write archi.get_champions_f(), while your line above: archi[0].get_population().get_f() gets all the fitness vectors of the population living in the isalnd wth id 0.

Did you follow the many tutorial available in the web pages? In case you found confusing statements there too, let us know.

As for what individual evolves: its the whole population that evolves, but for non - population based algorithm (such as simulated annealing) one must pick one only individual.

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.