22 #include <selforg/abstractcontroller.h>
23 #include <selforg/controller_misc.h>
24 #include <selforg/controllernet.h>
29 #include <selforg/matrix.h>
66 virtual void init(
int sensornumber,
int motornumber,
RandGen* randGen = 0);
90 virtual bool store(FILE* f)
const;
Matrix type.
Definition: matrix.h:65
This controller implements the homeokinetic learning algorihm in sensor space with extended controlle...
Definition: soml.h:49
bool parambool
Definition: configurable.h:93
void control(const matrix::Matrix &x, motor *y_, int number_motors)
performs control step (activates network and stores results in buffer and y_)
Definition: soml.cpp:153
paramval dampA
Definition: soml.h:132
matrix::Matrix x_buffer[buffersize]
buffer needed for delay
Definition: soml.h:116
Abstract class for robot controller (with some basic functionality).
Definition: abstractcontroller.h:46
virtual ControllerNet * getCNet()
returns controller network (to be added to inspectables of agent)
Definition: soml.cpp:48
bool useHiddenContr
use a hidden layer in the controller network?
Definition: soml.h:33
paramval discountS
discount for S part of the model
Definition: soml.h:133
virtual ~SoML()
Definition: soml.cpp:44
virtual bool store(FILE *f) const
stores the controller values to a given file.
Definition: soml.cpp:282
double sensor
Definition: types.h:29
random generator with 48bit integer arithmentic
Definition: randomgenerator.h:34
unsigned short number_motors
Definition: soml.h:112
virtual void motorBabblingStep(const sensor *, int number_sensors, const motor *, int number_motors)
called in motor babbling phase.
Definition: soml.cpp:248
virtual void step(const sensor *, int number_sensors, motor *, int number_motors)
performs one step (includes learning).
Definition: soml.cpp:119
bool initUnitMatrix
Definition: soml.h:40
double hiddenModelUnitsRatio
ratio of motor units and hidden units in the model (2 -> double amount of hidden unit) ...
Definition: soml.h:38
int t
Definition: soml.h:125
double paramval
Definition: configurable.h:88
static SoMLConf getDefaultConf()
Definition: soml.h:54
bool useHiddenModel
use a hiddenlayer in the model network?
Definition: soml.h:36
paramval harmony
harmony
Definition: soml.h:131
matrix::Matrix y_buffer[buffersize]
buffer needed for delay
Definition: soml.h:115
matrix::Matrix x
Definition: soml.h:122
virtual int getSensorNumber() const
returns the number of sensors the controller was initialised with or 0 if not initialised ...
Definition: soml.h:71
paramint s4avg
of steps the sensors are averaged (1 means no averaging)
Definition: soml.h:134
ControllerNet * cNet
Controller network.
Definition: soml.h:117
virtual int getMotorNumber() const
returns the mumber of motors the controller was initialised with or 0 if not initialised ...
Definition: soml.h:73
paramval epsA
Definition: soml.h:130
int paramint
Definition: configurable.h:98
matrix::Matrix eta_avg
Definition: soml.h:124
double motor
Definition: types.h:30
unsigned int numControllerLayer
number of controller layer
Definition: soml.h:118
paramval creativity
Definition: soml.h:128
virtual void stepNoLearning(const sensor *, int number_sensors, motor *, int number_motors)
performs one step without learning. Calulates motor commands from sensor inputs.
Definition: soml.cpp:139
virtual bool restore(FILE *f)
loads the controller values from a given file.
Definition: soml.cpp:290
paramint s4delay
of steps the motor values are delayed (1 means no delay)
Definition: soml.h:135
paramval biasnoise
Definition: soml.h:136
bool someInternalParams
if true then the network is initialized with unit matrices
Definition: soml.h:42
paramval epsC
Definition: soml.h:129
double E
Definition: soml.h:126
parambool loga
use logarithmic error
Definition: soml.h:137
double hiddenContrUnitsRatio
ratio of motor units and hidden units in the controller (2 -> double amount of hidden unit) ...
Definition: soml.h:35
matrix::Matrix x_smooth
Definition: soml.h:123
unsigned short number_sensors
Definition: soml.h:111
SoML(const SoMLConf &conf=getDefaultConf())
Definition: soml.cpp:25
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: soml.cpp:53
SoMLConf conf
configuration object
Definition: soml.h:120
static const unsigned short buffersize
Definition: soml.h:113
virtual void learnModelBP(double factor)
Definition: soml.cpp:225
multi layer neural network with configurable activation functions and propagation and projection meth...
Definition: controllernet.h:35
int c
Definition: hexapod.cpp:56
virtual void learn(const matrix::Matrix &x, const matrix::Matrix &y)
learn values model and controller network using the current sensors x, the commands y (from last step...
Definition: soml.cpp:167
bool useS
direct connection from x_t to xp_t+1
Definition: soml.h:39
Configuration object for SoML controller.
Definition: soml.h:32