#include <replaycontroller.h>
Inherits AbstractController.
Inheritance diagram for ReplayController:


Public Member Functions | |
| ReplayController (const char *filename, bool repeat=false) | |
| 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 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 *, int number_sensors, motor *motors, int number_motors) |
| performs one step without learning. | |
| 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< iparamkey > | getInternalParamNames () const |
| The list of the names of all internal parameters given by getInternalParams(). | |
| virtual std::list< iparamval > | getInternalParams () const |
Protected Member Functions | |
| bool | parseDataFileForHeader (FILE *f) |
Static Protected Member Functions | |
| static bool | isEmpty (const char *c) |
| static bool | check4Number (const char *c) |
| static bool | parseDataLine (matrix::Matrix &data, FILE *f) |
Protected Attributes | |
| int | sensorStart |
| int | sensorEnd |
| int | motorStart |
| int | motorEnd |
| matrix::Matrix | m |
| const char * | filename |
| FILE * | f |
| bool | repeat |
| ReplayController | ( | const char * | filename, | |
| bool | repeat = false | |||
| ) | [inline] |
| static bool check4Number | ( | const char * | c | ) | [inline, static, protected] |
| virtual std::list<iparamkey> 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.
| virtual std::list<iparamval> getInternalParams | ( | ) | const [inline, virtual] |
| 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 be called before use.
The random generator is optional.
Implements AbstractController.
| static bool isEmpty | ( | const char * | c | ) | [inline, static, protected] |
| bool parseDataFileForHeader | ( | FILE * | f | ) | [inline, protected] |
| static bool parseDataLine | ( | matrix::Matrix & | data, | |
| FILE * | f | |||
| ) | [inline, static, protected] |
| virtual bool restore | ( | FILE * | f | ) | [inline, virtual] |
| 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.
| virtual bool store | ( | FILE * | f | ) | const [inline, virtual] |
FILE* f [protected] |
const char* filename [protected] |
matrix::Matrix m [protected] |
int motorEnd [protected] |
int motorStart [protected] |
bool repeat [protected] |
int sensorEnd [protected] |
int sensorStart [protected] |
1.4.7