SoxExpand Class Reference

This controller implements the standard algorihm described the Chapter 3 (Homeokinesis) with body expansion via context sensors. More...

#include <soxexpand.h>

Inherits AbstractController.

Collaboration diagram for SoxExpand:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SoxExpand (const SoxExpandConf &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 ~SoxExpand ()
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 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 matrix::Matrix getA ()
virtual void setA (const matrix::Matrix &A)
virtual matrix::Matrix getC ()
virtual void setC (const matrix::Matrix &C)
virtual matrix::Matrix geth ()
virtual void seth (const matrix::Matrix &h)
virtual matrix::Matrix getContextC ()
virtual void setContextC (const matrix::Matrix &CC)

Static Public Member Functions

static SoxExpandConf getDefaultConf ()

Protected Member Functions

virtual void learn ()
 learn values model and controller (A,b,C,h)

Static Protected Member Functions

static double g (double z)
 neuron transfer function
static double g_s (double z)
 derivative of g
static double clip (double r, double x)
 function that clips the second argument to the interval [-first,first]
static double one_over (double x)
 calculates the inverse the argument (useful for Matrix::map)

Protected Attributes

unsigned short number_sensors
unsigned short number_motors
matrix::Matrix A
matrix::Matrix C
matrix::Matrix S
matrix::Matrix h
matrix::Matrix b
matrix::Matrix L
matrix::Matrix AC
matrix::Matrix R
SoxExpandConf conf
matrix::Matrix y_buffer [buffersize]
matrix::Matrix x_buffer [buffersize]
matrix::Matrix v_avg
matrix::Matrix x
matrix::Matrix x_c
matrix::Matrix x_smooth
int t
bool TLE
bool loga
paramval creativity
paramval sense
paramval harmony
paramval causeaware
paramval epsC
paramval epsA
paramint s4avg
paramint s4delay

Static Protected Attributes

static const unsigned short buffersize = 10

Detailed Description

This controller implements the standard algorihm described the Chapter 3 (Homeokinesis) with body expansion via context sensors.


Constructor & Destructor Documentation

SoxExpand ( const SoxExpandConf conf = getDefaultConf()  ) 
~SoxExpand (  )  [virtual]

Member Function Documentation

static double clip ( double  r,
double  x 
) [inline, static, protected]

function that clips the second argument to the interval [-first,first]

static double g ( double  z  )  [inline, static, protected]

neuron transfer function

static double g_s ( double  z  )  [inline, static, protected]

derivative of g

matrix::Matrix getA (  )  [virtual]
matrix::Matrix getC (  )  [virtual]
matrix::Matrix getContextC (  )  [virtual]
static SoxExpandConf getDefaultConf (  )  [inline, static]
matrix::Matrix geth (  )  [virtual]
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 (  )  [protected, virtual]

learn values model and controller (A,b,C,h)

static double one_over ( double  x  )  [inline, static, protected]

calculates the inverse the argument (useful for Matrix::map)

bool restore ( FILE *  f  )  [virtual]

loads the controller values from a given file.

Implements Storeable.

void setA ( const matrix::Matrix A  )  [virtual]
void setC ( const matrix::Matrix C  )  [virtual]
void setContextC ( const matrix::Matrix CC  )  [virtual]
void seth ( const matrix::Matrix h  )  [virtual]
void step ( const sensor x_,
int  number_sensors,
motor y_,
int  number_motors 
) [virtual]

performs one step (includes learning).

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

matrix::Matrix A [protected]
matrix::Matrix AC [protected]
matrix::Matrix b [protected]
const unsigned short buffersize = 10 [static, protected]
matrix::Matrix C [protected]
paramval causeaware [protected]
SoxExpandConf conf [protected]
paramval creativity [protected]
paramval epsA [protected]
paramval epsC [protected]
matrix::Matrix h [protected]
paramval harmony [protected]
matrix::Matrix L [protected]
bool loga [protected]
unsigned short number_motors [protected]
unsigned short number_sensors [protected]
matrix::Matrix R [protected]
matrix::Matrix S [protected]
paramint s4avg [protected]
paramint s4delay [protected]
paramval sense [protected]
int t [protected]
bool TLE [protected]
matrix::Matrix v_avg [protected]
matrix::Matrix x [protected]
matrix::Matrix x_c [protected]
matrix::Matrix x_smooth [protected]

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