Code Monkey home page Code Monkey logo

Comments (9)

jbytecode avatar jbytecode commented on August 17, 2024 1

sample(probvector) performs rand() call for each single bit, so in a p-variable problem it performs p x 32 x rand() calls in a map().

floats() is a little bit costy as it combines 32bits to build up an integer then later reinterpretes it as Float.

imo, in initial state building, it is not the most costy part when it is compared to generating the initial probvector itself.

from metaheuristics.jl.

jmejia8 avatar jmejia8 commented on August 17, 2024 1

Thanks for your response. MCCGA is now implemented within the Metaheuristics.jl package (master branch).
It would be nice if the docstring about MCCGA is updated.

Example

using Metaheuristics

# MCCA requires Optim (unless you put MCCA(use_local_search=false))
import Optim 

# problem
f, bounds, solutions = Metaheuristics.TestProblems.rastrigin();

result = optimize(f, bounds, MCCGA())

Output:

+=========== RESULT ==========+
  iteration: 31419
    minimum: 0
  minimizer: [3.9383281247463824e-29, -1.60938227312533e-36, 5.963404220446944e-28, 6.760617690476724e-38, -1.3224051368625615e-32, 9.76955021280433e-39, -3.574582341995119e-38, 1.6852928556302238e-25, 1.776057958933574e-36, 4.273668128645299e-34]
    f calls: 63576
 total time: 3.3656 s
+============================+

from metaheuristics.jl.

jbytecode avatar jbytecode commented on August 17, 2024 1

nice job! now Metaheuristics.jl includes more methods. Thank you so much for your nice attitude, effort, and help.

from metaheuristics.jl.

jmejia8 avatar jmejia8 commented on August 17, 2024 1

You are welcome! If you have more recommendations or any questions about this package, please let me know. I'm open to collaborations on topics in optimization and AI.

Please, feel free to close this issue at any time.

from metaheuristics.jl.

jmejia8 avatar jmejia8 commented on August 17, 2024

Hi! The MCCGA approach can be implemented into the Metaheuristics package (MHP). I'd like MHP has as many optimizers and features as possible. Therefore, MCCGA is completely suitable to be included in MHP.

Some comments before integration:

  • I noted you are using Optim in your dependencies, which can be included in MHP via Requires.jl.
  • If you want to carry out the integration, I'd suggest you read "Create Your Own Metaheuristic".
  • I can perform the integration, or help you including the tests, documentation, or solving any issue you have related to the implementation.

I am also open to further collaborations.

from metaheuristics.jl.

jmejia8 avatar jmejia8 commented on August 17, 2024

Based on your response via DM, I started the implementation in develop branch.

At this point, MCCGA is not working correctly in MHP due to I just copy, paste and adapt your code.

I have a question for you in the following line:

# is this affecting the algorithm performance?

Thanks in advance.

from metaheuristics.jl.

jbytecode avatar jbytecode commented on August 17, 2024

that was super fast, thank you!

from metaheuristics.jl.

jbytecode avatar jbytecode commented on August 17, 2024

Just a quick and dirty PR, #14, that adds the example below. I will enrich the documentation over time.

By the way, it seems MCCGA minimizes Rastrigin nicely :)

from metaheuristics.jl.

jmejia8 avatar jmejia8 commented on August 17, 2024

Thank you for contributing. I just merged the changes.

MCCGA is an interesting and original GA, I'm excited it is now integrated into Metaheuristics.jl.

from metaheuristics.jl.

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.