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

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

?? ex15.c

?? 遺傳算法的源程序例子
?? C
字號:
/* ----------------------------------------------------------------------------  ex15.C  mbwall 28jul94  Copyright (c) 1995-1996  Massachusetts Institute of Technology DESCRIPTION:   This example nearly identical to example 2, but it uses convergence as thestopping criterion for the GA rather than number-of-generations.---------------------------------------------------------------------------- */#include <stdio.h>#include <iostream.h>#include <fstream.h>#include <math.h>#include <ga/ga.h>float objective(GAGenome &);intmain(int argc, char **argv){  cout << "Example 15\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.  It uses the convergence of the best-of-generation\n";  cout << "as the criterion for when to stop.\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.// When we use convergence as the completion measure we have to specify both// a convergence value (larger means more converged) and a number-of-gen// which specifies how many generations back to look to calculate the // convergence.  The number of generations back defaults to 20, so you do not// have to set that if you don't want to.  int popsize  = 30;  float pmut   = 0.01;  float pcross = 0.6;  float pconv  = 0.99;		// threshhold for when we have converged  int nconv    = 50;		// how many generations back to look// 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 i;  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};  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 be sure we got the right one.  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.  GABin2DecGenome genome(map, objective, (void *)target);// Now create the GA using the genome and run it.  GASteadyStateGA ga(genome);  ga.scoreFrequency(1);  ga.flushFrequency(50);  ga.scoreFilename("bog.dat");  ga.populationSize(popsize);  ga.pMutation(pmut);  ga.pCrossover(pcross);  ga.pConvergence(pconv);  ga.nConvergence(nconv);  ga.terminator(GAGeneticAlgorithm::TerminateUponConvergence);  ga.evolve();// Dump the results of the GA to the screen.  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();// 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), 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 & c){  GABin2DecGenome & genome = (GABin2DecGenome &)c;  float *sequence = (float *)c.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一区二区三区免费野_久草精品视频
日韩欧美自拍偷拍| 成人激情开心网| 欧美一激情一区二区三区| 亚洲一区免费视频| 欧美丰满少妇xxxxx高潮对白 | 99re这里只有精品6| 中文字幕乱码久久午夜不卡| 99久久99久久免费精品蜜臀| 一区二区三区日韩| 欧美一卡二卡在线观看| 国产最新精品精品你懂的| 久久久99久久精品欧美| 91啪在线观看| 免费观看成人鲁鲁鲁鲁鲁视频| 久久日一线二线三线suv| eeuss鲁片一区二区三区 | 一本久久精品一区二区| 亚洲国产乱码最新视频| 精品免费一区二区三区| 91丨九色porny丨蝌蚪| 丝袜美腿成人在线| 久久精品一二三| 91亚洲精品一区二区乱码| 亚洲不卡一区二区三区| 久久久不卡网国产精品一区| 在线视频一区二区免费| 国产在线播放一区| 夜夜嗨av一区二区三区| 久久综合资源网| 91福利在线免费观看| 国内久久婷婷综合| 亚洲一区二区精品久久av| 久久人人爽人人爽| 4438成人网| 色综合久久中文字幕综合网 | 国产69精品久久久久777| 首页国产欧美久久| 精品国产凹凸成av人网站| 91免费观看视频| 国产一区二区三区久久悠悠色av| 亚洲一本大道在线| 亚洲国产精品av| 欧美成人性福生活免费看| 91福利视频网站| 成人黄色大片在线观看| 麻豆视频观看网址久久| 一区二区三区精品| 中文字幕不卡三区| 欧美精品一区二区三区一线天视频| 欧洲在线/亚洲| a级高清视频欧美日韩| 国产一区二区视频在线| 日韩成人一区二区三区在线观看| 亚洲欧美日韩国产综合在线| 久久久91精品国产一区二区三区| 欧美一卡二卡在线| 91精品国产色综合久久久蜜香臀| 一本一道波多野结衣一区二区| 成人激情小说乱人伦| 国产一区二区三区香蕉| 韩国v欧美v亚洲v日本v| 日本va欧美va瓶| 日韩精品电影一区亚洲| 亚洲va韩国va欧美va精品| 亚洲欧美视频在线观看| 亚洲日本欧美天堂| 国产精品狼人久久影院观看方式| 日韩欧美亚洲另类制服综合在线 | 91捆绑美女网站| 成人avav影音| av综合在线播放| 91免费在线视频观看| 91丨porny丨中文| 97精品久久久午夜一区二区三区 | 肉丝袜脚交视频一区二区| 亚洲地区一二三色| 天堂午夜影视日韩欧美一区二区| 亚洲国产欧美在线人成| 日韩在线卡一卡二| 美女诱惑一区二区| 国产在线看一区| 国产成人亚洲综合a∨猫咪| 国产成人免费网站| 不卡一区二区三区四区| 99re热这里只有精品视频| 91蜜桃传媒精品久久久一区二区| 色婷婷久久久亚洲一区二区三区| 色88888久久久久久影院野外| 91福利小视频| 欧美一区二区三区思思人| 日韩三级视频在线观看| 久久久高清一区二区三区| 国产精品久久国产精麻豆99网站 | 奇米777欧美一区二区| 免费一级欧美片在线观看| 久久国产生活片100| 国产精品影视在线观看| 91天堂素人约啪| 制服丝袜亚洲网站| 国产亚洲污的网站| 伊人色综合久久天天人手人婷| 亚洲成人7777| 国产精品亚洲一区二区三区在线| 成人黄页在线观看| 精品视频一区三区九区| 精品剧情在线观看| 中文字幕制服丝袜一区二区三区 | 亚洲欧美日韩国产综合| 日韩成人午夜精品| 国产91精品欧美| 欧美三级韩国三级日本一级| 精品国产亚洲在线| 亚洲欧美日本韩国| 精品综合免费视频观看| 97精品国产露脸对白| 日韩一卡二卡三卡国产欧美| 国产精品日韩精品欧美在线| 亚洲超丰满肉感bbw| 成人性生交大片| 91 com成人网| 中文字幕日韩欧美一区二区三区| 日韩激情一二三区| 91亚洲大成网污www| 欧美mv日韩mv国产网站app| 亚洲视频综合在线| 激情综合亚洲精品| 欧美日韩一区二区在线观看 | 亚洲精品乱码久久久久| 九九久久精品视频| 欧美影院一区二区| 亚洲国产精品国自产拍av| 久久电影网站中文字幕 | 欧美一区在线视频| 亚洲日本韩国一区| 国产成人免费视| 91精品在线免费观看| 亚洲精品欧美综合四区| 国产精品99久| 欧美mv日韩mv亚洲| 免费观看91视频大全| 色综合久久99| 国产精品国产三级国产有无不卡 | 欧美一区二区二区| 一区二区欧美国产| 99久久久免费精品国产一区二区| 欧美tickle裸体挠脚心vk| 日韩1区2区3区| 欧美体内she精高潮| 亚洲女人****多毛耸耸8| 成人综合婷婷国产精品久久蜜臀| 中文天堂在线一区| 午夜久久福利影院| 99国产欧美久久久精品| 久久美女高清视频| 久久精品国产成人一区二区三区| 欧美精品精品一区| 性久久久久久久久久久久| 在线看日本不卡| 亚洲乱码中文字幕| 91色视频在线| 亚洲精选免费视频| 91丨九色丨尤物| 亚洲综合无码一区二区| 在线观看91精品国产入口| 亚洲综合精品自拍| 欧美日韩一区三区| 亚洲高清免费观看高清完整版在线观看| 91麻豆免费看| 亚洲一区在线观看视频| 欧美日韩中字一区| 丝袜美腿亚洲色图| 久久精品在这里| 国产精品综合久久| 国产精品嫩草影院av蜜臀| 成人免费视频app| 1000部国产精品成人观看| 97se亚洲国产综合在线| 亚洲三级视频在线观看| 日韩中文字幕一区二区三区| 中文字幕欧美三区| 国产精品一二三| 中文字幕欧美区| 91视频在线看| 亚洲国产欧美在线人成| 欧美电影免费观看高清完整版在线 | 色呦呦网站一区| 亚洲一二三四在线观看| 欧美美女喷水视频| 精品一区二区三区免费观看| 欧美国产综合色视频| 色先锋资源久久综合| 图片区小说区区亚洲影院| 26uuu国产在线精品一区二区| 国产成人精品亚洲日本在线桃色| 国产精品成人网| 日韩一区和二区| 成人av集中营| 日韩av二区在线播放| 国产亚洲精品中文字幕| 欧美在线观看你懂的|