source: liacs/nc/low-correlation/mcs-call.m@ 45

Last change on this file since 45 was 43, checked in by Rick van der Zwet, 15 years ago

I mean keywords ;-)

  • Property svn:keywords set to Id
File size: 913 bytes
Line 
1% Monte-Carlo Search Algoritm on low-autocorrelation program
2% BSDLicence
3% Rick van der Zwet - 0433373 - <hvdzwet@liacs.nl>
4% $Id: mcs-call.m 43 2009-12-17 22:18:48Z rick $
5
6% Brute-force result of length 20
7% best_20 = [-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,1,1,1,1,1];
8
9% Basic variables
10iterations = [1:10:200];
11repetitions = 20;
12length = 20;
13
14% Plot the stuff
15fitnesses = [];
16for iteration = iterations
17 fitness = [];
18 for rep = 1:repetitions
19 fprintf('Iter:%i, Rep:%i\n',iteration,rep);
20 [new_fitness, value] = mcs(length,iteration);
21 fitness = [fitness, new_fitness];
22
23 % Little hack to display output nicely
24 % disp(rot90(value,-1));
25 end
26 fitnesses = [fitnesses,mean(fitness)];
27end
28
29plot(iterations,fitnesses);
30title(sprintf('Monte-Carlo Search on Low-Corretation set - repetitions %i',repetitions));
31ylabel('fitness');
32xlabel('iterations');
33grid on;
34legend(sprintf('Length %i',length));
35print('mcs-fitness.eps','-depsc2');
36
Note: See TracBrowser for help on using the repository browser.