#include <invertmotorspace.h>
Inherits InvertMotorController.
Inheritance diagram for InvertMotorSpace:


Public Member Functions | |
| InvertMotorSpace (int buffersize, double cInit=0.1, bool someInternalParams=true) | |
| 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 | ~InvertMotorSpace () |
| 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 (binary). | |
| virtual bool | restore (FILE *f) |
| loads the controller values from a given file (binary). | |
| virtual std::list< ILayer > | getStructuralLayers () const |
| Specifies which parameter vector forms a structural layer (in terms of a neural network) The ordering is important. | |
| virtual std::list< IConnection > | getStructuralConnections () const |
| Specifies which parameter matrix forms a connection between layers (in terms of a neural network) The orderning is not important. | |
Protected Member Functions | |
| 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 | |
| virtual void | learnController (const matrix::Matrix &x, const matrix::Matrix &x_smooth, int delay) |
| learn h,C, delayed motors y and corresponding sensors x | |
| virtual void | learnModel (const matrix::Matrix &x, const matrix::Matrix &y) |
| learn A, using motors y and corresponding sensors x | |
| virtual matrix::Matrix | calculateControllerValues (const matrix::Matrix &x_smooth) |
| returns controller output for given sensor values | |
Protected Attributes | |
| unsigned short | number_sensors |
| unsigned short | number_motors |
| matrix::Matrix | A |
| matrix::Matrix | C |
| matrix::Matrix | R |
| matrix::Matrix | H |
| matrix::Matrix | B |
| NoiseGenerator * | BNoiseGen |
| matrix::Matrix * | x_buffer |
| matrix::Matrix * | y_buffer |
| matrix::Matrix | x_smooth |
| bool | someInternalParams |
| double | cInit |
Implements standart parameters: eps, rho, mu, stepnumber4avg, stepnumber4delay
| InvertMotorSpace | ( | int | buffersize, | |
| double | cInit = 0.1, |
|||
| bool | someInternalParams = true | |||
| ) |
| ~InvertMotorSpace | ( | ) | [virtual] |
| Matrix calculateControllerValues | ( | const matrix::Matrix & | x_smooth | ) | [protected, virtual] |
returns controller output for given sensor values
| x_smooth | smoothed sensors Matrix(number_channels,1) |
| void fillBuffersAndControl | ( | const sensor * | x_, | |
| int | number_sensors, | |||
| motor * | y_, | |||
| int | number_motors | |||
| ) | [protected] |
puts the sensors in the ringbuffer, generate controller values and put them in the
| 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.
| list< Inspectable::IConnection > getStructuralConnections | ( | ) | const [virtual] |
Specifies which parameter matrix forms a connection between layers (in terms of a neural network) The orderning is not important.
Reimplemented from Inspectable.
| list< Inspectable::ILayer > getStructuralLayers | ( | ) | const [virtual] |
Specifies which parameter vector forms a structural layer (in terms of a neural network) The ordering is important.
The first entry is the input layer and so on.
Reimplemented from Inspectable.
| 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 learnController | ( | const matrix::Matrix & | x, | |
| const matrix::Matrix & | x_smooth, | |||
| int | delay | |||
| ) | [protected, virtual] |
learn h,C, delayed motors y and corresponding sensors x
| void learnModel | ( | const matrix::Matrix & | x, | |
| const matrix::Matrix & | y | |||
| ) | [protected, virtual] |
learn A, using motors y and corresponding sensors x
| bool restore | ( | FILE * | f | ) | [virtual] |
performs one step (includes learning).
Calulates motor commands from sensor inputs.
Implements AbstractController.
performs one step without learning. Calulates motor commands from sensor inputs.
Implements AbstractController.
| bool store | ( | FILE * | f | ) | const [virtual] |
matrix::Matrix A [protected] |
matrix::Matrix B [protected] |
NoiseGenerator* BNoiseGen [protected] |
matrix::Matrix C [protected] |
double cInit [protected] |
matrix::Matrix H [protected] |
unsigned short number_motors [protected] |
unsigned short number_sensors [protected] |
matrix::Matrix R [protected] |
bool someInternalParams [protected] |
matrix::Matrix* x_buffer [protected] |
matrix::Matrix x_smooth [protected] |
matrix::Matrix* y_buffer [protected] |
1.4.7