### Navigation

- index
- modules |
- next |
- previous |
- PyBrain v0.3 documentation »

# `tasks` – RL Components: Tasks

class `pybrain.rl.environments.task.``Task`(environment)

  A task is associating a purpose with an environment. It decides how to evaluate the observations, potentially returning reinforcement rewards or fitness values. Furthermore it is a filter for what should be visible to the agent. Also, it can potentially act as a filter on how actions are transmitted to the environment.

  `denormalize`(actors)
    The function scales the parameters from -1 and 1 to the given interval (min, max) for each actor.
  `getObservation`()
    A filtered mapping to getSample of the underlying environment.
  `getReward`()
    Compute and return the current reward (i.e. corresponding to the last action performed)
  `normalize`(sensors)
    The function scales the parameters to be between -1 and 1. e.g. [(-pi, pi), (0, 1), (-0.001, 0.001)]
  `performAction`(action)
    A filtered mapping towards performAction of the underlying environment.
  `setScaling`(sensor_limits, actor_limits)
    Expects scaling lists of 2-tuples - e.g. [(-3.14, 3.14), (0, 1), (-0.001, 0.001)] - one tuple per parameter, giving min and max for that parameter. The functions normalize and denormalize scale the parameters between -1 and 1 and vice versa. To disable this feature, use ‘None’.

class `pybrain.rl.environments.episodic.``EpisodicTask`(environment)

  Bases: `pybrain.rl.environments.task.Task`, `pybrain.rl.environments.fitnessevaluator.FitnessEvaluator`

  A task that consists of independent episodes.

  `addReward`()
    A filtered mapping towards performAction of the underlying environment.
  `discount`
    Discount factor
  `f`(x)
    An episodic task can be used as an evaluation function of a module that produces actions from observations, or as an evaluator of an agent.
  `getTotalReward`()
    Return the accumulated reward since the start of the episode
  `isFinished`()
    Is the current episode over?
  `performAction`(action)
    Execute one action.
  `reset`()
    Re-initialize the environment

### Navigation

- index
- modules |
- next |
- previous |
- PyBrain v0.3 documentation »