• <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年5月>
            27282930123
            45678910
            11121314151617
            18192021222324
            25262728293031
            1234567

            常用鏈接

            留言簿(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 
            久久精品亚洲中文字幕无码麻豆| 久久综合狠狠综合久久97色| 精品蜜臀久久久久99网站| 99久久99这里只有免费的精品| 国产高潮国产高潮久久久91 | 97久久久精品综合88久久| 欧美久久综合性欧美| 久久精品国产男包| 欧美久久综合性欧美| 久久久噜噜噜久久中文字幕色伊伊| 久久久久亚洲AV无码麻豆| 亚洲欧洲精品成人久久奇米网 | 欧美伊香蕉久久综合类网站| 亚洲精品tv久久久久久久久久| 九九精品99久久久香蕉| 久久亚洲国产精品123区| WWW婷婷AV久久久影片| 99久久99久久精品国产片果冻| 超级碰久久免费公开视频| 亚洲综合伊人久久大杳蕉| 中文精品99久久国产 | 一级a性色生活片久久无| 精品久久久久久无码中文野结衣 | 午夜精品久久久久久99热| 久久WWW免费人成—看片| 久久99国产精品久久| 少妇内射兰兰久久| 中文精品久久久久人妻不卡| 久久强奷乱码老熟女网站| 久久亚洲国产精品一区二区| 国产精品久久久久9999| 亚洲∧v久久久无码精品| 人妻精品久久久久中文字幕69| 亚洲国产精品18久久久久久| 国产成人精品久久| 日韩久久久久久中文人妻| 无码日韩人妻精品久久蜜桃| 久久精品无码专区免费青青| 国产精品久久久久久搜索| 久久精品无码一区二区三区| 久久国产乱子伦精品免费强|