File Exchange

image thumbnail

One Rank Cuckoo Search (ORCS) algorithm

version 1.2 (4.07 KB) by

An improved cuckoo search algorithm for optimization problems



View License

Files included:
ORCS.m, Ackley.m, Griewank.m, Rastrigin.m, Rosenbrock.m, Sphere.m, and Test.m
For more information, please check "Ahmed S. Tawfik, Amr A. Badr and Ibrahim F. Abdel-rahman. One Rank Cuckoo Search Algorithm with Application to Algorithmic Trading Systems Optimization. International Journal of Computer Applications 64(6):30-37, February 2013."

Comments and Ratings (8)


Amr Kassem

Dear Mr. Ahmed
Thanks a lot for your reply.
I have replaced the "!" with "~" and the code works well now.

You can contact me directly on, i just have a question concerning cuckoo algorithm and need your help if possible.

Thanks a lot for your time and hope for you all the best.


Ahmed Tawfik

The code was updated to reflect the issue noted. We cannot just removed ! since it will greatly affect the logic. Instead, it was replaced by ~.

Of course, we could use email directly. If you prefer so, please send me yours and I will replay to you from there.

Thank you,

Amr Kassem

I have tried the code in versions: 2012a, 2014b and 2015b.

Also when i removed the errors in the code by removing the symbol "!" the code run but without any results.

Is it possible to give me your mail to contact you?

Thanks a lot.

Ahmed Tawfik

Hello Amr,

Thank you for reporting this.

I am not getting this error from my side. However, it is interesting that Levent reported the exact statement earlier Feb. Could you recall what version of Matlab (or possible Octave) that is giving you this syntax error?

Thank you,

Amr Kassem

Dear Mr. Ahmed,

Something error with this code!

Line 65 of ORCS.m ends with !EqualNests(nests)), which gives syntax error.

Best Regards,

Ahmed Tawfik

Hello Levent,

I just downloaded the same online version of ORCS and tested it with no errors whatever. You may try to download a fresh copy and test it again with any recent version of Matlab. If the issue persists, please feel free to let me know.

Thank you,

Levent Alhan

Dear Sir,

Line 65 of ORCS.m ends with !EqualNests(nests)), which gives syntax error. There are a few more similar errors. Would it be possible to upload a new version?

Kind regards,
Levent Alhan



Fixed a syntax error (specifically at line 65, and the similar) that appeared in some versions of Matlab. Thanks Levent and Amr.


Added support for lower and upper bounds of the problem domain, as a scalar or row vector.

MATLAB Release
MATLAB 7.14 (R2012a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video