亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ga.m

?? Matlab工具箱 多維小波變換工具箱 圖像處理工具箱 模糊邏輯工具箱 erc
?? M
字號:
function [x,endPop,bPop,traceInfo] = ga(bounds,evalFN,evalOps,startPop,opts,...termFN,termOps,selectFN,selectOps,xOverFNs,xOverOps,mutFNs,mutOps)% GA run a genetic algorithm% function [x,endPop,bPop,traceInfo]=ga(bounds,evalFN,evalOps,startPop,opts,%                                       termFN,termOps,selectFN,selectOps,%                                       xOverFNs,xOverOps,mutFNs,mutOps)%                                % Output Arguments:%   x            - the best solution found during the course of the run%   endPop       - the final population %   bPop         - a trace of the best population%   traceInfo    - a matrix of best and means of the ga for each generation%% Input Arguments:%   bounds       - a matrix of upper and lower bounds on the variables%   evalFN       - the name of the evaluation .m function%   evalOps      - options to pass to the evaluation function ([NULL])%   startPop     - a matrix of solutions that can be initialized%                  from initialize.m%   opts         - [epsilon prob_ops display] change required to consider two %                  solutions different, prob_ops 0 if you want to apply the%                  genetic operators probabilisticly to each solution, 1 if%                  you are supplying a deterministic number of operator%                  applications and display is 1 to output progress 0 for%                  quiet. ([1e-6 1 0])%   termFN       - name of the .m termination function (['maxGenTerm'])%   termOps      - options string to be passed to the termination function%                  ([100]).%   selectFN     - name of the .m selection function (['normGeomSelect'])%   selectOpts   - options string to be passed to select after%                  select(pop,#,opts) ([0.08])%   xOverFNS     - a string containing blank seperated names of Xover.m%                  files (['arithXover heuristicXover simpleXover']) %   xOverOps     - A matrix of options to pass to Xover.m files with the%                  first column being the number of that xOver to perform%                  similiarly for mutation ([2 0;2 3;2 0])%   mutFNs       - a string containing blank seperated names of mutation.m %                  files (['boundaryMutation multiNonUnifMutation ...%                           nonUnifMutation unifMutation'])%   mutOps       - A matrix of options to pass to Xover.m files with the%                  first column being the number of that xOver to perform%                  similiarly for mutation ([4 0 0;6 100 3;4 100 3;4 0 0])% Binary and Real-Valued Simulation Evolution for Matlab % Copyright (C) 1996 C.R. Houck, J.A. Joines, M.G. Kay %% C.R. Houck, J.Joines, and M.Kay. A genetic algorithm for function% optimization: A Matlab implementation. ACM Transactions on Mathmatical% Software, Submitted 1996.%% This program is free software; you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation; either version 1, or (at your option)% any later version.%% This program is distributed in the hope that it will be useful,% but WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the% GNU General Public License for more details. A copy of the GNU % General Public License can be obtained from the % Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.%%$Log: ga.m,v $%Revision 1.10  1996/02/02  15:03:00  jjoine% Fixed the ordering of imput arguments in the comments to match% the actual order in the ga function.%%Revision 1.9  1995/08/28  20:01:07  chouck% Updated initialization parameters, updated mutation parameters to reflect% b being the third option to the nonuniform mutations%%Revision 1.8  1995/08/10  12:59:49  jjoine%Started Logfile to keep track of revisions%n=nargin;if n<2 | n==6 | n==10 | n==12  disp('Insufficient arguements') endif n<3 %Default evalation opts.  evalOps=[];endif n<5  opts = [1e-6 1 0];endif isempty(opts)  opts = [1e-6 1 0];endif any(evalFN<48) %Not using a .m file  if opts(2)==1 %Float ga    e1str=['x=c1; c1(xZomeLength)=', evalFN ';'];      e2str=['x=c2; c2(xZomeLength)=', evalFN ';'];    else %Binary ga    e1str=['x=b2f(endPop(j,:),bounds,bits); endPop(j,xZomeLength)=',...	evalFN ';'];  endelse %Are using a .m file  if opts(2)==1 %Float ga    e1str=['[c1 c1(xZomeLength)]=' evalFN '(c1,[gen evalOps]);'];      e2str=['[c2 c2(xZomeLength)]=' evalFN '(c2,[gen evalOps]);'];    else %Binary ga    e1str=['x=b2f(endPop(j,:),bounds,bits);[x v]=' evalFN ...	'(x,[gen evalOps]); endPop(j,:)=[f2b(x,bounds,bits) v];'];    endendif n<6 %Default termination information  termOps=[100];  termFN='maxGenTerm';endif n<12 %Default muatation information  if opts(2)==1 %Float GA  mutFNs=['boundaryMutation multiNonUnifMutation nonUnifMutation unifMutation'];    mutOps=[4 0 0;6 termOps(1) 3;4 termOps(1) 3;4 0 0];  else %Binary GA    mutFNs=['binaryMutation'];    mutOps=[0.05];  endendif n<10 %Default crossover information  if opts(2)==1 %Float GA    xOverFNs=['arithXover heuristicXover simpleXover'];    xOverOps=[2 0;2 3;2 0];  else %Binary GA    xOverFNs=['simpleXover'];    xOverOps=[0.6];  endendif n<9 %Default select opts only i.e. roullete wheel.  selectOps=[];endif n<8 %Default select info  selectFN=['normGeomSelect'];  selectOps=[0.08];endif n<6 %Default termination information  termOps=[100];  termFN='maxGenTerm';endif n<4 %No starting population passed given  startPop=[];endif isempty(startPop) %Generate a population at random  %startPop=zeros(80,size(bounds,1)+1);  startPop=initializega(80,bounds,evalFN,evalOps,opts(1:2));endif opts(2)==0 %binary  bits=calcbits(bounds,opts(1));endxOverFNs=parse(xOverFNs);mutFNs=parse(mutFNs);xZomeLength  = size(startPop,2); 	%Length of the xzome=numVars+fittnessnumVar       = xZomeLength-1; 		%Number of variablespopSize      = size(startPop,1); 	%Number of individuals in the popendPop       = zeros(popSize,xZomeLength); %A secondary population matrixc1           = zeros(1,xZomeLength); 	%An individualc2           = zeros(1,xZomeLength); 	%An individualnumXOvers    = size(xOverFNs,1); 	%Number of Crossover operatorsnumMuts      = size(mutFNs,1); 		%Number of Mutation operatorsepsilon      = opts(1);                 %Threshold for two fittness to differoval         = max(startPop(:,xZomeLength)); %Best value in start popbFoundIn     = 1; 			%Number of times best has changeddone         = 0;                       %Done with simulated evolutiongen          = 1; 			%Current Generation NumbercollectTrace = (nargout>3); 		%Should we collect info every genfloatGA      = opts(2)==1;              %Probabilistic application of opsdisplay      = opts(3);                 %Display progress while(~done)  %Elitist Model  [bval,bindx] = max(startPop(:,xZomeLength)); %Best of current pop  best =  startPop(bindx,:);  if collectTrace    traceInfo(gen,1)=gen; 		          %current generation    traceInfo(gen,2)=startPop(bindx,xZomeLength);       %Best fittness    traceInfo(gen,3)=mean(startPop(:,xZomeLength));     %Avg fittness    traceInfo(gen,4)=std(startPop(:,xZomeLength));   end    if ( (abs(bval - oval)>epsilon) | (gen==1)) %If we have a new best sol    if display      fprintf(1,'\n%d %f\n',gen,bval);          %Update the display    end    if floatGA      bPop(bFoundIn,:)=[gen startPop(bindx,:)]; %Update bPop Matrix    else      bPop(bFoundIn,:)=[gen b2f(startPop(bindx,1:numVar),bounds,bits)...	  startPop(bindx,xZomeLength)];    end    bFoundIn=bFoundIn+1;                      %Update number of changes    oval=bval;                                %Update the best val  else    if display      fprintf(1,'%d ',gen);	              %Otherwise just update num gen    end  end    endPop = feval(selectFN,startPop,[gen selectOps]); %Select    if floatGA %Running with the model where the parameters are numbers of ops    for i=1:numXOvers,      for j=1:xOverOps(i,1),	a = round(rand*(popSize-1)+1); 	%Pick a parent	b = round(rand*(popSize-1)+1); 	%Pick another parent	xN=deblank(xOverFNs(i,:)); 	%Get the name of crossover function	[c1 c2] = feval(xN,endPop(a,:),endPop(b,:),bounds,[gen xOverOps(i,:)]);		if c1(1:numVar)==endPop(a,(1:numVar)) %Make sure we created a new 	  c1(xZomeLength)=endPop(a,xZomeLength); %solution before evaluating	elseif c1(1:numVar)==endPop(b,(1:numVar))	  c1(xZomeLength)=endPop(b,xZomeLength);	else 	  %[c1(xZomeLength) c1] = feval(evalFN,c1,[gen evalOps]);	  eval(e1str);	end	if c2(1:numVar)==endPop(a,(1:numVar))	  c2(xZomeLength)=endPop(a,xZomeLength);	elseif c2(1:numVar)==endPop(b,(1:numVar))	  c2(xZomeLength)=endPop(b,xZomeLength);	else 	  %[c2(xZomeLength) c2] = feval(evalFN,c2,[gen evalOps]);	  eval(e2str);	end      		endPop(a,:)=c1;	endPop(b,:)=c2;      end    end      for i=1:numMuts,      for j=1:mutOps(i,1),	a = round(rand*(popSize-1)+1);	c1 = feval(deblank(mutFNs(i,:)),endPop(a,:),bounds,[gen mutOps(i,:)]);	if c1(1:numVar)==endPop(a,(1:numVar)) 	  c1(xZomeLength)=endPop(a,xZomeLength);	else	  %[c1(xZomeLength) c1] = feval(evalFN,c1,[gen evalOps]);	  eval(e1str);	end	endPop(a,:)=c1;      end    end      else %We are running a probabilistic model of genetic operators    for i=1:numXOvers,      xN=deblank(xOverFNs(i,:)); 	%Get the name of crossover function      cp=find(rand(popSize,1)<xOverOps(i,1)==1);      if rem(size(cp,1),2) cp=cp(1:(size(cp,1)-1)); end      cp=reshape(cp,size(cp,1)/2,2);      for j=1:size(cp,1)	a=cp(j,1); b=cp(j,2); 	[endPop(a,:) endPop(b,:)] = feval(xN,endPop(a,:),endPop(b,:),...	  bounds,[gen xOverOps(i,:)]);      end    end    for i=1:numMuts      mN=deblank(mutFNs(i,:));      for j=1:popSize	endPop(j,:) = feval(mN,endPop(j,:),bounds,[gen mutOps(i,:)]);	eval(e1str);      end    end  end    gen=gen+1;  done=feval(termFN,[gen termOps],bPop,endPop); %See if the ga is done  startPop=endPop; 			%Swap the populations    [bval,bindx] = min(startPop(:,xZomeLength)); %Keep the best solution  startPop(bindx,:) = best; 		%replace it with the worstend[bval,bindx] = max(startPop(:,xZomeLength));if display   fprintf(1,'\n%d %f\n',gen,bval);	  endx=startPop(bindx,:);if opts(2)==0 %binary  x=b2f(x,bounds,bits);  bPop(bFoundIn,:)=[gen b2f(startPop(bindx,1:numVar),bounds,bits)...      startPop(bindx,xZomeLength)];else  bPop(bFoundIn,:)=[gen startPop(bindx,:)];endif collectTrace  traceInfo(gen,1)=gen; 		%current generation  traceInfo(gen,2)=startPop(bindx,xZomeLength); %Best fittness  traceInfo(gen,3)=mean(startPop(:,xZomeLength)); %Avg fittnessend

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩在线播放| 国产一区二区影院| 欧美系列在线观看| 亚洲成a人片综合在线| 7799精品视频| 免费精品视频最新在线| 精品91自产拍在线观看一区| 精品一区二区三区日韩| 久久精品夜夜夜夜久久| 成人黄色在线网站| 亚洲综合无码一区二区| 欧美伦理电影网| 激情亚洲综合在线| 国产精品久久三区| 欧美日韩一区二区三区四区| 蜜桃传媒麻豆第一区在线观看| 日韩免费观看高清完整版| 国产在线精品免费av| 国产精品久久久久久久久久免费看| 在线看一区二区| 男人的天堂久久精品| 欧美国产禁国产网站cc| 欧美亚洲自拍偷拍| 麻豆精品精品国产自在97香蕉| 久久精品一级爱片| 欧美在线视频全部完| 韩国欧美一区二区| 亚洲精品免费看| 精品国产一二三区| 91片在线免费观看| 久久精品国产免费看久久精品| 国产精品久久久久久久久快鸭 | 国产欧美精品一区二区三区四区 | 国产综合一区二区| 亚洲视频一区二区在线观看| 欧美电影在哪看比较好| 成人黄页在线观看| 日韩精品欧美成人高清一区二区| 国产日韩av一区| 91麻豆精品国产91久久久 | 国产成人8x视频一区二区| 亚洲韩国精品一区| 国产精品视频一区二区三区不卡| 欧美丰满少妇xxxxx高潮对白| 国产不卡视频在线播放| 日本中文字幕不卡| 一区二区在线看| 国产午夜亚洲精品理论片色戒 | 亚洲成人激情社区| 国产精品亲子伦对白| 欧美一区2区视频在线观看| 91蜜桃婷婷狠狠久久综合9色| 激情欧美日韩一区二区| 丝袜国产日韩另类美女| 一区二区三区久久| 国产精品久久777777| 久久伊人中文字幕| 欧美一区欧美二区| 欧美日韩在线亚洲一区蜜芽| 岛国精品在线播放| 国内精品写真在线观看| 日本不卡不码高清免费观看| 亚洲亚洲人成综合网络| 亚洲欧美日韩综合aⅴ视频| 久久久久久久电影| 精品福利在线导航| 日韩视频一区在线观看| 欧美日韩国产一级| 欧美三级乱人伦电影| 91福利在线播放| 在线观看欧美日本| 91久久久免费一区二区| 欧美在线你懂的| 欧美视频日韩视频| 欧美亚一区二区| 欧美日韩国产影片| 欧美美女激情18p| 日韩一区二区三区视频在线观看| 欧美一区在线视频| 日韩免费福利电影在线观看| 日韩精品在线一区二区| 亚洲卡通动漫在线| 亚洲色图欧洲色图| 一二三四区精品视频| 亚洲一区二区三区四区不卡| 亚洲国产精品一区二区久久恐怖片 | 一区二区三区 在线观看视频| 中文字幕一区二区不卡| 亚洲三级小视频| 亚洲美女淫视频| 亚洲chinese男男1069| 日韩国产欧美在线观看| 老司机精品视频导航| 国产精品综合在线视频| av一二三不卡影片| 色哟哟国产精品| 欧美福利一区二区| 久久久久久亚洲综合影院红桃| 久久久久久久久免费| 国产精品久线观看视频| 亚洲夂夂婷婷色拍ww47| 日韩av中文字幕一区二区 | 亚洲男人天堂一区| 亚洲成人精品一区| 久久99精品久久久久久| 国产成人精品亚洲日本在线桃色| 春色校园综合激情亚洲| 欧美亚洲丝袜传媒另类| 精品久久99ma| 1区2区3区国产精品| 亚洲mv大片欧洲mv大片精品| 精品午夜久久福利影院| youjizz国产精品| 欧美日韩一级片在线观看| 日韩免费在线观看| 亚洲欧美日韩久久精品| 日韩综合在线视频| 成人午夜视频在线观看| 在线免费不卡电影| 国产亚洲一区字幕| 亚洲综合图片区| 国产剧情一区二区三区| 欧美性感一区二区三区| 久久午夜老司机| 亚洲成人午夜影院| 成人午夜私人影院| 日韩欧美国产综合一区 | 91精品欧美福利在线观看| 国产亚洲精品7777| 天天综合色天天综合| av一区二区三区黑人| 精品少妇一区二区三区免费观看| 亚洲欧美乱综合| 国产精品综合av一区二区国产馆| 欧美综合一区二区三区| 中文字幕第一区综合| 免费成人在线观看| 欧美亚洲综合色| 亚洲欧洲色图综合| 精品亚洲成av人在线观看| 欧美日韩午夜精品| 亚洲免费在线观看视频| 丰满白嫩尤物一区二区| 日韩精品在线一区二区| 亚洲v精品v日韩v欧美v专区| 91小视频在线| 国产色产综合色产在线视频| 日韩高清不卡在线| 欧美体内she精视频| 亚洲视频在线观看三级| 成人三级在线视频| 久久精品一区二区三区四区| 蜜桃av一区二区三区| 3atv在线一区二区三区| 亚洲精品国产第一综合99久久| 国产**成人网毛片九色| 久久亚洲一区二区三区明星换脸| 免费观看在线综合色| 69久久99精品久久久久婷婷 | 亚洲成人资源网| 色婷婷综合五月| 亚洲精品日韩综合观看成人91| 国产成人av自拍| 欧美国产精品一区二区| 国产高清视频一区| 国产亚洲精品超碰| 国产mv日韩mv欧美| 国产丝袜在线精品| 国产成人av一区二区三区在线观看| 精品成人私密视频| 国产一区二区毛片| 国产丝袜在线精品| 成人av资源站| 中文字幕亚洲视频| 99国产一区二区三精品乱码| 亚洲欧洲国产日本综合| 一本一道波多野结衣一区二区| 一区二区三区在线视频观看58| 欧美亚洲禁片免费| 亚洲成人免费在线| 日韩网站在线看片你懂的| 久久99精品网久久| 日本一区二区在线不卡| av在线播放成人| 亚洲va中文字幕| 日韩欧美国产wwwww| 国产福利91精品| 中文字幕一区二区视频| 在线观看欧美精品| 免费在线观看不卡| 久久精品人人做人人综合| av电影在线观看不卡| 夜色激情一区二区| 日韩女优视频免费观看| 风间由美性色一区二区三区| 成人h动漫精品一区二| 亚洲图片激情小说| 欧美久久久久久久久| 国产一区二区三区| 国产三级精品在线|