Source code of Continuous Non-revisiting Genetic Algorithm with Constant Memory (cNrGA/CM) in

Y. Lou and S.Y. Yuen, Non-revisiting genetic algorithm with adaptive mutation using constant memory, to appear in Memetic Computing.

 

Source code: cNrGA_ConstMemo.zip

 

Introduction:

The source sode includes three parts:

1. The original cNrGA source code

1.1 bsptree_initilization.m
1.2 bsptree_insertion.m
1.3 bsptree_search_node.m

2. The implementation of two pruning strategies

2.1 all the files inside folder 'pruning'
2.2 find_sibling.m

3. The cec 2013 benchmark test suite

3.1 all the files inside folder 'input_data'
3.2 cec13_func.cpp

Please use mex to configure the benchmark functions when running it for the first time.
Details are shown below (copied from 'cec13_func.cpp')

/*
CEC13 Test Function Suite
Jane Jing Liang (email: liangjing@zzu.edu.cn)
14th Feb. 2013
1. Run the following command in Matlab window:
mex cec13_func.cpp -DWINDOWS
2. Then you can use the test functions as the following example:
f = cec13_func(x,func_num);
Here x is a D*pop_size matrix.
*/

 

Framework of Code:

----------------------------------------------------

a) Initialization

b) Main loop of cNrGA(/CM)

For generation = 2 : MAX_GENERATION

b.1) Uniform Crossover
b.2) Mutation (only when revisit)
b.3) Fitness Evaluation
b.4) Prune (if necessary) insertion of new solutions
b.5) Selection

End For

----------------------------------------------------

Example:

-- Command Window --

RUN = 'cNrGA_ConstMemo'

>> cNrGA_ConstMemo

Input the Following data:

Prune Strategy [1(cNrGA) 2(cNrGA/CM/LRU) 3(cNrGA/CM/R)]:

2

Number of Independent Runs:

10

ID of Problem (1~28):

22

Maximum Number of Evaluations (e.g. 40000):

60000

Memory Threshold (e.g. 10000):

10000

Do you want to save the BSP_Tree(s) (y/n)?

n

%% Then, the Command Window will display:

>> CEC 2013 Func.22, Max_FEs:60000, Memory Threshold(MT):10000, Run:1/10...
>> Fitness found (run 1/10): 836.4179
>> CEC 2013 Func.22, Max_FEs:60000, Memory Threshold(MT):10000, Run:2/10...
>> Fitness found (run 2/10): 922.8358
>> CEC 2013 Func.22, Max_FEs:60000, Memory Threshold(MT):10000, Run:3/10...
>> Fitness found (run 3/10): 924.4146
>> CEC 2013 Func.22, Max_FEs:60000, Memory Threshold(MT):10000, Run:4/10...
>> Fitness found (run 4/10): 915.6001
>> CEC 2013 Func.22, Max_FEs:60000, Memory Threshold(MT):10000, Run:5/10...
>> Fitness found (run 5/10): 920.2304
>> CEC 2013 Func.22, Max_FEs:60000, Memory Threshold(MT):10000, Run:6/10...
>> Fitness found (run 6/10): 927.938
>> CEC 2013 Func.22, Max_FEs:60000, Memory Threshold(MT):10000, Run:7/10...
>> Fitness found (run 7/10): 1056.1238
>> CEC 2013 Func.22, Max_FEs:60000, Memory Threshold(MT):10000, Run:8/10...
>> Fitness found (run 8/10): 916.4388
>> CEC 2013 Func.22, Max_FEs:60000, Memory Threshold(MT):10000, Run:9/10...
>> Fitness found (run 9/10): 912.912
>> CEC 2013 Func.22, Max_FEs:60000, Memory Threshold(MT):10000, Run:10/10...
>> Fitness found (run 10/10): 929.255

%% Note that the results can be found in the variable named "output_fitness"

Save the Results(y/n)?

         y

%% If input 'Y/y', all the related variables will be saved, otherwise, you can find them on Workspace before 'clear' or 'exit'.

 

Back