SoML Class Reference

This controller implements the homeokinetic learning algorihm in sensor space with extended controller network. More...

#include <soml.h>

Inherits AbstractController.

Collaboration diagram for SoML:
Collaboration graph
[legend]

List of all members.

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 ControllerNetgetCNet ()
 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
ControllerNetcNet
 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

Detailed Description

This controller implements the homeokinetic learning algorihm in sensor space with extended controller network.


Constructor & Destructor Documentation

SoML ( const SoMLConf conf = getDefaultConf()  ) 
~SoML (  )  [virtual]

Member Function Documentation

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.

void step ( const sensor x_,
int  number_sensors,
motor y_,
int  number_motors 
) [virtual]

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.


Member Data Documentation

paramval biasnoise [protected]
const unsigned short buffersize = 10 [static, protected]
ControllerNet* cNet [protected]

Controller network.

SoMLConf conf [protected]

configuration object

paramval creativity [protected]
paramval dampA [protected]
paramval discountS [protected]

discount for S part of the model

double E [protected]
paramval epsA [protected]
paramval epsC [protected]
matrix::Matrix eta_avg [protected]
paramval harmony [protected]

harmony

parambool loga [protected]

# use logarithmic error

unsigned short number_motors [protected]
unsigned short number_sensors [protected]
unsigned int numControllerLayer [protected]

number of controller layer

paramint s4avg [protected]

# of steps the sensors are averaged (1 means no averaging)

paramint s4delay [protected]

# of steps the motor values are delayed (1 means no delay)

int t [protected]
matrix::Matrix x [protected]

buffer needed for delay

matrix::Matrix x_smooth [protected]

buffer needed for delay


The documentation for this class was generated from the following files:
Generated on Thu Jun 28 14:48:18 2012 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3