19 #ifndef __FFNNCONTROLLER_H
20 #define __FFNNCONTROLLER_H
26 #include <selforg/matrix.h>
27 #include <selforg/multilayerffnn.h>
51 virtual void init(
int sensornumber,
int motornumber,
RandGen* randGen = 0);
69 virtual bool store(FILE* f)
const;
Matrix type.
Definition: matrix.h:65
Abstract class for robot controller (with some basic functionality).
Definition: abstractcontroller.h:46
unsigned short history
Definition: ffnncontroller.h:92
charArray paramkey
Definition: avrtypes.h:36
virtual int getMotorNumber() const
returns the mumber of motors the controller was initialised with or 0 if not initialised ...
Definition: ffnncontroller.h:58
double sensor
Definition: types.h:29
random generator with 48bit integer arithmentic
Definition: randomgenerator.h:34
virtual std::list< iparamval > getInternalParams() const
Definition: ffnncontroller.h:75
matrix::Matrix x_smooth
Definition: ffnncontroller.h:101
matrix::Matrix * y_buffer
Definition: ffnncontroller.h:100
unsigned short number_sensors
Definition: ffnncontroller.h:91
virtual void stepNoLearning(const sensor *, int number_sensors, motor *, int number_motors)
performs one step without learning.
Definition: ffnncontroller.cpp:65
virtual std::list< iparamkey > getInternalParamNames() const
The list of the names of all internal parameters given by getInternalParams().
Definition: ffnncontroller.h:74
FFNNController(const std::string &networkfilename, int history, bool input_only_x, unsigned int init_wait=0)
Definition: ffnncontroller.cpp:6
unsigned short number_motors
Definition: ffnncontroller.h:90
matrix::Matrix * x_buffer
Definition: ffnncontroller.h:99
virtual void init(int sensornumber, int motornumber, RandGen *randGen=0)
initialisation of the controller with the given sensor/ motornumber Must be called before use...
Definition: ffnncontroller.cpp:35
virtual matrix::Matrix assembleNetworkInputXY(matrix::Matrix *xbuffer, matrix::Matrix *ybuffer) const
Definition: ffnncontroller.cpp:121
bool input_only_x
Definition: ffnncontroller.h:94
virtual ~FFNNController()
Definition: ffnncontroller.cpp:31
unsigned int t
Definition: ffnncontroller.h:96
matrix::Matrix calculateSmoothValues(const matrix::Matrix *buffer, int number_steps_for_averaging_) const
calculate time-smoothed values
Definition: ffnncontroller.cpp:107
virtual matrix::Matrix assembleNetworkInputX(matrix::Matrix *xbuffer, matrix::Matrix *ybuffer) const
Definition: ffnncontroller.cpp:130
double motor
Definition: types.h:30
virtual matrix::Matrix assembleNetworkOutput(const matrix::Matrix &output) const
Definition: ffnncontroller.cpp:139
virtual bool store(FILE *f) const
stores the controller values to a given file (binary).
Definition: ffnncontroller.cpp:144
unsigned int init_wait
Definition: ffnncontroller.h:97
multi layer neural network with configurable activation functions
Definition: multilayerffnn.h:35
MultiLayerFFNN * net
Definition: ffnncontroller.h:103
int s4avg
Definition: ffnncontroller.h:95
virtual void step(const sensor *, int number_sensors, motor *, int number_motors)
performs one step (includes learning).
Definition: ffnncontroller.cpp:61
bool initialised
Definition: ffnncontroller.h:104
unsigned short buffersize
Definition: ffnncontroller.h:93
void notifyOnChange(const paramkey &key)
Is called when a parameter was changes via setParam().
Definition: ffnncontroller.cpp:153
class for robot controller with a fixed neural network
Definition: ffnncontroller.h:32
virtual bool restore(FILE *f)
loads the controller values from a given file (binary).
Definition: ffnncontroller.cpp:148
virtual int getSensorNumber() const
returns the number of sensors the controller was initialised with or 0 if not initialised ...
Definition: ffnncontroller.h:56
void putInBuffer(matrix::Matrix *buffer, const matrix::Matrix &vec, int delay=0)
Definition: ffnncontroller.cpp:102