question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement Discrete PSO Variants

See original GitHub issue

Hi! Thank you for checking out this issue!

Currently, this whole part is pretty much open. As of now, I’m planning to give PySwarms four major optimization capabilities:

  • single-objective continuous optimization
  • single-objective discrete optimization
  • multi-objective optimization, and
  • constrained optimization.

We’ve established some grounds on single-objective continuous optimization (with the standard implementations of global-best and local-best PSO). But we haven’t done anything yet as for discrete optimization. Would you like to give us a headstart?

These are the steps that will be undertaken to close this issue:

  1. Creating an abstract class in the pyswarms.base module. This will provide a skeleton on how other implementations of the same optimization nature would be written. Take for example how global-best (pyswarms.single.gbest) and local-best (pyswarms.single.lbest) are inheriting from the class SwarmBase (this is the abstract class for single-objective continuous).

  2. Implementing a standard PSO algorithm inheriting the abstract class written in Step 1. This means that a particular discrete PSO optimization algorithm will be implemented while inheriting the base class.

  3. Writing unit tests and use-case examples This is to show how the proposed skeleton and algorithm will be used by the end-user, and of course some unit tests to check its robustness (please check the tests directory)

As you can see, the steps is asking for a lot of things. Right now, we’re setting this a low-priority because I am currently writing the abstract classes for the other PSO variants. If you think you wanted to be a super-contributor, then go ahead and do all the steps above. 👍 😄 But I believe it would be much better if I set-up a basis first then we iterate from there.

But perhaps, the best way to contribute on this issue would be the following: (note that these contributions don’t require pull requests)

  • Propose features on how to implement the abstract classes. What do you think are the things to consider when making an abstract class for discrete PSO? You can use your domain-knowledge, and your past experience in handling discrete optimization problems to point out some helpful guides on how to set-up the abstract classes. I can take all of these into consideration when making the first commit in this issue.
  • Suggest discrete PSO implementations that can be implemented in the future. If you’re planning to do this, please link the paper where it came from (it’s okay if there’s paywall). It would be better if the research is highly-cited, and is coming from reputable journals in the field of computational intelligence.

That’s it for this issue!! For any questions, just drop a comment here!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DewaldDeJagercommented, Sep 16, 2017

I can’t find the exact paper right now but a masters thesis by the same author is available here: https://repository.up.ac.za/bitstream/handle/2263/55834/Langeveld_Set_2016.pdf See chapter 4, page 71.

I have looked at the discrete base class and it seems good for in general but it definitely needs changes for the set-based PSO.

Is there a Gitter or IRC channel for pyswarms? Have been wanting to ask or open an issue for a while now. I would be willing to provide help for newcomers there are well.

0reactions
ljvmiranda921commented, Oct 5, 2017

Hi @DewaldDeJager, I’m closing this issue for now. If you wish to open-up a Pull Request regarding the set-based PSO you’ve proposed, please open up a new issue and we can converse from there. 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

A New Discrete Particle Swarm Optimization Algorithm
In this paper, we formally define a class of discrete problems and propose a new PSO algorithm, called Integer and Categor- ical PSO...
Read more >
An Overview of Variants and Advancements of PSO Algorithm
Abstract: Particle swarm optimization (PSO) is one of the most famous swarm-based optimization techniques inspired by nature.
Read more >
Discrete Particle Swarm Optimization, illustrated by the ...
The classical Particle Swarm Optimization is a powerful method to find the minimum of a numerical function, on a continuous definition domain.
Read more >
Application Analysis on PSO Algorithm in the Discrete ...
The general PSO algorithm is designed to solve the continuous optimization problems. It is quite necessary to analyze the differences between ...
Read more >
Particle swarm optimisation for discrete optimisation problems
Among various optimisation techniques, particle swarm optimisation (PSO) has demonstrated more promising performance in tackling discrete ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found