tasks.taskTemplate module

tasks.taskTemplate Module

Author:Dominic

Classes

Task() The abstract tasks class from which all others inherit

Class Inheritance Diagram

digraph inheritancedac79461bf { rankdir=LR; size="8.0, 12.0"; "Task" [URL="#tasks.taskTemplate.Task",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="The abstract tasks class from which all others inherit"]; }
Author:Dominic
class tasks.taskTemplate.Task[source]

Bases: object

The 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
feedback()[source]

Responds to the action from the participant

Returns:feedback
Return type:None, int or float
classmethod get_name()[source]

Returns the name of the class

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
proceed()[source]

Updates the task before the next trialstep

receiveAction(action)[source]

Receives the next action from the participant

Parameters:action (int or string) – The action taken by the model
returnTaskState()[source]

Returns all the relevant data for this task run

Returns:results – A dictionary containing the class parameters as well as the other useful data
Return type:dictionary
standardResultOutput()[source]
storeState()[source]

Stores the state of all the important variables so that they can be output later