Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

anngenes.h

Go to the documentation of this file.
00001 
00025 /*******************************************************************************
00026    Strategiassa henkisen suuntasi ei tule olla erilainen
00027    normaalista. Sekä taistelussa että jokapäiväisessä elämässä sinun
00028    tulisi olla päättäväinen vaikkakin tyyni. Kohtaa tilanne ilman
00029    jännittyneisyyttä, ei kuitenkaan kärsimättömästi, henkesi ollessa
00030    asettunut muttei herpaantunut. Edes kun henkesi on tyyni älä anna
00031    ruumiisi rentoutua, ja kun ruumiisi on rentoutunut, älä anna
00032    henkesi herpaantua. Älä anna ruumiisi vaikuttaa henkeesi.  Älä ole
00033    alihenkinen äläkä ylihenkinen. Ylennetty henki on heikko ja
00034    alhainen henki on heikko. Älä anna vihollisesi nähdä henkeäsi.
00035 
00036    Pienten ihmisten täytyy tuntea täydellisesti isojen ihmisten henki
00037    ja isojen ihmisten täytyy tuntea pienikokoisten ihmisten
00038    henki. Mikä hyvänsä on kokosi, älä anna oman ruumiisi reaktioiden
00039    hämätä sinua.
00040 **/
00041 
00042 #ifndef __ANNALEE_ANNGENES_H__
00043 #define __ANNALEE_ANNGENES_H__
00044 
00045 #include <nhp/genetics.h>
00046 #include <nhp/genes.h>
00047 #include <magic/mpackarray.h>
00048 
00049 // Externals
00050 class PatternSet;
00051 
00052 // An active gene is the best gene
00053 
00054 
00055 
00057 //                                                                           //
00058 //                   _   |   | |   |  ----                                   //
00059 //                  / \  |\  | |\  | |      ___    _    ___                  //
00060 //                 /   \ | \ | | \ | | --- /   ) |/ \  /   )                 //
00061 //                 |---| |  \| |  \| |   \ |---  |   | |---                  //
00062 //                 |   | |   | |   | |___/  \__  |   |  \__                  //
00063 //                                                                           //
00065 
00072 class ANNGene : public Gentainer { // Abstract
00073     decl_dynamic (ANNGene);
00074   public:
00075                         ANNGene             (const GeneticID& name=NULL) : Gentainer (name) {;}
00076                         ANNGene             (const ANNGene& orig) : Gentainer (orig) {;}
00077     
00079     virtual void        init                () {Gentainer::init ();}
00081     virtual void        copy                (const Genstruct& other) {Gentainer::copy (other);}
00083     virtual void        addPrivateGenes     (Gentainer& g, const StringMap& params);
00084 };
00085 
00086 
00087 
00089 //                                                                          //
00090 //         _   |   | |   | -----                      | o                   //
00091 //        / \  |\  | |\  | |       _    ___           |     _               //
00092 //       /   \ | \ | | \ | |---  |/ \  |   \  __   ---| | |/ \   ___        //
00093 //       |---| |  \| |  \| |     |   | |     /  \ (   | | |   | (   \       //
00094 //       |   | |   | |   | |____ |   |  \__/ \__/  ---| | |   |  ---/       //
00095 //                                                               __/        //
00097 
00107 class ANNEncoding : public Gentainer { // Abstract
00108   public:
00109     
00110                         ANNEncoding (const GeneticID& name, const StringMap& params);
00111                         ANNEncoding (const ANNEncoding& other);
00112 
00113     // Implementations
00114 
00116     virtual void        copy                (const Genstruct& other);
00118     virtual void        addPrivateGenes     (Gentainer& g, const StringMap& params) {MUST_OVERLOAD}
00120     virtual void        check               () const;
00121     
00122   protected:
00123                         ANNEncoding () {FORBIDDEN}
00124 
00125     int     mInputs, mMaxHidden, mOutputs;
00126     bool    mPrunePassthroughs;
00127     decl_dynamic (ANNEncoding);
00128 };
00129 
00130 
00131 
00132 // Any man who wants to master the essence of my strategy must
00133 // research diligently, training morning and evening. Thus can he
00134 // polish his skill, become free from self, and realise extraordinary
00135 // ability. He will come to possess miraculous power. -- Miyamoto Musashi
00136 
00137 // Macros are the biggest enemy of the objectkind
00138 
00142 class TakeBrainPicsMsg : public GeneticMsg {
00143   public:
00144     TakeBrainPicsMsg (const GeneticID& rcvr, Individual& ind) : GeneticMsg (rcvr, ind) {}
00145 };
00146 
00147 #endif
00148 
00149 
00150 

Generated on Thu Feb 10 20:21:26 2005 for Annalee by doxygen1.2.18