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

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

Crap files in wrong directory

File size: 519 bytes
Line 
1% Monte-Carlo Search Algoritm on low-autocorrelation program
2% BSDLicence
3% Rick van der Zwet - 0433373 - <hvdzwet@liacs.nl>
4
5best_fitness = 0;
6while (1)
7 % Generate a column s={-1,1}^n
8 n = 20;
9 s = rand(n,1);
10 s = round(s);
11 s = (s == 0) .- 1;
12
13 % Find whether we are better than everything else
14 fitness = SHG(s);
15 if (fitness > best_fitness)
16 best_array = s;
17 best_fitness = fitness
18 % Little hack to display output nicely
19 disp(rot90(s,-1));
20 endif
21endwhile
22
Note: See TracBrowser for help on using the repository browser.