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

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

?? ex11.c

?? 遺傳算法的源程序例子
?? C
字號(hào):
/* ----------------------------------------------------------------------------  ex11.C  mbwall 13apr95  Copyright (c) 1995-1996  Massachusetts Institute of Technology DESCRIPTION:   This example shows how to use an order-based list genome.---------------------------------------------------------------------------- */#include <stdio.h>#include <stdlib.h>#include <iostream.h>#include <fstream.h>#include <ga/ga.h>// The objective function tells how good a genome is.  The Initializer defines// how the lists should be initialized.float objective(GAGenome &);void ListInitializer(GAGenome &);intmain(int argc, char *argv[]){  cout << "Example 11\n\n";  cout << "This program illustrates the use of order-based lists.  The\n";  cout << "list in this problem contains 25 numbers, 0 to 24.  It tries\n";  cout << "to put them in descending order from 24 to 0.\n\n";  cout.flush();// See if we've been given a seed to use (for testing purposes).  When you// specify a random seed, the evolution will be exactly the same each time// you use that seed number.  for(int ii=1; ii<argc; ii++) {    if(strcmp(argv[ii++],"seed") == 0) {      GARandomSeed((unsigned int)atoi(argv[ii]));    }  }// Set the default values of the parameters.  GAParameterList params;  GASteadyStateGA::registerDefaultParameters(params);  params.set(gaNpopulationSize, 30);	// population size  params.set(gaNpCrossover, 0.6);	// probability of crossover  params.set(gaNpMutation, 0.01);	// probability of mutation  params.set(gaNnGenerations, 1000);	// number of generations  params.set(gaNpReplacement, 0.5);	// how much of pop to replace each gen  params.set(gaNscoreFrequency, 10);	// how often to record scores  params.set(gaNnReplacement, 4);	// how much of pop to replace each gen  params.set(gaNflushFrequency, 10);	// how often to dump scores to file  params.set(gaNscoreFilename, "bog.dat");//  params.read("settings.txt");	        // grab values from file first  params.parse(argc, argv, gaFalse); // parse command line for GAlib args// Now create the GA and run it.  We first create a genome with the// operators we want.  Since we're using a template genome, we must assign// all three operators.  We use the order-based crossover site when we assign// the crossover operator.  GAListGenome<int> genome(objective);  genome.initializer(ListInitializer);  genome.mutator(GAListGenome<int>::SwapMutator);// Now that we have our genome, we create the GA (it clones the genome to // make all of the individuals for its populations).  Set the parameters on // the GA then let it evolve.  GASteadyStateGA ga(genome);  ga.crossover(GAListGenome<int>::PartialMatchCrossover);  ga.parameters(params);  ga.evolve();// Assign the best that the GA found to our genome then print out the results.  genome = ga.statistics().bestIndividual();  cout << "the ga generated the following list (objective score is ";  cout << genome.score() << "):\n" << genome << "\n";  cout << "best of generation data are in '" << ga.scoreFilename() << "'\n";  cout << ga.parameters() << "\n";//  char *fn;//  ga.get(gaNscoreFilename, &fn);//  cout << "filename is '" << fn << "'\n";  return 0;} /* ----------------------------------------------------------------------------Objective function  The objective function gives one point for every number in the correctposition.  We're trying to get a sequence of numbers from n to 0 in descendingorder.---------------------------------------------------------------------------- */floatobjective(GAGenome & c){  GAListGenome<int> & genome = (GAListGenome<int> &)c;  float score = (*genome.head() == genome.size()-1); // move to head of list  for(int i=genome.size()-2; i>0; i--)    score += (*genome.next() == i); // cycle through list and look at nodes  return score;}/* ----------------------------------------------------------------------------List Genome Operators-------------------------------------------------------------------------------The initializer creates a list with n elements in it and puts a unique digitin each one.  After we make the list, we scramble everything up.---------------------------------------------------------------------------- */voidListInitializer(GAGenome & c){  GAListGenome<int> &child=(GAListGenome<int> &)c;  while(child.head()) child.destroy(); // destroy any pre-existing list  int n=25;  child.insert(0,GAListBASE::HEAD); // the head node contains a '0'  for(int i=1; i<n; i++)    child.insert(i);		// each subsequent node contains a number  for(int j=0; j<n; j++)    child.swap(GARandomInt(0,n-1), GARandomInt(0,n-1));}//   Here we specialize the write method for the List class.  This lets us see// exactly what we want (the default write method dumps out pointers to the// data rather than the data contents).//   This routine prints out the contents of each element of the list, // separated by a space.  It does not put a newline at the end of the list.//   Notice that you can specialize ANY function of a template class, but // some compilers are more finicky about how you do it than others.  For the// metrowerks compiler this specialization must come before the forced// instantiation.intGAListGenome<int>::write(ostream & os) const{  int *cur, *head;  GAListIter<int> tmpiter(*this);  if((head=tmpiter.head()) != 0) os << *head << " ";  for(cur=tmpiter.next(); cur && cur != head; cur=tmpiter.next())    os << *cur << " ";  return os.fail() ? 1 : 0;}// If your compiler does not do automatic instantiation (e.g. g++ 2.6.8),// then define the NO_AUTO_INST directive.#ifdef NO_AUTO_INST#include <ga/GAList.C>#include <ga/GAListGenome.C>#if defined(__GNUG__)template class GAList<int>;template class GAListGenome<int>;#elseGAList<int>;GAListGenome<int>;#endif#endif

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91免费版pro下载短视频| av中文字幕不卡| 亚洲欧美日韩一区| 欧美成人aa大片| 91麻豆视频网站| 国产精华液一区二区三区| 婷婷中文字幕一区三区| 中文字幕亚洲一区二区va在线| 欧美日韩成人一区二区| 99久久国产免费看| 狠狠色伊人亚洲综合成人| 亚洲一区二区三区视频在线 | 在线免费亚洲电影| 国产乱子伦视频一区二区三区| 亚洲成人黄色小说| 亚洲日本电影在线| 久久精品夜色噜噜亚洲a∨| 这里只有精品免费| 欧美性大战久久久久久久| 成人激情午夜影院| 亚洲国产精品尤物yw在线观看| 久久综合国产精品| 欧美人妇做爰xxxⅹ性高电影 | 欧美高清激情brazzers| 色综合天天综合网国产成人综合天| 国产一区二区在线影院| 美女尤物国产一区| 91精品国产综合久久香蕉的特点| 亚洲精品欧美在线| 91精品国产欧美日韩| 在线观看亚洲一区| 欧美中文字幕不卡| 日本精品免费观看高清观看| www..com久久爱| youjizz国产精品| 国产一区二区导航在线播放| 美女网站在线免费欧美精品| 偷拍亚洲欧洲综合| 视频在线观看一区| 日韩av电影免费观看高清完整版在线观看| 亚洲成人久久影院| 图片区日韩欧美亚洲| 亚洲成人在线观看视频| 亚洲成在人线免费| 日韩成人精品在线观看| 秋霞电影一区二区| 九九在线精品视频| 国产精品一区在线观看乱码 | 久久―日本道色综合久久| 精品国产一区久久| 欧美国产精品中文字幕| 国产精品不卡视频| 亚洲一二三区视频在线观看| 亚洲成人资源在线| 麻豆91精品视频| 国产一区在线观看视频| 国产不卡视频在线播放| 91麻豆国产香蕉久久精品| 欧美日韩中文字幕一区二区| 欧美精品成人一区二区三区四区| 日韩一区二区视频| 日本一区二区三区电影| 中文字幕一区二区三区蜜月| 亚洲午夜在线电影| 日产欧产美韩系列久久99| 看片网站欧美日韩| 国产91精品免费| 欧美在线色视频| 精品美女在线播放| 亚洲视频一二三| 日韩极品在线观看| 国产成人啪午夜精品网站男同| 成人av资源网站| 欧美精品色一区二区三区| 精品国产一区久久| 亚洲激情一二三区| 蜜芽一区二区三区| 国产成人啪午夜精品网站男同| 91欧美激情一区二区三区成人| 欧美日韩不卡一区| 国产欧美一区二区精品忘忧草 | 久久免费视频一区| 夜夜精品视频一区二区| 狠狠色狠狠色合久久伊人| 一本大道av一区二区在线播放| 欧美一级日韩免费不卡| 一区在线中文字幕| 蜜臂av日日欢夜夜爽一区| 91在线观看下载| 欧美电影免费观看高清完整版在线观看| 国产片一区二区三区| 日本在线不卡视频一二三区| 成人蜜臀av电影| 日韩限制级电影在线观看| 日韩毛片在线免费观看| 激情成人午夜视频| 欧美日韩精品一区二区三区蜜桃| 国产亚洲欧美在线| 日韩国产在线一| 97国产精品videossex| 久久伊99综合婷婷久久伊| 亚洲国产va精品久久久不卡综合| 成人免费高清在线观看| 精品三级av在线| 三级不卡在线观看| 91在线视频网址| av欧美精品.com| 欧美精品一区二区久久久| 日韩高清不卡一区二区三区| 91片在线免费观看| 欧美韩日一区二区三区四区| 蜜桃av一区二区在线观看| 欧美日韩精品欧美日韩精品一| 国产精品的网站| 国产成人精品影院| 欧美精品一区二区三区很污很色的| 亚洲午夜视频在线| 91高清视频免费看| 一区二区三区日本| 99riav久久精品riav| 国产精品久久久久久福利一牛影视| 91网站黄www| 国产欧美视频一区二区| 国产黑丝在线一区二区三区| 精品国产99国产精品| 美女视频一区二区| 91精品国产aⅴ一区二区| 石原莉奈在线亚洲三区| 欧美天堂亚洲电影院在线播放| 亚洲人xxxx| 色呦呦网站一区| 亚洲在线一区二区三区| 欧美视频一区二区三区在线观看| 亚洲精品第1页| 欧美三电影在线| 亚洲mv大片欧洲mv大片精品| 欧美在线观看一二区| 亚洲午夜羞羞片| 666欧美在线视频| 美女国产一区二区三区| 日韩欧美国产综合| 国产在线播精品第三| 精品sm捆绑视频| 国产成人在线观看免费网站| 国产精品伦一区二区三级视频| 国产91露脸合集magnet| 国产精品美女一区二区三区| 色综合色综合色综合| 亚洲综合激情另类小说区| 91极品美女在线| 日本中文字幕不卡| 26uuuu精品一区二区| 风间由美一区二区三区在线观看| 国产肉丝袜一区二区| 一本一道久久a久久精品| 一级精品视频在线观看宜春院 | 美国精品在线观看| 2024国产精品| 成人网在线播放| 亚洲一级二级三级在线免费观看| 欧美一区二区三区免费在线看| 极品少妇xxxx精品少妇| 国产精品天干天干在观线| 中文字幕亚洲成人| 欧美日韩精品欧美日韩精品一| 久久se这里有精品| 亚洲天堂福利av| 91超碰这里只有精品国产| 国产一区二区三区精品视频| 中文欧美字幕免费| 欧美午夜一区二区| 久88久久88久久久| 国产精品久久久久久久久久免费看| 在线一区二区三区做爰视频网站| 奇米777欧美一区二区| 国产精品视频看| 欧美日产在线观看| 国产91精品露脸国语对白| 亚洲成人激情综合网| 国产日本欧洲亚洲| 欧美日韩国产中文| 国产91丝袜在线播放0| 五月天一区二区| 亚洲国产精品ⅴa在线观看| 精品污污网站免费看| 国产乱码一区二区三区| 亚洲国产综合色| 国产精品你懂的| 日韩一区二区三区电影在线观看| 成人福利视频在线| 久久成人免费网| 亚洲国产精品自拍| 久久久久久毛片| 欧美一区二区国产| 色噜噜夜夜夜综合网| 国产馆精品极品| 蜜桃精品视频在线| 五月综合激情网| 一区二区三区四区精品在线视频| 久久噜噜亚洲综合|