luca-scr / GA

An R package for optimization using genetic algorithms
http://luca-scr.github.io/GA/
91 stars 29 forks source link

speed up GA with GPU #33

Closed maxrodkin closed 3 years ago

maxrodkin commented 5 years ago

I have working on portfolio optimisation problem. I've been using the GA package successfully. The lenght of genome is about 40 , the type - real-valued. The fitness function is anough complice and run about 0.5-1 sec for one step. The whole script runs about 5-10 minutes. I used the GA "parallel" parametr and "snow" package to speed up the script running. It`s working methods.

Now I want to speed up it with GPU. What approach should be used? OpenCL , gpuR to re-write GA methods to GPU-based, or is there a simpler design that exists?

I am using Ubuntu 18.04, CUDA 10.0, Jupyter and R.

luca-scr commented 5 years ago

I'm sorry I haven't any experience on using GPU for speeding up genetic algorithms, or using GPU in general. Before taking this route, I would consider to improve the fitness function, for example by rewriting it in C++ and using the fantastic Rcpp package.

maxrodkin commented 5 years ago

thank you , Luca. Ye, its seems complicated. Rarher ill use the snow package with docker cluster, it`s compatible with GA. But your idea is great, have thinking about.