24 #ifndef __REMOTECONTROLLED_H
25 #define __REMOTECONTROLLED_H
29 #include <selforg/matrix.h>
42 virtual void init(
int sensornumber,
int motornumber,
RandGen* randGen = 0){
53 virtual void step(
const sensor* sensors,
int sensornumber,
54 motor* motors,
int motornumber){
60 assert(this->number_motors<=number_motors);
61 assert(this->number_sensors<=number_sensors);
75 virtual bool store(FILE* f)
const {
return true;};
79 virtual bool restore(FILE* f){
return true; };
virtual bool restore(FILE *f)
loads the object from the given file stream (binary).
Definition: remotecontrolled.h:79
Matrix type.
Definition: matrix.h:65
virtual int getSensorNumber() const
Definition: remotecontrolled.h:49
I getM() const
Definition: matrix.h:88
Abstract class for robot controller (with some basic functionality).
Definition: abstractcontroller.h:46
virtual void remoteControl(const matrix::Matrix &motors)
Definition: remotecontrolled.h:66
virtual void init(int sensornumber, int motornumber, RandGen *randGen=0)
initialisation of the controller with the given sensor/ motornumber Must be called before use...
Definition: remotecontrolled.h:42
virtual bool store(FILE *f) const
stores the object to the given file stream (ASCII preferred).
Definition: remotecontrolled.h:75
random generator with 48bit integer arithmentic
Definition: randomgenerator.h:34
virtual int getMotorNumber() const
Definition: remotecontrolled.h:51
unsigned short number_motors
Definition: remotecontrolled.h:84
I getN() const
Definition: matrix.h:90
int convertToBuffer(D *buffer, I len) const
stores the content of the matrix (row-wise) in the given buffer
Definition: matrix.cpp:160
double sensor
Definition: abstractcontroller.h:48
RemoteControlled()
Definition: remotecontrolled.h:37
matrix::Matrix x
Definition: remotecontrolled.h:85
Controller that is explicity controlled remotely (no own intelligence).
Definition: remotecontrolled.h:35
virtual matrix::Matrix getLastSensorValues()
Definition: remotecontrolled.h:71
void set(I _m, I _n, const D *_data=0)
sets the size of the matrix and maybe the data if given (row-wise).
Definition: matrix.cpp:147
matrix::Matrix y
Definition: remotecontrolled.h:86
virtual void stepNoLearning(const sensor *sensors, int number_sensors, motor *motors, int number_motors)
performs one step without learning.
Definition: remotecontrolled.h:58
unsigned short number_sensors
Definition: remotecontrolled.h:79
double motor
Definition: abstractcontroller.h:49
virtual void step(const sensor *sensors, int sensornumber, motor *motors, int motornumber)
performs one step (includes learning).
Definition: remotecontrolled.h:53