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

Inheritance diagram for Evonet:

List of all members.

Signals

void evonetUpdated ()
 emitted everytime the Evonet has been updated

Public Member Functions

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
int freeParameters ()
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)
void getParameters (const int *dt)
float getWrange ()
void injectHidden (int nh, float val)
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 printBlocks ()
void printIO ()
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 setRanges (double weight, double bias, double gain)
void updateNet ()

Static Public Member Functions

static void describe (QString type)
 Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.

Public Attributes

QColor neurondcolor [MAXN]
int neurondisplay [MAXN]
char neuronl [MAXN][10]
bool neuronlesion [MAXN]
double neuronlesionVal [MAXN]
double neuronrange [MAXN][2]

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.

Friends

class NetworkDialog
class RendNetwork

Detailed Description

Evonet is the neural network taken from the EvoRobot.

Simple class to load a evorobot.net configuration file

Definition at line 48 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 68 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 205 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 951 of file evonet.cpp.

References Evonet::MAXSTOREDACTIVATIONS.

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 364 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 ParameterSettable.

Definition at line 172 of file evonet.cpp.

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


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 64 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 62 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 60 of file evonet.h.

Referenced by Evonet::getOldestStoredActivations().


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