Evonet is the neural network taken from the EvoRobot. More...

Inheritance diagram for Evonet:

Signals

void evonetUpdated ()
 emitted everytime the Evonet has been updated
 

Public Member Functions

float computeMeanSquaredError (QVector< float > trainingSet, QVector< float > desiredOutput)
 
void computeParameters ()
 
void configure (ConfigurationParameters &params, QString prefix)
 Configures the object using a ConfigurationParameters object.
 
void copyPheParameters (int *pheGene)
 
void create_net_block (int inputNeuronType, int hiddenNeuronType, int outputNeuronType, bool recurrentHiddens, bool inputOutputConnections, bool recurrentOutputs, bool biasOnHidden, bool biasOnOutput)
 create the block structure for a standard architecture create x-y coordinate for network architecture display store in local variable the number of neurons
 
void endTraining ()
 
int exportWeightsToMATLABFile (char *path)
 
int extractWeightsFromNet (Eigen::VectorXf &w)
 
int freeParameters ()
 
float getFreeParameter (int i)
 
float getHidden (int h)
 
float getInput (int in)
 
void getMutations (float *mut)
 
float getNeuron (int in)
 
int getNoHiddens ()
 
int getNoInputs ()
 
int getNoNeurons ()
 
int getNoOutputs ()
 
float * getOldestStoredActivations ()
 Returns the oldest stored activation vector and removes it.
 
float getOutput (int out)
 
int getParamBias (int nbias)
 
ParameterSettableUIgetUIManager ()
 Return a new instance of the EvonetUI.
 
float getWeight (int to, int from)
 
float getWrange ()
 
void hardwire ()
 
int importWeightsFromMATLABFile (char *path)
 
int importWeightsFromVector (Eigen::VectorXf &w)
 
void initWeightsInRange (float min, float max)
 
void initWeightsNguyenWidrow (float min, float max)
 
void injectHidden (int nh, float val)
 
bool inTraining ()
 
int load_net_blocks (const char *filename, int mode)
 load the architecture and the free parameters of a controller mode=0, load only the architecture mode=1, load also the parameters
 
float logistic (float f)
 
bool pheFileLoaded ()
 
void prepareForTraining (QVector< float > &err_w)
 
void printAct ()
 
void printBlocks ()
 
void printIO ()
 
void printWeights ()
 
void readNewPheLine (QStringList, float *, float *)
 
void readOldPheLine (QStringList, float *, float *)
 
void resetNet ()
 
void save (ConfigurationParameters &params, QString prefix)
 Saves the actual status of parameters into the ConfigurationParameters object passed.
 
void save_net_blocks (const char *filename, int mode)
 
int setInput (int inp, float value)
 
void setNeckReflex ()
 
void setParameters (const int *dt)
 
void setRanges (double weight, double bias, double gain)
 
void setWeight (int to, int from, float w)
 
float tansig (float f)
 — STUFF ADDED BY MANLIO FOR LEARNING
 
float trainLevembergMarquardt (QVector< float > trainingSet, QVector< float > desiredOutput, float maxError)
 
float trainLevembergMarquardtThroughTime (QVector< float > trainingSet, QVector< float > desiredOutput, int time, float maxError)
 
int updateCounts ()
 return the number of updates (step) done
 
void updateNet ()
 
- Public Member Functions inherited from ParameterSettableWithConfigureFunction
void addObserver (RuntimeParameterObserver *obs)
 
getRuntimeParameter (QString paramName)
 
 ParameterSettable ()
 
virtual void postConfigureInitialization ()
 
void removeObserver (RuntimeParameterObserver *obs)
 
void setRuntimeParameter (QString paramName, T newvalue)
 
QString typeName () const
 
- Public Member Functions inherited from ParameterSettable
void addObserver (RuntimeParameterObserver *obs)
 
getRuntimeParameter (QString paramName)
 
void removeObserver (RuntimeParameterObserver *obs)
 
void setRuntimeParameter (QString paramName, T newvalue)
 
QString typeName () const
 

Static Public Member Functions

static void describe (QString type)
 Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
 
- Static Public Member Functions inherited from ParameterSettableWithConfigureFunction
static void describe (QString type)
 
static QString fullParameterDescriptionPath (QString type, QString param)
 
static QString fullSubgroupDescriptionPath (QString type, QString sub)
 
- Static Public Member Functions inherited from ParameterSettable
static void describe (QString type)
 
static QString fullParameterDescriptionPath (QString type, QString param)
 
static QString fullSubgroupDescriptionPath (QString type, QString sub)
 

Public Attributes

int maxIterations
 
QColor neurondcolor [MAXN]
 
int neurondisplay [MAXN]
 
char neuronl [MAXN][10]
 
bool neuronlesion [MAXN]
 
int neuronlesions
 
float neuronlesionVal [MAXN]
 
double neuronrange [MAXN][2]
 
int nselected
 
float ** selectedp
 
- Public Attributes inherited from ParameterSettableWithConfigureFunction
 AllowMultiple
 
 Default
 
 IsList
 
 IsMandatory
 
- Public Attributes inherited from ParameterSettable
 AllowMultiple
 
 Default
 
 IsList
 
 IsMandatory
 

Static Public Attributes

