#include <discretesizable.h>
Inherits DiscreteControllerAdapter.
Inheritance diagram for Discretesizable:


Public Member Functions | |
| Discretesizable (int intervalCount, boolean mapToInteger=true, double minSensorValue=-1.0, double maxSensorValue=1.0) | |
| Initializes the discretization. | |
| virtual | ~Discretesizable () |
| void | step (const sensor *sensors, int sensornumber, motor *motors, int motornumber) |
| performs one step (includes learning). | |
| void | stepNoLearning (const sensor *sensors, int sensornumber, motor *motors, int motornumber) |
| performs one step without learning. | |
Implements the methods step(...) and stepNoLearning(...) and defines the methods dStep(...) respectively dStepNoLearning(...), which are called from the implemented one.
Hint: Do not mistake dStep(...) for a method from the ODE.
Additionally the controller implementing this interface must give the range and intervalCount in the constructor of this interface for configuring the discretization correctly.
Note: This interface does only discretesize the sensor values.
| Discretesizable | ( | int | intervalCount, | |
| boolean | mapToInteger = true, |
|||
| double | minSensorValue = -1.0, |
|||
| double | maxSensorValue = 1.0 | |||
| ) |
Initializes the discretization.
| intervalCount | sets the number of intervals | |
| mapToInteger | if true, all intervals are mapped to 0..(intervalCount-1) | |
| minSensorValue | is neccessary if the sensor range is not in [-1,1] | |
| maxSensorValue | is neccessary if the sensor range is not in [-1,1] |
| virtual ~Discretesizable | ( | ) | [inline, 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 |
Reimplemented from DiscreteControllerAdapter.
| void stepNoLearning | ( | const sensor * | sensors, | |
| int | sensornumber, | |||
| motor * | motors, | |||
| int | motornumber | |||
| ) | [inline, virtual] |
performs one step without learning.
Reimplemented from DiscreteControllerAdapter.
1.4.7