#include <abstractcontrolleradapter.h>
Inherits AbstractController.
Inherited by AbstractMultiController, DiscreteControllerAdapter, and MeasureAdapter.
Inheritance diagram for AbstractControllerAdapter:


Public Member Functions | |
| AbstractControllerAdapter (AbstractController *controller) | |
| contructor (hint: use $ID$ for revision) | |
| virtual | ~AbstractControllerAdapter () |
| virtual void | init (int sensornumber, int motornumber, RandGen *randGen=0) |
| initialisation of the controller with the given sensor/ motornumber Must NORMALLY be called before use. | |
| virtual int | getSensorNumber () const |
| virtual int | getMotorNumber () const |
| virtual void | step (const sensor *sensors, int sensornumber, motor *motors, int motornumber) |
| performs one step (includes learning). | |
| virtual void | stepNoLearning (const sensor *sensors, int sensornumber, motor *motors, int motornumber) |
| performs one step without learning. | |
| virtual iparamkeylist | getInternalParamNames () const |
| The list of the names of all internal parameters given by getInternalParams(). | |
| virtual iparamvallist | getInternalParams () const |
Protected Attributes | |
| AbstractController * | controller |
| int | sensorNumber |
| int | motorNumber |
The controller gets a number of input sensor values each timestep and has to generate a number of output motor values.
Interface assumes the following usage:
This is an abstract adapter class, it's useful for implementing adapters such as the DescreteController, which can be used with all Controllers.
| AbstractControllerAdapter | ( | AbstractController * | controller | ) | [inline] |
contructor (hint: use $ID$ for revision)
| virtual ~AbstractControllerAdapter | ( | ) | [inline, virtual] |
| virtual iparamkeylist getInternalParamNames | ( | ) | const [inline, virtual] |
The list of the names of all internal parameters given by getInternalParams().
The naming convention is "v[i]" for vectors and "A[i][j]" for matrices, where i, j start at 0.
Reimplemented from Inspectable.
Reimplemented in AbstractMultiController, DiscreteControllerAdapter, MeasureAdapter, and OneActiveMultiPassiveController.
| virtual iparamvallist getInternalParams | ( | ) | const [inline, virtual] |
Reimplemented from Inspectable.
Reimplemented in AbstractMultiController, DiscreteControllerAdapter, MeasureAdapter, and OneActiveMultiPassiveController.
| virtual int getMotorNumber | ( | ) | const [inline, virtual] |
Implements AbstractController.
| virtual int getSensorNumber | ( | ) | const [inline, virtual] |
Implements AbstractController.
| virtual void init | ( | int | sensornumber, | |
| int | motornumber, | |||
| RandGen * | randGen = 0 | |||
| ) | [inline, virtual] |
initialisation of the controller with the given sensor/ motornumber Must NORMALLY be called before use.
For all ControllerAdapters call first AbstractControllerAdapter::init(sensornumber,motornumber) if you overwrite this method
Implements AbstractController.
Reimplemented in AbstractMultiController, DiscreteControllerAdapter, MeasureAdapter, and OneActiveMultiPassiveController.
| virtual void step | ( | const sensor * | sensors, | |
| int | sensornumber, | |||
| motor * | motors, | |||
| int | motornumber | |||
| ) | [inline, virtual] |
performs one step (includes learning).
Calculates motor commands from sensor inputs.
| sensors | sensors inputs scaled to [-1,1] | |
| sensornumber | length of the sensor array | |
| motors | motors outputs. MUST have enough space for motor values! | |
| motornumber | length of the provided motor array |
Implements AbstractController.
Reimplemented in AbstractMultiController, DiscreteControllerAdapter, Discretesizable, MeasureAdapter, and OneActiveMultiPassiveController.
| virtual void stepNoLearning | ( | const sensor * | sensors, | |
| int | sensornumber, | |||
| motor * | motors, | |||
| int | motornumber | |||
| ) | [inline, virtual] |
performs one step without learning.
Implements AbstractController.
Reimplemented in AbstractMultiController, DiscreteControllerAdapter, Discretesizable, MeasureAdapter, and OneActiveMultiPassiveController.
AbstractController* controller [protected] |
int motorNumber [protected] |
int sensorNumber [protected] |
1.4.7