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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ex2.c

?? 遺傳算法的源程序例子
?? C
字號:
/* ----------------------------------------------------------------------------  ex2.C  mbwall 28jul94  Copyright (c) 1995-1996  Massachusetts Institute of Technology DESCRIPTION:   Example program for the SimpleGA class and Bin2DecGenome class.  Thisprogram generates randomly a series of numbers then tries to match thosevalues in a binary-to-decimal genome.  We use a simple GA (with linearscaled fitness selection and non-steady-state population generation) andbinary-to-decimal, 1D genomes.  We also use the userData argument to theobjective function.---------------------------------------------------------------------------- */#include <stdio.h>#include <iostream.h>#include <fstream.h>#include <math.h>#include <ga/GASimpleGA.h>#include <ga/GABin2DecGenome.h>float Objective(GAGenome &);intmain(int argc, char **argv){  cout << "Example 2\n\n";  cout << "This program generates a sequence of random numbers then uses\n";  cout << "a simple GA and binary-to-decimal genome to match the\n";  cout << "sequence.\n\n";// 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.  unsigned int seed = 0;  for(int ii=1; ii<argc; ii++) {    if(strcmp(argv[ii++],"seed") == 0) {      seed = atoi(argv[ii]);    }  }// Declare variables for the GA parameters and set them to some default values.  int popsize  = 25;  int ngen     = 100;  float pmut   = 0.01;  float pcross = 0.6;// Generate a sequence of random numbers using the values in the min and max// arrays.  We also set one of them to integer value to show how you can get// explicit integer representations by choosing your number of bits// appropriately.  GARandomSeed(seed);  int n=7;  float *target = new float[n];  float min[] = {0, 0,   3, -5, 100,    0.001, 0};  float max[] = {1, 100, 3, -2, 100000, 0.010, 7};  int i;  for(i=0; i<n; i++)    target[i] = GARandomFloat(min[i], max[i]);  target[6] = GARandomInt((int)min[6], (int)max[6]);// Print out the sequence to see what we got.  cout << "input sequence:\n";  for(i=0; i<n; i++){    cout.width(10);    cout << target[i] << " ";  }  cout << "\n"; cout.flush();// Create a phenotype then fill it with the phenotypes we will need to map to// the values we read from the file.  The arguments to the add() method of a// Bin2Dec phenotype are (1) number of bits, (2) min value, and (3) max value.// The phenotype maps a floating-point number onto the number of bits that// you designate.  Here we just make everything use 8 bits and use the max and// min that were used to generate the target values.  You can experiment with// the number of bits and max/min values in order to make the GA work better// or worse.  GABin2DecPhenotype map;  for(i=0; i<n; i++)    map.add(8, min[i], max[i]);// Create the template genome using the phenotype map we just made.  The// GA will use this genome to clone the population that it uses to do the// evolution.  We pass the objective function to create the genome.  We // also use the user data function in the genome to keep track of our// target values.  GABin2DecGenome genome(map, Objective, (void *)target);// Now create the GA using the genome, set the parameters, and run it.  GASimpleGA ga(genome);  ga.populationSize(popsize);  ga.nGenerations(ngen);  ga.pMutation(pmut);  ga.pCrossover(pcross);  ga.scoreFilename("bog.dat");  ga.flushFrequency(50);	// dump scores to disk every 50th generation  ga.evolve(seed);// Dump the results of the GA to the screen.  We print out first what a random// genome looks like (so we get a bit of a feel for how hard it is for the// GA to find the right values) then we print out the best genome that the// GA was able to find.  genome.initialize();  cout << "random values in the genome:\n";;  for(i=0; i<map.nPhenotypes(); i++){    cout.width(10); cout << genome.phenotype(i) << " ";  }  cout << "\n";  genome = ga.statistics().bestIndividual();  cout << "the ga generated:\n";  for(i=0; i<map.nPhenotypes(); i++){    cout.width(10); cout << genome.phenotype(i) << " ";  }  cout << "\n\n"; cout.flush();// We could print out the genome directly, like this:// cout << genome << "\n";  cout << "best of generation data are in 'bog.dat'\n";// Clean up by freeing the memory we allocated.  delete [] target;  return 0;} // For this objective function we try to match the values in the array of float// that is passed to us as userData.  If the values in the genome map to // values that are close, we return a better score.  We are limited to positive// values for the objective value (because we're using linear scaling - the// default scaling method for SimpleGA), so we take the reciprocal of the // absolute value of the difference between the value from the phenotype and // the value in the sequence.floatObjective(GAGenome& g){  GABin2DecGenome & genome = (GABin2DecGenome &)g;  float *sequence = (float *)g.userData();  float value=genome.nPhenotypes();  for(int i=0; i<genome.nPhenotypes(); i++)    value += 1.0 / (1.0 + fabs(genome.phenotype(i) - sequence[i]));  return value;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区二区在线看| 亚洲日本在线看| 欧美日韩国产123区| 色综合视频在线观看| 色综合久久久网| 色国产综合视频| 欧美日韩国产区一| 日韩一级黄色大片| ww久久中文字幕| 国产精品三级av在线播放| 国产精品区一区二区三区| 国产精品久久一级| 亚洲天堂福利av| 午夜精品123| 久久成人免费电影| 国产成人av一区二区三区在线观看| 国产美女在线精品| 色综合久久99| 337p亚洲精品色噜噜狠狠| 欧美精品一区二区三区在线| 国产欧美va欧美不卡在线| 国产精品第一页第二页第三页| 有码一区二区三区| 日韩av中文字幕一区二区三区| 国产在线国偷精品产拍免费yy| 成人理论电影网| 欧美久久久久久蜜桃| 久久欧美一区二区| 玉米视频成人免费看| 久久精品久久久精品美女| fc2成人免费人成在线观看播放| 欧美综合色免费| 久久精品亚洲精品国产欧美| 亚洲影视资源网| 免费在线看一区| 91麻豆视频网站| 欧美大白屁股肥臀xxxxxx| 国产精品不卡一区| 国产综合色在线| 欧美精品在线一区二区| 国产欧美精品一区二区三区四区 | 秋霞成人午夜伦在线观看| 国产一区二区三区最好精华液| www.一区二区| 2023国产精品自拍| 亚洲第一综合色| 成人av综合在线| 2022国产精品视频| 麻豆成人av在线| 欧美日韩综合在线免费观看| 国产精品福利一区| 国产一区二区不卡| 欧美岛国在线观看| 丝袜诱惑亚洲看片| 欧亚洲嫩模精品一区三区| 国产精品黄色在线观看| 国产一区二区三区四 | 美女视频一区在线观看| 在线观看日韩一区| 中文字幕一区在线| 国产91丝袜在线播放九色| 26uuu亚洲综合色欧美| 日本欧美大码aⅴ在线播放| 日本伦理一区二区| 亚洲男人的天堂在线aⅴ视频| 丁香婷婷深情五月亚洲| 久久久久国产免费免费| 国内欧美视频一区二区| 久久综合久久综合久久综合| 久久99精品视频| 26uuu亚洲| 国产一区二区不卡在线| 国产欧美精品日韩区二区麻豆天美| 久久99精品久久久久婷婷| 精品少妇一区二区| 黄网站免费久久| 国产调教视频一区| 不卡av在线免费观看| 亚洲人成网站色在线观看| 色网站国产精品| 性久久久久久久久久久久| 欧美精品1区2区3区| 久久成人久久鬼色| 久久久久久久一区| 成人av网站免费| 亚洲免费在线观看| 在线播放日韩导航| 狠狠狠色丁香婷婷综合激情 | 久久av中文字幕片| 国产日韩欧美电影| 91日韩在线专区| 亚洲成a人片在线不卡一二三区| 91精品麻豆日日躁夜夜躁| 精品伊人久久久久7777人| 久久一区二区三区国产精品| 99免费精品在线| 日韩专区欧美专区| 国产日韩欧美高清在线| 色婷婷狠狠综合| 蜜芽一区二区三区| 中文字幕一区二区三区不卡在线| 在线观看欧美精品| 精品夜夜嗨av一区二区三区| 国产精品久久久99| 欧美一区日韩一区| 白白色亚洲国产精品| 无码av免费一区二区三区试看| 久久新电视剧免费观看| 色婷婷综合久久久中文字幕| 麻豆国产精品777777在线| 中文文精品字幕一区二区| 欧美剧情电影在线观看完整版免费励志电影| 久久99精品久久久久| 亚洲日本免费电影| 久久亚洲精品小早川怜子| 欧洲视频一区二区| 国产成人精品www牛牛影视| 五月激情六月综合| 日韩理论电影院| 国产亚洲欧美色| 51久久夜色精品国产麻豆| 97久久人人超碰| 经典三级在线一区| 五月天欧美精品| 亚洲久草在线视频| 国产欧美一区视频| 日韩三级视频中文字幕| 日本高清不卡aⅴ免费网站| 国产剧情一区二区| 免费精品视频最新在线| 亚洲国产成人精品视频| 亚洲乱码一区二区三区在线观看| 精品日韩一区二区三区免费视频| 欧美日韩在线精品一区二区三区激情| 成人动漫av在线| 国产伦精品一区二区三区视频青涩 | 99久久久国产精品| 国产黑丝在线一区二区三区| 久久精品久久综合| 日韩成人午夜电影| 天堂影院一区二区| 午夜视频在线观看一区二区| 亚洲黄色录像片| 一区二区三区中文字幕| 国产精品乱码久久久久久| 国产欧美一二三区| 国产午夜亚洲精品理论片色戒 | 国产一区二区三区高清播放| 蜜桃在线一区二区三区| 九色综合狠狠综合久久| 免费人成精品欧美精品| 捆绑紧缚一区二区三区视频| 免费欧美在线视频| 国内欧美视频一区二区| 国产成a人亚洲| 成人激情免费电影网址| 99久久精品免费| 色婷婷亚洲综合| 欧美性大战久久久久久久蜜臀| 日本韩国欧美一区二区三区| 欧美在线短视频| 欧美一区二区三区视频在线观看| 7777精品伊人久久久大香线蕉超级流畅| 欧美性色欧美a在线播放| 欧美自拍偷拍一区| 欧美一级国产精品| 亚洲精品一区二区三区蜜桃下载| 国产网站一区二区| 最好看的中文字幕久久| 亚洲国产精品欧美一二99| 日本中文字幕一区| 国产麻豆精品95视频| 91免费看视频| 欧美精品日韩综合在线| 欧美xxxxxxxxx| 国产精品大尺度| 日韩精彩视频在线观看| 国产精品一二三| 欧美午夜影院一区| 久久美女艺术照精彩视频福利播放| 中文一区在线播放| 亚洲成人av在线电影| 激情综合网av| 欧洲在线/亚洲| 久久综合色一综合色88| 亚洲九九爱视频| 国产精品一区免费视频| 欧美亚洲国产bt| 国产目拍亚洲精品99久久精品| 亚洲国产日韩在线一区模特| 久久av资源站| 欧美少妇一区二区| 欧美国产精品一区二区三区| 亚洲自拍偷拍九九九| 国产精品456露脸| 欧美日本一道本| 亚洲欧美成aⅴ人在线观看| 精品一区二区三区免费播放| 色偷偷一区二区三区| 日本一区二区综合亚洲|