24 #ifndef __ONECONTROLLERPERCHANNEL_H
25 #define __ONECONTROLLERPERCHANNEL_H
27 #include <selforg/abstractcontroller.h>
76 std::string controllerName,
86 virtual void step(
const sensor* sensors,
int sensornumber,
87 motor* motors,
int motornumber);
90 motor* motors,
int motornumber);
97 virtual bool store(FILE* f)
const;
105 std::vector<AbstractController*>
ctrl;
int numContextSensors
Definition: onecontrollerperchannel.h:108
Abstract class for robot controller (with some basic functionality).
Definition: abstractcontroller.h:46
virtual bool store(FILE *f) const
stores the object to the given file stream (ASCII preferred).
Definition: onecontrollerperchannel.cpp:110
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: onecontrollerperchannel.cpp:52
class for using multiple controller, one for each joint.
Definition: onecontrollerperchannel.h:66
virtual ~OneControllerPerChannel()
Definition: onecontrollerperchannel.cpp:45
virtual void step(const sensor *sensors, int sensornumber, motor *motors, int motornumber)
performs one step (includes learning).
Definition: onecontrollerperchannel.cpp:75
std::vector< AbstractController * > ctrl
Definition: onecontrollerperchannel.h:105
random generator with 48bit integer arithmentic
Definition: randomgenerator.h:34
double * sensorbuffer
Definition: onecontrollerperchannel.h:111
virtual ~ControllerGenerator()
Definition: onecontrollerperchannel.h:56
double sensor
Definition: abstractcontroller.h:48
virtual bool restore(FILE *f)
loads the object from the given file stream (ASCII preferred).
Definition: onecontrollerperchannel.cpp:118
virtual int getSensorNumber() const
Definition: onecontrollerperchannel.h:92
virtual std::vector< AbstractController * > getControllers() const
Definition: onecontrollerperchannel.h:102
virtual AbstractController * operator()(int index)=0
ControllerGenerator * controllerGenerator
Definition: onecontrollerperchannel.h:106
int motornumber
Definition: onecontrollerperchannel.h:109
int sensornumber
Definition: onecontrollerperchannel.h:110
OneControllerPerChannel(ControllerGenerator *controllerGenerator, std::string controllerName, int numCtrlCreateBeforeInit=1, int numContextSensors=0)
Definition: onecontrollerperchannel.cpp:30
int numCtrlCreateBeforeInit
Definition: onecontrollerperchannel.h:107
virtual int getMotorNumber() const
Definition: onecontrollerperchannel.h:93
double motor
Definition: abstractcontroller.h:49
virtual void stepNoLearning(const sensor *sensors, int sensornumber, motor *motors, int motornumber)
performs one step without learning.
Definition: onecontrollerperchannel.cpp:92
generator for controller
Definition: onecontrollerperchannel.h:55