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

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

?? ga.m

?? matlab 遺傳算法工具箱(有說(shuō)明文檔)
?? M
字號(hào):
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

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
337p粉嫩大胆色噜噜噜噜亚洲| 天堂蜜桃一区二区三区| 日韩理论在线观看| 亚洲尤物视频在线| 亚洲国产精品一区二区尤物区| 欧美国产97人人爽人人喊| 最新高清无码专区| 奇米影视在线99精品| 国产一区二区三区观看| www.99精品| 欧美色电影在线| 久久久久久久久久久99999| 国产精品色眯眯| 国产精品网站在线观看| 国产精品成人网| 日本美女一区二区三区视频| 国产精品一区二区三区99| 99精品欧美一区二区蜜桃免费| 欧美中文字幕久久| 久久亚洲一区二区三区明星换脸 | 日韩午夜在线观看视频| 精品国产一区二区国模嫣然| 亚洲免费观看高清完整版在线| 日本成人在线电影网| 国产成人av电影在线观看| 欧美三级资源在线| 中文字幕第一区综合| 日韩成人一级片| 97se亚洲国产综合在线| 日韩美女在线视频| 亚洲高清三级视频| 色综合天天综合狠狠| 亚洲精品午夜久久久| 一区2区3区在线看| 懂色一区二区三区免费观看| 欧美一区二区三区喷汁尤物| 亚洲嫩草精品久久| 成人少妇影院yyyy| 国产精品三级av| 成人午夜免费电影| 国产亚洲精品aa午夜观看| 日本欧美一区二区| 欧美精品国产精品| 日本一不卡视频| 欧美色手机在线观看| 丝袜亚洲另类欧美综合| 日本乱人伦一区| 一区二区三区四区不卡在线| 91麻豆免费在线观看| 成人免费视频在线观看| 99re这里都是精品| 一区二区三区四区在线播放| 色偷偷一区二区三区| 亚洲综合一二三区| 粉嫩高潮美女一区二区三区| 欧美国产在线观看| 色播五月激情综合网| 天天综合网 天天综合色| 日韩午夜电影av| 国产精品一区二区你懂的| 中文字幕制服丝袜成人av| 色老汉av一区二区三区| 丝袜美腿亚洲色图| 久久免费精品国产久精品久久久久| 国产一区二区精品久久| 亚洲日本成人在线观看| 欧美裸体一区二区三区| 国产精品99久久久久| 亚洲综合在线五月| 久久亚洲二区三区| 91黄色激情网站| 国产精品一区二区不卡| 亚洲电影视频在线| 国产精品乱人伦| 日韩欧美在线1卡| 96av麻豆蜜桃一区二区| 视频一区视频二区中文字幕| 6080日韩午夜伦伦午夜伦| 精品系列免费在线观看| 亚洲另类色综合网站| 欧美国产亚洲另类动漫| 欧美一区二区三区在线看 | 日本精品视频一区二区三区| 免费不卡在线视频| 亚洲曰韩产成在线| 亚洲欧美二区三区| 亚洲国产精品99久久久久久久久| 日韩精品视频网站| 中文字幕av资源一区| 欧美精品粉嫩高潮一区二区| 精品夜夜嗨av一区二区三区| 亚洲成人精品在线观看| 午夜不卡在线视频| 亚洲高清免费一级二级三级| 国产精品国产三级国产a| 久久久久久黄色| 精品国产乱码久久久久久牛牛| 欧美日韩精品一区视频| 欧美日韩一区在线观看| 国产一区二区三区电影在线观看| 日本不卡一二三区黄网| 免费欧美高清视频| 免费不卡在线观看| 美女一区二区三区| 精品一区二区三区免费| 国产一区二区精品久久99| 国产成人亚洲精品青草天美| 盗摄精品av一区二区三区| 成人污污视频在线观看| caoporn国产精品| 欧美欧美午夜aⅴ在线观看| 7878成人国产在线观看| 精品人伦一区二区色婷婷| 国产欧美日韩三区| 亚洲视频精选在线| 日韩高清国产一区在线| 青草av.久久免费一区| 成人中文字幕电影| 91国产福利在线| 久久中文字幕电影| 亚洲欧美日韩系列| 美腿丝袜一区二区三区| 99精品视频在线免费观看| 91精品国模一区二区三区| 亚洲精品在线电影| 一区二区三区精品在线| 久久国产日韩欧美精品| 99精品视频在线观看| 日韩欧美视频在线| 亚洲理论在线观看| 蜜桃视频一区二区三区| av在线不卡免费看| 日韩精品一区二区三区四区视频 | 日本一区二区三区久久久久久久久不 | 欧美一区二区性放荡片| 国产精品女上位| 免费不卡在线视频| 欧美视频日韩视频| 国产精品久久久一区麻豆最新章节| 日本sm残虐另类| 91国偷自产一区二区三区成为亚洲经典 | 国产乱妇无码大片在线观看| 欧洲国内综合视频| www国产亚洲精品久久麻豆| 亚洲一区在线观看网站| 91美女蜜桃在线| 国产精品视频在线看| 国产乱码精品一区二区三区五月婷 | 欧美一区二区三区在线视频| 亚洲国产精品自拍| 在线观看日产精品| 国产精品乱码一区二区三区软件 | 韩国成人在线视频| 欧美另类变人与禽xxxxx| 亚洲一区二区三区国产| 色国产精品一区在线观看| 成人免费在线视频观看| 99久久婷婷国产| 一区二区在线观看免费| 在线观看国产日韩| 无吗不卡中文字幕| 欧美一级午夜免费电影| 久久精品国内一区二区三区| 69久久99精品久久久久婷婷| 日本午夜精品视频在线观看| 日韩免费成人网| 国产精品77777| 久久一区二区三区四区| 国产成人99久久亚洲综合精品| 久久伊人蜜桃av一区二区| 成人国产电影网| 亚洲成在线观看| 国产丝袜在线精品| 91美女片黄在线观看91美女| 天堂影院一区二区| 国产日韩欧美精品一区| 欧美性一级生活| 国产专区综合网| 亚洲一二三四在线| 久久久午夜精品| 精品视频在线免费看| 国模无码大尺度一区二区三区| 国产精品不卡在线观看| 欧美一区二区三区不卡| 成人av动漫在线| 精品中文字幕一区二区小辣椒| 国产精品久久久久久久浪潮网站| 欧美视频日韩视频在线观看| 国产成人亚洲综合a∨婷婷图片| 亚洲高清中文字幕| 欧美国产成人在线| 久久综合一区二区| 欧美日韩精品电影| 色综合咪咪久久| 国产馆精品极品| 精品一区二区三区在线播放 | 亚洲一区二区三区四区在线| 国产嫩草影院久久久久| 欧美va亚洲va香蕉在线| 欧美一级xxx|