00001 #ifndef EvalOp_h
00002 #define EvalOp_h
00003
00004
00005 class EvalOp : public EvaluateOp
00006 {
00007 public:
00008 FitnessP evaluate(IndividualP individual);
00009 bool initialize(StateP);
00010 void registerParameters(StateP);
00011
00012 StateP state_;
00013 };
00014 typedef boost::shared_ptr<EvalOp> EvalOpP;
00015
00016
00017
00018
00019 class Neuron
00020 {
00021 public:
00022 double weight[3][3];
00023 double potential;
00024 double fireProbability;
00025 double state, previousState;
00026 };
00027
00028
00029
00030 class Network
00031 {
00032 public:
00033
00034 std::vector< std::vector<Neuron> > neurons;
00035 uint netSize;
00036 uint nEvaluations;
00037
00038
00039 Tree::Tree* learningTree;
00040 double newError, oldError, minError;
00041
00042
00043 Network();
00044 void initialize(StateP);
00045 double learnNumberOfIterations();
00046 double calculateError();
00047
00048
00049 bool ifBetter()
00050 {
00051 if(newError < oldError)
00052 return true;
00053 return false;
00054 }
00055 };
00056
00057 #endif