This controller implements the homeokinetic learning algorihm in sensor space with extended controller network. More...
#include <soml.h>
Inherits AbstractController.

Public Member Functions | |
| SoML (const SoMLConf &conf=getDefaultConf()) | |
| virtual void | init (int sensornumber, int motornumber, RandGen *randGen=0) |
| initialisation of the controller with the given sensor/ motornumber Must be called before use. | |
| virtual | ~SoML () |
| virtual int | getSensorNumber () const |
| returns the number of sensors the controller was initialised with or 0 if not initialised | |
| virtual int | getMotorNumber () const |
| returns the mumber of motors the controller was initialised with or 0 if not initialised | |
| virtual void | step (const sensor *, int number_sensors, motor *, int number_motors) |
| performs one step (includes learning). | |
| virtual void | stepNoLearning (const sensor *, int number_sensors, motor *, int number_motors) |
| performs one step without learning. Calulates motor commands from sensor inputs. | |
| virtual void | motorBabblingStep (const sensor *, int number_sensors, const motor *, int number_motors) |
| called in motor babbling phase. | |
| virtual bool | store (FILE *f) const |
| stores the controller values to a given file. | |
| virtual bool | restore (FILE *f) |
| loads the controller values from a given file. | |
| virtual ControllerNet * | getCNet () |
| returns controller network (to be added to inspectables of agent) | |
Static Public Member Functions | |
| static SoMLConf | getDefaultConf () |
Protected Member Functions | |
| void | control (const matrix::Matrix &x, motor *y_, int number_motors) |
| performs control step (activates network and stores results in buffer and y_) | |
| 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 (or earlier in case of delay)) | |
| virtual void | learnModelBP (double factor) |
Protected Attributes | |
| unsigned short | number_sensors |
| unsigned short | number_motors |
| matrix::Matrix | y_buffer [buffersize] |
| buffer needed for delay | |
| matrix::Matrix | x_buffer [buffersize] |
| buffer needed for delay | |
| ControllerNet * | cNet |
| Controller network. | |
| unsigned int | numControllerLayer |
| number of controller layer | |
| SoMLConf | conf |
| configuration object | |
| matrix::Matrix | x |
| matrix::Matrix | x_smooth |
| matrix::Matrix | eta_avg |
| int | t |
| double | E |
| paramval | creativity |
| paramval | epsC |
| paramval | epsA |
| paramval | harmony |
| harmony | |
| paramval | dampA |
| paramval | discountS |
| discount for S part of the model | |
| paramint | s4avg |
| # of steps the sensors are averaged (1 means no averaging) | |
| paramint | s4delay |
| # of steps the motor values are delayed (1 means no delay) | |
| paramval | biasnoise |
| parambool | loga |
| # use logarithmic error | |
Static Protected Attributes | |
| static const unsigned short | buffersize = 10 |
This controller implements the homeokinetic learning algorihm in sensor space with extended controller network.
| ~SoML | ( | ) | [virtual] |
| void control | ( | const matrix::Matrix & | x, | |
| motor * | y_, | |||
| int | number_motors | |||
| ) | [protected] |
performs control step (activates network and stores results in buffer and y_)
| ControllerNet * getCNet | ( | ) | [virtual] |
returns controller network (to be added to inspectables of agent)
| static SoMLConf getDefaultConf | ( | ) | [inline, static] |
| virtual int getMotorNumber | ( | ) | const [inline, virtual] |
returns the mumber of motors the controller was initialised with or 0 if not initialised
Implements AbstractController.
| virtual int getSensorNumber | ( | ) | const [inline, virtual] |
returns the number of sensors the controller was initialised with or 0 if not initialised
Implements AbstractController.
| void init | ( | int | sensornumber, | |
| int | motornumber, | |||
| RandGen * | randGen = 0 | |||
| ) | [virtual] |
initialisation of the controller with the given sensor/ motornumber Must be called before use.
The random generator is optional.
Implements AbstractController.
| void learn | ( | const matrix::Matrix & | x, | |
| const matrix::Matrix & | y | |||
| ) | [protected, virtual] |
learn values model and controller network using the current sensors x, the commands y (from last step (or earlier in case of delay))
| void learnModelBP | ( | double | factor | ) | [protected, virtual] |
| void motorBabblingStep | ( | const sensor * | , | |
| int | number_sensors, | |||
| const motor * | , | |||
| int | number_motors | |||
| ) | [virtual] |
called in motor babbling phase.
the motor values are given (by babbling controller) and this controller can learn the basic relations from observed sensors/motors
Reimplemented from AbstractController.
| bool restore | ( | FILE * | f | ) | [virtual] |
loads the controller values from a given file.
Implements Storeable.
performs one step (includes learning).
performs one step (includes learning). Calulates motor commands from sensor inputs.
Calulates motor commands from sensor inputs.
Implements AbstractController.
| void stepNoLearning | ( | const sensor * | x_, | |
| int | number_sensors, | |||
| motor * | y_, | |||
| int | number_motors | |||
| ) | [virtual] |
performs one step without learning. Calulates motor commands from sensor inputs.
Implements AbstractController.
| bool store | ( | FILE * | f | ) | const [virtual] |
stores the controller values to a given file.
Implements Storeable.
const unsigned short buffersize = 10 [static, protected] |
ControllerNet* cNet [protected] |
Controller network.
paramval creativity [protected] |
double E [protected] |
matrix::Matrix eta_avg [protected] |
unsigned short number_motors [protected] |
unsigned short number_sensors [protected] |
unsigned int numControllerLayer [protected] |
number of controller layer
int t [protected] |
matrix::Matrix x [protected] |
matrix::Matrix x_buffer[buffersize] [protected] |
buffer needed for delay
matrix::Matrix x_smooth [protected] |
matrix::Matrix y_buffer[buffersize] [protected] |
buffer needed for delay
1.6.3