Robot Simulator of the Robotics Group for Self-Organization of Control: Discretesizable Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Discretesizable Class Reference

Abstact class for discretesizable controllers. More...

`#include <discretesizable.h>`

Inherits DiscreteControllerAdapter.

Inheritance diagram for Discretesizable:

[legend]
Collaboration diagram for Discretesizable:

[legend]
List of all members.

## 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.

## Detailed Description

Abstact class for discretesizable controllers.

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.

## Constructor & Destructor Documentation

Discretesizable | ( | int | intervalCount,
|  | boolean | mapToInteger = `true`,
|  | double | minSensorValue = `-1.0`,
|  | double | maxSensorValue = `1.0` |
| ) |  |  |

Initializes the discretization.

Parameters:

  | 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]`

## Member Function Documentation

void step | ( | const sensor * | sensors,
|  | int | sensornumber,
|  | motor * | motors,
|  | int | motornumber |
| ) |  |  | `[inline, virtual]`

performs one step (includes learning).

Calculates motor commands from sensor inputs.

Note:
  This method cannot be overwritten, use

See also:
  dStep instead.

Parameters:

  | 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.

See also:
  step

Note:
  This method cannot be overwritten, use

See also:
  dStepNoLearning instead.

Reimplemented from DiscreteControllerAdapter.

The documentation for this class was generated from the following file:

- discretesizable.h