19 #ifndef __DERBIGCONTROLLER_H
20 #define __DERBIGCONTROLLER_H
58 virtual void init(
int sensornumber,
int motornumber,
RandGen* randGen = 0);
78 virtual bool store(FILE* f)
const;
int fantControl
interval length for fantasising
Definition: derbigcontroller.h:163
Matrix type.
Definition: matrix.h:65
int managementInterval
interval between subsequent management function calls
Definition: derbigcontroller.h:168
abstract class (interface) for invertable models.
Definition: invertablemodel.h:33
matrix::Matrix B
Model Bias.
Definition: derbigcontroller.h:135
std::list< IConnection > iconnectionlist
Definition: inspectable.h:88
virtual void step(const sensor *, int number_sensors, motor *, int number_motors)
performs one step (includes learning).
Definition: derbigcontroller.cpp:140
bool useTeaching
flag whether there is an actual teachning signal or not
Definition: derbigcontroller.h:160
paramval limitRF
(int) receptive field of motor neurons (number of offcenter sensors) if null then no limitation...
Definition: derbigcontroller.h:171
matrix::Matrix RRT_inv
Definition: derbigcontroller.h:139
static DerBigControllerConf getDefaultConf()
Definition: derbigcontroller.h:106
virtual iparamkeylist getInternalParamNames() const
The list of the names of all internal parameters given by getInternalParams().
Definition: derbigcontroller.cpp:525
matrix::Matrix * eta_buffer
Definition: derbigcontroller.h:150
virtual void notifyOnChange(const paramkey &key)
Is called when a parameter was changes via setParam().
Definition: derbigcontroller.cpp:517
matrix::Matrix x_smooth
Definition: derbigcontroller.h:154
matrix::Matrix v_smooth
Definition: derbigcontroller.h:152
virtual ~DerBigController()
Definition: derbigcontroller.cpp:56
virtual void setMotorTeachingSignal(const motor *teaching, int len)
The given motor teaching signal is used for this timestep.
Definition: derbigcontroller.cpp:600
matrix::Matrix Dinverse
Inverse Noise Matrix.
Definition: derbigcontroller.h:133
int fantReset
number of fantasy control events before reseting internal state
Definition: derbigcontroller.h:165
charArray paramkey
Definition: avrtypes.h:36
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: derbigcontroller.cpp:68
matrix::Matrix H
Controller Bias.
Definition: derbigcontroller.h:134
void getLastMotors(motor *motors, int len)
Definition: derbigcontroller.cpp:433
matrix::Matrix Rm1
R^-1.
Definition: derbigcontroller.h:141
matrix::Matrix x_smooth_long
Definition: derbigcontroller.h:157
unsigned short number_sensors
Definition: derbigcontroller.h:124
paramval dampS
damping of S matrix
Definition: derbigcontroller.h:172
double sensor
Definition: types.h:29
int buffersize
buffersize size of the time-buffer for x,y,eta
Definition: derbigcontroller.h:32
double xsi_norm
norm of matrix
Definition: derbigcontroller.h:145
random generator with 48bit integer arithmentic
Definition: randomgenerator.h:34
matrix::Matrix xsi
current output error
Definition: derbigcontroller.h:144
bool useFantasy
if true fantasising is enabled
Definition: derbigcontroller.h:40
virtual void learnController(int delay)
learn values H,C This is the implementation uses a better formula for g^-1 using Mittelwertsatz ...
Definition: derbigcontroller.cpp:201
matrix::Matrix calcDerivatives(const matrix::Matrix *buffer, int delay)
Calculates first and second derivative and returns both in on matrix (above).
Definition: derbigcontroller.cpp:438
matrix::Matrix A
Model Matrix (motors to sensors)
Definition: derbigcontroller.h:127
matrix::Matrix GSC
G_Prime times Controller Matrix.
Definition: derbigcontroller.h:131
double modelCompliant
learning factor for model (or sensor) compliant learning
Definition: derbigcontroller.h:39
virtual bool store(FILE *f) const
stores the controller values to a given file.
Definition: derbigcontroller.cpp:494
DerBigController(const DerBigControllerConf &conf=getDefaultConf())
Definition: derbigcontroller.cpp:29
bool modelInit
size of the unit-map strenght of the model
Definition: derbigcontroller.h:35
NoiseGenerator * YNoiseGen
Noisegenerator for noisy motor values.
Definition: derbigcontroller.h:137
virtual void stepNoLearning(const sensor *, int number_sensors, motor *, int number_motors)
performs one step without learning. Calulates motor commands from sensor inputs.
Definition: derbigcontroller.cpp:160
matrix::Matrix R
C*A.
Definition: derbigcontroller.h:138
double cNonDiag
cNonDiag is the size of the nondiagonal elements in respect to the diagonal (cInit) ones ...
Definition: derbigcontroller.h:34
double sensor
Definition: abstractcontroller.h:48
InvertableModel * model
model used as world model
Definition: derbigcontroller.h:42
virtual void learnModel(int delay)
learn conf.model, (and S) using motors y and corresponding sensors x
Definition: derbigcontroller.cpp:392
int t_rand
initial random time to avoid syncronous management of all controllers
Definition: derbigcontroller.h:167
double paramval
Definition: configurable.h:88
Extended HomeokinBase class (still abstract) for robot controller work in motorspace and use possibly...
Definition: invertmotorcontroller.h:36
paramval dampH
damping of H vector
Definition: derbigcontroller.h:174
matrix::Matrix * x_buffer
Definition: derbigcontroller.h:148
bool someInternalParams
someInternalParams if true only some internal parameters are exported, otherwise all ...
Definition: derbigcontroller.h:37
virtual void setSensorTeachingSignal(const sensor *teaching, int len)
The given sensor teaching signal (distal learning) is used for this timestep.
Definition: derbigcontroller.cpp:607
paramval inhibition
inhibition strength for sparce kwta strategy (is scaled with epsC)
Definition: derbigcontroller.h:169
virtual bool restore(FILE *f)
loads the controller values from a given file.
Definition: derbigcontroller.cpp:505
double xsi_norm_avg
average norm of xsi (used to define whether Modell learns)
Definition: derbigcontroller.h:146
bool useS
useS decides whether to use the S matrix in addition to the A matrix
Definition: derbigcontroller.h:36
virtual void fillBuffersAndControl(const sensor *x_, int number_sensors, motor *y_, int number_motors)
puts the sensors in the ringbuffer, generate controller values and put them in the ...
Definition: derbigcontroller.cpp:167
matrix::Matrix x_intern
fantasy sensor values
Definition: derbigcontroller.h:162
DerBigControllerConf conf
Definition: derbigcontroller.h:177
paramval weighting
general weighting fator between update concepts
Definition: derbigcontroller.h:175
paramval kwta
(int) number of synapses that get strengthend
Definition: derbigcontroller.h:170
int fantControlLen
length of fantasy control
Definition: derbigcontroller.h:164
matrix::Matrix C
Controller Matrix.
Definition: derbigcontroller.h:130
matrix::Matrix DD
Noise Matrix.
Definition: derbigcontroller.h:132
double cInit
cInit size of the C matrix to initialised with.
Definition: derbigcontroller.h:33
virtual void management()
handles inhibition damping etc.
Definition: derbigcontroller.cpp:445
double motor
Definition: types.h:30
NoiseGenerator * BNoiseGen
Noisegenerator for noisy bias.
Definition: derbigcontroller.h:136
unsigned short number_motors
Definition: derbigcontroller.h:125
matrix::Matrix eta_smooth
Definition: derbigcontroller.h:156
struct DerBigControllerConf DerBigControllerConf
matrix::Matrix ID_Sensor
identity matrix in the dimension of sensor space
Definition: derbigcontroller.h:143
virtual iconnectionlist getStructuralConnections() const
Specifies which parameter matrix forms a connection between layers (in terms of a neural network) The...
Definition: derbigcontroller.cpp:589
virtual int getSensorNumber() const
returns the number of sensors the controller was initialised with or 0 if not initialised ...
Definition: derbigcontroller.h:63
matrix::Matrix y_smooth
Definition: derbigcontroller.h:155
matrix::Matrix * y_buffer
Definition: derbigcontroller.h:149
void kwtaInhibition(matrix::Matrix &weightmatrix, unsigned int k, double damping)
k-winner take all inhibition for synapses.
Definition: derbigcontroller.cpp:463
matrix::Matrix ATA_inv
Definition: derbigcontroller.h:140
class for robot controller is based on InvertMotorNStep
Definition: derbigcontroller.h:54
matrix::Matrix ID
identity matrix in the dimension of R
Definition: derbigcontroller.h:142
virtual iparamvallist getInternalParams() const
Definition: derbigcontroller.cpp:553
double pain
if the modelling error (xsi) is too high we have a pain signal
Definition: derbigcontroller.h:147
double motor
Definition: abstractcontroller.h:49
virtual int getMotorNumber() const
returns the mumber of motors the controller was initialised with or 0 if not initialised ...
Definition: derbigcontroller.h:65
std::list< ILayer > ilayerlist
Definition: inspectable.h:87
virtual double calcMatrixNorm(const matrix::Matrix &m)
calculates the city block distance (abs) norm of the matrix. (abs sum of absolutes / size of matrix) ...
Definition: derbigcontroller.cpp:616
Definition: derbigcontroller.h:31
std::list< iparamkey > iparamkeylist
Definition: inspectable.h:59
std::list< iparamval > iparamvallist
Definition: inspectable.h:61
paramval dampC
damping of C matrix
Definition: derbigcontroller.h:173
matrix::Matrix S
additional Model Matrix (sensors to sensors)
Definition: derbigcontroller.h:129
matrix::Matrix zero_eta
Definition: derbigcontroller.h:153
virtual matrix::Matrix calculateControllerValues(const matrix::Matrix &x_smooth)
returns controller output for given sensor values
Definition: derbigcontroller.cpp:426
void limitC(matrix::Matrix &weightmatrix, unsigned int rfSize)
sets all connections to zero which are further away then rfSize.
Definition: derbigcontroller.cpp:482
virtual ilayerlist getStructuralLayers() const
Specifies which parameter vector forms a structural layer (in terms of a neural network) The ordering...
Definition: derbigcontroller.cpp:581
matrix::Matrix y_teaching
teaching motor signal
Definition: derbigcontroller.h:159
matrix::Matrix eta
Definition: derbigcontroller.h:151
matrix::Matrix A_Hat
Model Matrix (motors to sensors) with input shift.
Definition: derbigcontroller.h:128
int c
Definition: hexapod.cpp:56
Interface and basic class for noise generator.
Definition: noisegenerator.h:37