Shihui Guo

Using parfor (Matlab) to do parallel computing (CMA-ES Optimization)

Recently I am testing CMA-ES optimization to tune the parameters of the motion controller for virtual characters, but since the convergence takes such a long time, I am thinking to take full advantage of my six core CPU and make things faster.

In CMA-ES optimization (Matlab code), there is an option for enabling the parallel feature:

opts.EvalParallel = 'yes'


However, this is just an interface, which passes the whole population into the objective function as a NxM matrix (N is the dimension of freedom, M is the number of population). The output of the objective function should be a 1xM array, which returns the fitness of individual.

To utilize the matlab parfor, there are few things to note:

点击查看评论