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

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

Responds to the action from the participant

proceed()[source]

Updates the task after feedback

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

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

class tasks.basic.RewardBasicDirect(**kwargs)[source]

Bases: model.modelTemplate.Rewards

Processes the reward for models expecting just the reward

processFeedback(feedback, lastAction, stimuli)[source]
Returns:
Return type:modelFeedback
class tasks.basic.StimulusBasicSimple(**kwargs)[source]

Bases: model.modelTemplate.Stimulus

Processes the stimulus cues for models expecting just the event

processStimulus(observation)[source]

Processes the decks stimuli for models expecting just the event

Returns:
  • stimuliPresent (int or list of int) – The elements present of the stimulus
  • stimuliActivity (float or list of float) – The activity of each of the elements