【正文】
s time, your ideas are always special to clear. Want, want, line is clear, as if nothing could shake his. Also once seemed to be determined to do something, but more often is he backed out at last. Dislike his cowardice, finally found that there are a lot of love, there are a lot of miss, like shadow really have been doomed. Those who do, just green years oneself give oneself an arm injection, or。Originally, this world, can produce a chemical reaction to an event, in addition to resolutely, have to do, and time. 原來,這個(gè)世界上,對(duì)某個(gè)事件能產(chǎn)生化學(xué)反應(yīng)的,除了非做不可的堅(jiān)決,還有,時(shí)間。t want to give vent to out your inner voice can be in the high school children of the feelings in a period, but was eventually infarction when graduation party in the throat, later again stood on the pitch he has sweat profusely, looked at his thrown a basketball hoops, suddenly found himself has already can39。t really grow up, it seems is not so important。The end of our life, and can meet many things really do? 而窮盡我們的一生,又能遇到多少事情是真正地非做不可?During my childhood, think lucky money and new clothes are necessary for New Year, but as the advance of the age, will be more and more found that those things are optional??傆X得自己自己似乎應(yīng)該去做點(diǎn)什么,或者寫點(diǎn)什么。 May be back in the past, to oneself the paranoid weird belief disillusionment, these days, my mind has been very messy, in my mind constantly. Always feel oneself should go to do something, or write something. Twenty years of life trajectory deeply shallow, suddenly feel something, do it.26 一字開頭的年齡已經(jīng)到了尾聲。s actions.CSKA said they were surprised and disappointed by Toure39。s 21 win.Michel Platini, president of European football39。s Premier League match at Chelsea on Sunday.I am going to be at the match tomorrow and I have asked to meet Yaya Toure, he told BBC Sport.For me it39。s antiracism taskforce, is in London for the Football Association39。t charge you more than 35% of your pensation if you win the case.If you are thinking about signing up for a damagesbased agreement, you should make sure you39。t agree with the disciplinary action your employer has taken against you? your employer dismisses you and you think that you have been dismissed unfairly.For more information about dismissal and unfair dismissal, see Dismissal.You can make a claim to an employment tribunal, even if you haven39。 %計(jì)算最大值及其位置result=[r(index) y]。y39。)。hold offxlabel(39。r*39。hold on。2*x.^2.*cos(3*x)+x.*sin(5*x)+839。j=j+1。endr(j)=a+sum(bestindividual,2)*(ba)/(21)。for i=1:py %進(jìn)行二進(jìn)制轉(zhuǎn)換成十進(jìn)制的解碼操作bestindividual(1,i)=2.^(py1).*bestindividual(:,i)。 %求出群體中適應(yīng)值最大的個(gè)體及其適應(yīng)值bestindividual=newpopu(index,:)。endelsenewpopu(i,:)=popu(i,:)。24if newpopu(i,mpoint)==0newpopu(i,mpoint)=1。mpoint=1。for i=1:popusize %執(zhí)行變異操作if randpmmpoint=round(rand*chromlength)。newpopu(i+1,:)=popu(i+1,:)。newpopu(i+1,:)=[popu(i+1,1:cpoint) popu(i,cpoint+1:chromlength)]。for i=1:2:popusize1 %執(zhí)行交叉操作if randpccpoint=round(rand*chromlength)。elsefitone=fitone+1。while wheel=popusize %執(zhí)行轉(zhuǎn)盤式選擇操作if wh(wheel)fitscore(fitone)newpopu(wheel,:)=popu(fitone,:)。% 從小到大排列wheel=1。%個(gè)體被選中的概率fitscore=cumsum(fitscore)。 %計(jì)算群體中每個(gè)個(gè)體的適應(yīng)度for i=1:popusize %執(zhí)行復(fù)制操作if yvalue(i)0yvalue(i)=0。x=a+popu2*(ba)/(2.^11)。py=py1。 %隨機(jī)產(chǎn)生 n 行 m 列的初始群體while j=30 %設(shè)置程序中止條件py=chromlength。j=1。endendpopusize=n。for i=1:50 %求出群體的碼串最小長(zhǎng)度 mif (ba)/e2^(i)m=i+1。pm—變異概率。b—搜索下限。expo(expo(b))=0;expo=nonzeros(expo);evol_gen=old_gen(expo,:);evol_fitness=fitness(expo,:);evol_popusize=popusize2;posel=evol_fitness/sum(evol_fitness);poselcum=cusum(posel);r=rand(1,evol_popusize);selected=1+sum(poselcum*ones(1,evol_popusize)ones(evol_popusize,1)*r);evol_gen=evol_gen(selection,:);(4)重組重組算子是產(chǎn)生新個(gè)體的主要方法,它決定了遺傳算法的全局搜索能力. 重組操作的作用是將原有的優(yōu)良基因遺傳給下一代個(gè)體. 并生成包含更優(yōu)良基因的新個(gè)體. 通常使用的遺傳算子是一點(diǎn)交叉法,就是按交叉概率pc(0pc1)實(shí)施交叉操作,兩個(gè)個(gè)體編碼串(string)在交叉位置處(crossp)相互交換各自的部分編碼,從而形成新的一對(duì)個(gè)體. 程序如下:function [new_gen]=rebination(old_gen,pc)[nouse,match]=sort(rand(size(old_gen,1),1));match_gen=old_gen(match,:);17pairs=size(match gen,1)/2;bit_n=size(match_gene,2);string=rand(pairs,1)pc;crossp=randint(string,1,[1,bit_n]);crossp=string.*crossp;for i=1:pairsnew_gen([2*i1 2*i],:)=[match_gen([2*i1 2*i],1:crossp(i)) match_gen([2*i 2*i1],crossp(i)+1:bin_n)];end另外,一點(diǎn)交叉法操作的信息比較小,交叉點(diǎn)的位置的選擇可能會(huì)帶來較大的偏差,一點(diǎn)交叉算子不利于長(zhǎng)距離的保留和重組.(5)變異變異算子是模擬自然界生物進(jìn)化的中染色體的基因突變現(xiàn)象,從而改變?nèi)旧w的結(jié)構(gòu)和物理性狀. 變異算子是產(chǎn)生新個(gè)體的輔助方法,它決定了遺傳算法的局部搜索(mp)隨機(jī)反轉(zhuǎn)某位等位基因的二進(jìn)制字符的值來實(shí)現(xiàn). 程序如下:function [new_gen]=mutation(old_gen,pm)mpoints=find(rand(size(old_gen))pm);new_gen=old_gen;new_gen(mpoints)=1 old_gen(mpoints);end當(dāng)重組操作發(fā)生早熟收斂時(shí),這時(shí)引入變異算子會(huì)有很好的效果. 一方面,變異算子可以使群體進(jìn)化中丟失的等位基因信息得以恢復(fù),保持群體基因中的差異性,防止發(fā)生早熟收斂;另一方面,當(dāng)種群規(guī)模較大時(shí),在重組操作基礎(chǔ)上引入適度的變異,也能夠提高遺傳算法的局部搜索效率.5 遺傳算法的函數(shù)優(yōu)化的應(yīng)用舉例考慮如下的一個(gè)優(yōu)化問題:max{f(x)|x∈X},這里f是X上的一個(gè)函數(shù),X是問題的解空間. 它可以是一個(gè)有限集合(如組合優(yōu)化問題),也可以是實(shí)空間Rn的一個(gè)子集(如連接優(yōu)化問題)等. 有了以上的理論基礎(chǔ),現(xiàn)在來舉個(gè)簡(jiǎn)單的實(shí)例來說明,如優(yōu)18化如下的目標(biāo)函數(shù)(求最大值):f(x)=2x2cos(3x)+xsin(5x)+8 (7)打開并進(jìn)入 Matlab, 文件,輸入附錄上的程序內(nèi)容,并保存名為 的文件. 完成后,返回到控制窗口,輸入如下的內(nèi)容:sga(40,2,10,). 執(zhí)行即可得出如下結(jié)果,x=;y=,如圖 2 所示(與精確值基本相同),可見此算法是正確的.圖 2 遺傳算法程序優(yōu)化結(jié)果圖6 結(jié)論 主要發(fā)現(xiàn)遺傳算法的研究歸納起來分為理論與技術(shù)研究、應(yīng)用研究?jī)蓚€(gè)方面. 理論與技術(shù)研究主要從遺傳操作、群體大小、參數(shù)控制、適應(yīng)度評(píng)價(jià)以及并行實(shí)現(xiàn)技術(shù)等方面來提高遺傳算法的性能. 并且Matlab軟件有功能強(qiáng)大的數(shù)學(xué)函數(shù)支持編程效率高,語(yǔ)句簡(jiǎn)單,功能齊備利用Matlab來編寫遺傳算法程序簡(jiǎn)單而且易于操作. 啟示任何事物之間都存在著必然的聯(lián)系,就如遺傳算法. 遺傳算法的理論本身來源于自然界中“遺傳與選擇”的進(jìn)化過程然而現(xiàn)在遺傳算法的基本理論已經(jīng)廣泛用于函數(shù)優(yōu)19化、組合優(yōu)化、生產(chǎn)調(diào)度、自動(dòng)控制、機(jī)器人智能、人工生命、機(jī)器學(xué)習(xí)、數(shù)據(jù)挖掘等各方面. 因此在日常的生活與學(xué)習(xí)中我們要善于用普遍聯(lián)系的哲學(xué)觀去發(fā)現(xiàn)事物、認(rèn)知事物最后找到解決問題的最優(yōu)方法. 局限性遺傳算法作為一種優(yōu)化理論,該文在尋求最優(yōu)解時(shí),未能對(duì)最優(yōu)解產(chǎn)生的過程進(jìn)行詳細(xì)的描述,只是給出了粗略的介紹, 這是不足的地方. 努力的方向遺傳算法因?yàn)槠鋷缀醪恍枰髥栴}的任何信息,僅需目標(biāo)函數(shù)的信息,就可以得出全局最優(yōu)解,具有非常廣闊的發(fā)展前景. 但是遺傳算法作為一種優(yōu)化理論,其本身就是很復(fù)雜,所以對(duì)任何問題都適用的萬能算法至今仍找不到. 在優(yōu)化理論方面,要注意以下的幾個(gè)方面:(1)對(duì)于對(duì)f(x)的極小值優(yōu)化問題,標(biāo)準(zhǔn)適應(yīng)函數(shù)可定義: ??xnormaif=f; ??x?(?, ] (8) ri= f1?; [0, ) (9)(2)適應(yīng)度函數(shù)的確定適應(yīng)度函數(shù)是用于評(píng)價(jià)各碼串對(duì)問題適應(yīng)程度的準(zhǔn)則. 函數(shù)優(yōu)化問題是直接把函數(shù)本身作為目標(biāo)函數(shù),對(duì)于復(fù)雜的系統(tǒng),必須構(gòu)造出恰當(dāng)?shù)哪繕?biāo)函數(shù).(3)確定算法本身的參數(shù)群體的大?。ㄓ址Q群體