Task¶
-
class
tasks.taskTemplate.Task[source]¶ Bases:
objectThe abstract tasks class from which all others inherit
Many general methods for tasks are found only here
-
Name¶ The name of the class used when recording what has been used.
Type: string
Methods Summary
feedback()Responds to the action from the participant get_name()Returns the name of the class next()Produces the next stimulus for the iterator params()Returns the parameters of the task as a dictionary proceed()Updates the task before the next trialstep receiveAction(action)Receives the next action from the participant returnTaskState()Returns all the relevant data for this task run standardResultOutput()storeState()Stores the state of all the important variables so that they can be output later Methods Documentation
-
feedback()[source]¶ Responds to the action from the participant
Returns: feedback Return type: None, int or float
-
next()[source]¶ Produces the next stimulus for the iterator
Returns: - stimulus (None)
- nextValidActions (Tuple of ints) – The list of valid actions that the model can respond with. Set to
None, as they never vary.
Raises: StopIteration
-
params()[source]¶ Returns the parameters of the task as a dictionary
Returns: parameters – The parameters of the task Return type: dict
-
receiveAction(action)[source]¶ Receives the next action from the participant
Parameters: action (int or string) – The action taken by the model
-