• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆 - 1  文章 - 0  trackbacks - 0
            <2025年6月>
            25262728293031
            1234567
            891011121314
            15161718192021
            22232425262728
            293012345

            常用鏈接

            留言簿(3)

            隨筆檔案

            搜索

            •  

            最新評論

            共2頁: 1 2 
            H好長的對話
            re: 英語網站(超全) pass86 2007-07-19 12:58
            謝謝LZ,贊。
            re: subversion服務器的配置 pass86 2007-07-12 22:31
            推薦subversion,贊一個
            re: VS9中C++少得可憐的更新 pass86 2007-07-12 21:55
            用VS是用的它的IDE,一些庫,如MFC,這是我看中的,至于編譯器,我還是看中GCC,
            re: mutable的用法 pass86 2007-07-11 12:53
            mutalbe是否是是標準的關鍵字呢?在GCC中編譯不過去。
            re: UUID是什么? pass86 2007-07-09 13:59
            hava a look.
            re: 遠程過程調用 pass86 2007-07-09 13:57
            have a look.
            re: IDL是什么? pass86 2007-07-09 13:57
            hava a look
            re: subversion安裝配置記錄 pass86 2007-07-06 23:00
            在WINDOWS下怎么配置呢?TortoiseSVN在WINDOWS下的。
            支持第二種。
            re: do...while(0)的妙用 pass86 2007-07-06 22:52
            贊一個。
            贊一個。
            re: 管理信息系統論文 pass86 2007-06-25 17:07
            是否有其它論文啊,如軟件工程的,我需要。
            re: COM組件簡介 pass86 2007-06-22 23:30
            路過。
            記得以前學習的時候用了回溯的算法。
            偶有過。
            re: 程序員的十種級別 pass86 2007-06-21 17:47
            先當個工頭也不錯啊。
            re: Qt4.2.3編譯記錄 pass86 2007-06-21 17:37
            在學習列表中,支持。
            英文比較好啊。
            re: VC調試進階(2)--多個exe pass86 2007-06-13 13:57
            基本操作。
            偶也考,努力。
            。NET 2003,應該就沒有。
            估計PFnCreateObject creatorFuncTable[MAX_TYPE_ID];因該是
            PFnCreateObject* creatorFuncTable[MAX_TYPE_ID];
            re: boost1.34.0編譯日志 pass86 2007-06-07 16:45
            ...updated 5279 targets...
            re: boost1.34.0編譯日志 pass86 2007-06-07 16:36
            搞定,原來是我用的vsvars32.bat應該在一個控制臺下完成,因為它只在當前控制臺中設置的環境變量生效。
            LIB下生成了216個項目,1.2G。
            re: boost1.34.0編譯日志 pass86 2007-06-07 14:00
            bjam "sTOOLS=vc-7_1" --prefix=D:\Boost install
            編譯中無法找到windows.h

            完成結果
            ...failed updateing 244 targets...
            ...skiped 228 targets...
            ...updated 1022 targets...

            WHY?

            LIB文件夾下有102個項目。
            我用GCC編譯不過去,
            re: boost1.34.0編譯日志 pass86 2007-06-06 22:26
            我把/*?/去掉了,代會編譯試試。
            我編譯了一次1.33.1,只是復制了些頭文件到我的目標我的文件架,沒有生成。LIB文件,是怎么回事情呢,用的是。NET 2003選項,能夠給我發個
            。NET2003的編譯明命令行嗎,謝謝。
            pass86@gmail.com
            恩,是個知識點,細致入微,
            學到了。
            你倆都學C++阿。
            re: C++遺傳算法源程序 pass86 2007-05-26 17:38
            我也寫過一點,從書上改編的。
            /********************************************************************
            Filename: aiWorld.h
            Purpose: 遺傳算法,花朵演化。
            Author: pass86
            E-mail: pass86@gmail.com
            Created: 2007/03/29
            Id:
            Copyright:
            Licence:
            *********************************************************************/
            #ifndef AIWORLD_H_
            #define AIWORLD_H_

            #include <iostream>
            #include <ctime>
            #include <cstdlib>
            #include <cmath>

            #define kMaxFlowers 10

            using std::cout;
            using std::endl;

            class ai_World
            {
            public:
            ai_World()
            {
            srand(time(0));
            }
            ~ai_World() {}

            int temperature[kMaxFlowers]; //溫度
            int water[kMaxFlowers]; //水質
            int sunlight[kMaxFlowers]; //陽光
            int nutrient[kMaxFlowers]; //養分
            int beneficialInsect[kMaxFlowers]; //益蟲
            int harmfulInsect[kMaxFlowers]; //害蟲

            int currentTemperature;
            int currentWater;
            int currentSunlight;
            int currentNutrient;
            int currentBeneficialInsect;
            int currentHarmfulInsect;

            /**
            第一代花朵
            */
            void Encode();

            /**
            花朵適合函數
            */
            int Fitness(int flower);

            /**
            花朵演化
            */
            void Evolve();

            /**
            返回區間[start, end]的隨機數
            */
            inline int tb_Rnd(int start, int end)
            {
            if (start > end)
            return 0;
            else
            {
            //srand(time(0));
            return (rand() % (end + 1) + start);
            }
            }

            /**
            顯示數值
            */
            void show();
            };
            // ----------------------------------------------------------------- //
            void ai_World::Encode()
            // ----------------------------------------------------------------- //

            {
            int i;

            for (i=0;i<kMaxFlowers;i++)
            {
            temperature[i]=tb_Rnd(1,75);
            water[i]=tb_Rnd(1,75);
            sunlight[i]=tb_Rnd(1,75);
            nutrient[i]=tb_Rnd(1,75);
            beneficialInsect[i]=tb_Rnd(1,75);
            harmfulInsect[i]=tb_Rnd(1,75);
            }

            currentTemperature=tb_Rnd(1,75);
            currentWater=tb_Rnd(1,75);
            currentSunlight=tb_Rnd(1,75);
            currentNutrient=tb_Rnd(1,75);
            currentBeneficialInsect=tb_Rnd(1,75);
            currentHarmfulInsect=tb_Rnd(1,75);

            currentTemperature=tb_Rnd(1,75);
            currentWater=tb_Rnd(1,75);
            currentSunlight=tb_Rnd(1,75);
            currentNutrient=tb_Rnd(1,75);
            currentBeneficialInsect=tb_Rnd(1,75);
            currentHarmfulInsect=tb_Rnd(1,75);

            }
            // ----------------------------------------------------------------- //
            int ai_World::Fitness(int flower)
            // ----------------------------------------------------------------- //

            {
            int theFitness;


            theFitness=abs(temperature[flower]-currentTemperature);
            theFitness=theFitness+abs(water[flower]-currentWater);
            theFitness=theFitness+abs(sunlight[flower]-currentSunlight);
            theFitness=theFitness+abs(nutrient[flower]-currentNutrient);
            theFitness=theFitness+abs(beneficialInsect[flower]-currentBeneficialInsect);
            theFitness=theFitness+abs(harmfulInsect[flower]-currentHarmfulInsect);

            return (theFitness);

            }
            // ----------------------------------------------------------------- //
            void ai_World::Evolve()
            // ----------------------------------------------------------------- //

            {
            int fitTemperature[kMaxFlowers];
            int fitWater[kMaxFlowers];
            int fitSunlight[kMaxFlowers];
            int fitNutrient[kMaxFlowers];
            int fitBeneficialInsect[kMaxFlowers];
            int fitHarmfulInsect[kMaxFlowers];
            int fitness[kMaxFlowers];
            int i;
            int leastFit=0;
            int leastFitIndex;

            for (i=0;i<kMaxFlowers;i++)
            if (Fitness(i)>leastFit)
            {
            leastFit=Fitness(i);
            leastFitIndex=i;
            }

            temperature[leastFitIndex]=temperature[tb_Rnd(0,kMaxFlowers - 1)];
            water[leastFitIndex]=water[tb_Rnd(0,kMaxFlowers - 1)];
            sunlight[leastFitIndex]=sunlight[tb_Rnd(0,kMaxFlowers - 1)];
            nutrient[leastFitIndex]=nutrient[tb_Rnd(0,kMaxFlowers - 1)];
            beneficialInsect[leastFitIndex]=beneficialInsect[tb_Rnd(0,kMaxFlowers - 1)];
            harmfulInsect[leastFitIndex]=harmfulInsect[tb_Rnd(0,kMaxFlowers - 1)];

            for (i=0;i<kMaxFlowers;i++)
            {
            fitTemperature[i]=temperature[tb_Rnd(0,kMaxFlowers - 1)];
            fitWater[i]=water[tb_Rnd(0,kMaxFlowers - 1)];
            fitSunlight[i]=sunlight[tb_Rnd(0,kMaxFlowers - 1)];
            fitNutrient[i]=nutrient[tb_Rnd(0,kMaxFlowers - 1)];
            fitBeneficialInsect[i]=beneficialInsect[tb_Rnd(0,kMaxFlowers - 1)];
            fitHarmfulInsect[i]=harmfulInsect[tb_Rnd(0,kMaxFlowers - 1)];
            }

            for (i=0;i<kMaxFlowers;i++)
            {
            temperature[i]=fitTemperature[i];
            water[i]=fitWater[i];
            sunlight[i]=fitSunlight[i];
            nutrient[i]=fitNutrient[i];
            beneficialInsect[i]=fitBeneficialInsect[i];
            harmfulInsect[i]=fitHarmfulInsect[i];
            }

            for (i=0;i<kMaxFlowers;i++)
            {
            if (tb_Rnd(1,100)==1)
            temperature[i]=tb_Rnd(1,75);
            if (tb_Rnd(1,100)==1)
            water[i]=tb_Rnd(1,75);
            if (tb_Rnd(1,100)==1)
            sunlight[i]=tb_Rnd(1,75);
            if (tb_Rnd(1,100)==1)
            nutrient[i]=tb_Rnd(1,75);
            if (tb_Rnd(1,100)==1)
            beneficialInsect[i]=tb_Rnd(1,75);
            if (tb_Rnd(1,100)==1)
            harmfulInsect[i]=tb_Rnd(1,75);
            }

            }
            void ai_World::show()
            {
            // cout << "\t temperature water sunlight nutrient beneficialInsect harmfulInsect\n";
            cout << "current\t " << currentTemperature << "\t " << currentWater << "\t ";
            cout << currentSunlight << "\t " << currentNutrient << "\t ";
            cout << currentBeneficialInsect << "\t " << currentHarmfulInsect << "\n";
            for (int i=0;i<kMaxFlowers;i++)
            {
            cout << "Flower " << i << ": ";
            cout << temperature[i] << "\t ";
            cout << water[i] << "\t ";
            cout << sunlight[i] << "\t ";
            cout << nutrient[i] << "\t ";
            cout << beneficialInsect[i] << "\t ";
            cout << harmfulInsect[i] << "\t ";
            cout << endl;
            }
            }
            #endif // AIWORLD_H_

            //test.cpp
            #include <iostream>
            #include "ai_World.h"

            using namespace std;

            int main()
            {
            ai_World a;
            a.Encode();
            // a.show();
            for (int i = 0; i < 10; i++)
            {
            cout << "Generation " << i << endl;
            a.Evolve();
            a.show();
            }

            system("PAUSE");
            return 0;
            }
            re: boost asio 2:threading pass86 2007-05-25 17:41
            亂碼顯示源代碼
            re: C++模版全掌握(實例) pass86 2007-05-25 17:10
            HAO.
            re: 有一類程序員 pass86 2007-05-22 17:40
            其實每個人不是一生下來就是高手。
            這樣的人我到遇到。
            還是應該虛心學習。
            不知道.a文件做什么的,在boost中看到,偶孤陋寡聞。
            由此看來是庫文件。
            下下來看看,速度太慢。
            VC6.0編譯錯誤:
            console.cpp(72) : fatal error C1010: unexpected end of file while looking for precompiled header directive
            但是用其它IDE能編譯成功,為什么呢?
            這個東西真的挺有用的,DEBUG時用,不用MessageBox那么麻煩了。
            re: 如何實現UI pass86 2007-05-08 13:49
            UI的設計愈來愈重要,它能增強用戶的體驗,但是用過很多軟件後發現,單純的用圖片來做UI并不大吸引人,有點死板。
            Picasa2的UI做的就很好啊,用戶的體驗很好,不知怎么做的,貌似用了OPENGL。
            共2頁: 1 2 
            久久久久亚洲精品无码网址| 久久噜噜电影你懂的| 久久伊人色| 欧美久久久久久| 久久精品国产第一区二区三区| 久久精品毛片免费观看| 久久一本综合| 色综合久久久久久久久五月| 99精品伊人久久久大香线蕉| 精品国产99久久久久久麻豆| 久久综合综合久久97色| 亚洲午夜久久久久妓女影院 | 久久婷婷五月综合国产尤物app| 午夜精品久久久久久99热| 国产香蕉97碰碰久久人人| 国产毛片欧美毛片久久久| 久久国产一片免费观看| 久久精品国产福利国产秒| 色综合久久久久久久久五月| 久久久这里只有精品加勒比| 94久久国产乱子伦精品免费| 久久福利青草精品资源站| 亚洲国产精品高清久久久| 国内精品久久久久影院老司| 久久久久97国产精华液好用吗| 久久精品国产精品亚洲精品| 欧美噜噜久久久XXX| 亚洲午夜无码久久久久| 伊人久久无码中文字幕| 久久狠狠爱亚洲综合影院| 久久精品一区二区三区中文字幕| 久久这里只有精品久久| 国产日产久久高清欧美一区| 99久久精品国产麻豆| 成人综合伊人五月婷久久| 97久久久久人妻精品专区| 精品久久久久久久| 婷婷久久综合九色综合98| 国产亚洲美女精品久久久| 久久久久国产视频电影| 思思久久好好热精品国产|