tasks.basic module¶
| Author: | Dominic Hunt |
|---|---|
| Note: | A simple example of a task class with all the necessary components |
-
class
tasks.basic.Basic(trials=100)[source]¶ Bases:
tasks.taskTemplate.TaskAn example of a task with all the necessary components, but nothing changing
Parameters: trials (int) – The number of trials in the task -
Name¶ The name of the class used when recording what has been used.
Type: string
-
next()[source]¶ the task class is an iterator [link to iterator documentation] this function produces the next stimulus for the task iterator
Returns: - stimulus (None)
- nextValidActions (Tuple of ints or
None) – The list of valid actions that the model can respond with. Set to (0,1), as they never vary.
Raises: StopIteration
-
receiveAction(action)[source]¶ Receives the next action from the participant
Parameters: action (int or string) – The action taken by the model
-
-
class
tasks.basic.RewardBasicDirect(**kwargs)[source]¶ Bases:
model.modelTemplate.RewardsProcesses the reward for models expecting just the reward
-
class
tasks.basic.StimulusBasicSimple(**kwargs)[source]¶ Bases:
model.modelTemplate.StimulusProcesses the stimulus cues for models expecting just the event