static const float DEFAULT_VALUE = -99.0f
 DEFAULT_VALUE is used for do not assign values to mut and parameters.
 
static const int MAXN = 1000
 Maximum number of neurons for a neural network of this type.
 
static const int MAXSTOREDACTIVATIONS = 100
 The maximum number of stored activation vectors.
 
- Static Public Attributes inherited from ParameterSettableWithConfigureFunction
static const double Infinity
 
static const int MaxInteger
 
static const int MinInteger
 
- Static Public Attributes inherited from ParameterSettable
static const double Infinity
 
static const int MaxInteger
 
static const int MinInteger
 

Friends

class NetworkDialog
 
class RendNetwork
 

Additional Inherited Members

- Public Types inherited from ParameterSettableWithConfigureFunction
enum  Property
 
- Protected Member Functions inherited from ParameterSettableWithConfigureFunction
void notifyChangesToParam (QString paramName)
 
- Static Protected Member Functions inherited from ParameterSettableWithConfigureFunction
static Descriptor addTypeDescription (QString type, QString shortHelp, QString longHelp=QString(""))
 
static void setGraphicalEditor (QString type)
 

Detailed Description

Evonet is the neural network taken from the EvoRobot.

Simple class to load a evorobot.net configuration file

Definition at line 70 of file evonet.h.

Member Function Documentation

void configure ( ConfigurationParameters params,
QString  prefix 
)
virtual

Configures the object using a ConfigurationParameters object.

Parameters
paramsthe configuration parameters object with parameters to use
prefixthe prefix to use to access the object configuration parameters. This is guaranteed to end with the separator character when called by the factory, so you don't need to add one

Implements ParameterSettableWithConfigureFunction.

Definition at line 85 of file evonet.cpp.

References Evonet::create_net_block(), Evonet::DEFAULT_VALUE, Logger::error(), ConfigurationHelper::getBool(), ConfigurationHelper::getDouble(), ConfigurationHelper::getInt(), ConfigurationHelper::getString(), Evonet::load_net_blocks(), Evonet::MAXN, and ConfigurationHelper::throwUserConfigError().

void create_net_block ( int  inputNeuronType,
int  hiddenNeuronType,
int  outputNeuronType,
bool  recurrentHiddens,
bool  inputOutputConnections,
bool  recurrentOutputs,
bool  biasOnHidden,
bool  biasOnOutput 
)

create the block structure for a standard architecture create x-y coordinate for network architecture display store in local variable the number of neurons

Definition at line 239 of file evonet.cpp.

Referenced by Evonet::configure().

void evonetUpdated ( )
signal

emitted everytime the Evonet has been updated

Note
connect this signal to all necessary slots for updating the graphics stuff
float * getOldestStoredActivations ( )

Returns the oldest stored activation vector and removes it.

This returns the oldest activation vector and deletes it (memory is not freed, simply an internal index is incremented), so that subsequent calls will progressively return newer activation vectors. Returns NULL when no activation vector is stored

Returns
the oldest stored activation or NULL if no stored activation vector is present

Definition at line 1037 of file evonet.cpp.

References Evonet::MAXSTOREDACTIVATIONS.

ParameterSettableUI * getUIManager ( )
virtual

Return a new instance of the EvonetUI.

Reimplemented from ParameterSettableWithConfigureFunction.

Definition at line 235 of file evonet.cpp.

int load_net_blocks ( const char *  filename,
int  mode 
)

load the architecture and the free parameters of a controller mode=0, load only the architecture mode=1, load also the parameters

Definition at line 406 of file evonet.cpp.

References Logger::error(), Logger::info(), Evonet::MAXN, and Logger::warning().

Referenced by Evonet::configure().

void save ( ConfigurationParameters params,
QString  prefix 
)
virtual

Saves the actual status of parameters into the ConfigurationParameters object passed.

Parameters
paramsthe configuration parameters object on which save actual parameters
prefixthe prefix to use to access the object configuration parameters.

Implements ParameterSettableWithConfigureFunction.

Definition at line 202 of file evonet.cpp.

References ConfigurationParameters::createParameter(), and ConfigurationParameters::startObjectParameters().

float tansig ( float  f)

— STUFF ADDED BY MANLIO FOR LEARNING

Definition at line 660 of file evonet.cpp.

int updateCounts ( )

return the number of updates (step) done

The counter is resetted to zero when the Evonet is resetted (Evonet::resetNet) and is incremented by one at each call of Evonet::updateNet

Definition at line 1048 of file evonet.cpp.

Member Data Documentation

const float DEFAULT_VALUE = -99.0f
static

DEFAULT_VALUE is used for do not assign values to mut and parameters.

Definition at line 86 of file evonet.h.

Referenced by TestRandom::buildRandomDNA(), Evonet::configure(), and Evoga::postConfigureInitialization().

const int MAXN = 1000
static

Maximum number of neurons for a neural network of this type.

Definition at line 84 of file evonet.h.

Referenced by Evonet::configure(), Evonet::describe(), and Evonet::load_net_blocks().

const int MAXSTOREDACTIVATIONS = 100
static

The maximum number of stored activation vectors.

Definition at line 82 of file evonet.h.

Referenced by Evonet::getOldestStoredActivations().


The documentation for this class was generated from the following files: